//相关的都放在这里了
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();
}
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();
}
浙公网安备 33010602011771号