jjccx

jjccx's blog
posts - 31, comments - 97, trackbacks - 5, articles - 70
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

公告

在S60 3RD手机上获取铃声音量

Posted on 2007-06-17 23:38 jjccx 阅读(254) 评论(1)  编辑 收藏
//相关的都放在这里了

CRepository* cr = CRepository::NewLC( KCRUidProfileEngine );
TInt value;

// Get the ID of the currently active profile:
User::LeaveIfError( cr->Get( KProEngActiveProfile, value ) );
iProfileIndex = value;
// use value

// Get the ringing type of the active profile:
User::LeaveIfError( cr->Get( KProEngActiveRingingType, value ) );
iRingTypeIndex = value;
// use value

// Get the keypad tones volume level of the active profile:
User::LeaveIfError( cr->Get( KProEngActiveKeypadVolume, value ) );
iKeyPadVolLevelIndex = value;
// use value

// Get the ringing volume of the active profile:
User::LeaveIfError( cr->Get( KProEngActiveRingingVolume, value ) );
iRingVolumeIndex = value;
// use value

// Get the game and warning tone setting of the active profile:
User::LeaveIfError( cr->Get( KProEngActiveWarningTones, value ) );
iWarningTonesIndex = value;
// use value

// Get the message alert setting of the active profile:
User::LeaveIfError( cr->Get( KProEngActiveMessageAlert, value ) );
iMessageAlersIndex = value;
// use value

CleanupStack::PopAndDestroy( cr );

// Read the property names to be used in showing the error messages
iPropertyNames = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_PROPERTIES );

// Read the profile names
iProfileNames = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_NAMES );

// Read the ringing types
iRingTypes = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_RING_TYPES );

// Read the Keypad Volumes
iKeyPadVolLevels = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_KEYPAD_VOL_LEVELS );

// Read the warning tone modes
iWarningTones = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_WARN_TONES);

// Read the message alert modes
iMessageAlers = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_PROFILE_MESSAGE_ALERTS);

// Read the bluetooth power modes
iChargerStatus = CCoeEnv::Static()->ReadDesCArrayResourceL(
R_CHARGER_STATUS);

if(iState==-1)
{
iState = EStateBatteryInfo;
HandleAsyncCalls();
}