phoneengine/phonemodel/src/cpeexternaldatahandler.cpp
changeset 27 2f8f8080a020
parent 22 6bb1b21d2484
child 30 ebdbd102c78a
equal deleted inserted replaced
22:6bb1b21d2484 27:2f8f8080a020
    58     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::~CPEExternalDataHandler" );    
    58     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::~CPEExternalDataHandler" );    
    59 
    59 
    60     delete iTelephonyVariationRepository;
    60     delete iTelephonyVariationRepository;
    61     delete iTelephonySettingsRepository;
    61     delete iTelephonySettingsRepository;
    62     delete iProfileSettings;
    62     delete iProfileSettings;
    63     delete iNetworkRegistrationStatus;
    63     delete iNetworkRegistrationStatus;   
    64     delete iLoudspeakerVolumeSetting;
       
    65     delete iEarVolumeSetting;
       
    66     delete iCallDurationDisplay;
    64     delete iCallDurationDisplay;
    67     delete iAudioOutputPreferenceMonitor;
    65     delete iAudioOutputPreferenceMonitor;
    68     delete iAccessorySettingsRepository;
    66     delete iAccessorySettingsRepository;
    69     delete iAccessoryModeMonitor;
    67     delete iAccessoryModeMonitor;
    70     delete iCoreApplicationRepository;
    68     delete iCoreApplicationRepository;
    79         MPEPhoneModelInternal& aModel )
    77         MPEPhoneModelInternal& aModel )
    80     {
    78     {
    81     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::BaseConstructL" );
    79     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::BaseConstructL" );
    82 
    80 
    83     // Instantiate monitor objects
    81     // Instantiate monitor objects
    84     iAudioOutputPreferenceMonitor = CPEAudioOutputPreferenceMonitor::NewL( aModel );
    82     iAudioOutputPreferenceMonitor = CPEAudioOutputPreferenceMonitor::NewL( aModel );    
    85     iEarVolumeSetting = CPEIncallEarVolumeSettingMonitor::NewL( aModel );
       
    86     iLoudspeakerVolumeSetting = CPEIncallLoudspeakerVolumeSettingMonitor::NewL( aModel );
       
    87     iCallDurationDisplay = CPECallDurationDisplaySettingMonitor::NewL(); 
    83     iCallDurationDisplay = CPECallDurationDisplaySettingMonitor::NewL(); 
    88     iProfileSettings = CPEProfileSettingMonitor::NewL( aModel );
    84     iProfileSettings = CPEProfileSettingMonitor::NewL( aModel );
    89     
    85     
    90     //TODO
    86     //TODO
    91     /*
    87     /*
    95     // Instantiate repository objects for later use
    91     // Instantiate repository objects for later use
    96     iAccessorySettingsRepository = CRepository::NewL( KCRUidAccessorySettings );*/
    92     iAccessorySettingsRepository = CRepository::NewL( KCRUidAccessorySettings );*/
    97     //iTelephonySettingsRepository = CRepository::NewL( KCRUidTelephonySettings );
    93     //iTelephonySettingsRepository = CRepository::NewL( KCRUidTelephonySettings );
    98     iTelephonyVariationRepository = CRepository::NewL( KCRUidTelVariation );
    94     iTelephonyVariationRepository = CRepository::NewL( KCRUidTelVariation );
    99     //iCoreApplicationRepository = CRepository::NewL( KCRUidCoreApplicationUIs ); 
    95     //iCoreApplicationRepository = CRepository::NewL( KCRUidCoreApplicationUIs ); 
       
    96    
   100     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::BaseConstructL 2" );
    97     TEFLOGSTRING( KTAOBJECT, "PE CPEExternalDataHandler::BaseConstructL 2" );
   101     }
    98     }
   102 
    99 
   103 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
   104 // CPEExternalDataHandler::Get
   101 // CPEExternalDataHandler::Get
   121         }
   118         }
   122     else if ( EPEAudioOutputPreference == aSetting )
   119     else if ( EPEAudioOutputPreference == aSetting )
   123         {
   120         {
   124         errorCode = iAudioOutputPreferenceMonitor->Get( aValue );
   121         errorCode = iAudioOutputPreferenceMonitor->Get( aValue );
   125         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPEAudioOutputPreference, error code: %d", errorCode );
   122         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPEAudioOutputPreference, error code: %d", errorCode );
   126         }
   123         }    
   127     else if ( EPEIncallEarVolumeSetting == aSetting )
       
   128         {
       
   129         errorCode = iEarVolumeSetting->Get( aValue );
       
   130         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPEIncallEarVolumeSetting, error code: %d", errorCode );
       
   131         }
       
   132     else if ( EPEIncallLoudspeakerVolumeSetting == aSetting )
       
   133         {
       
   134         errorCode = iLoudspeakerVolumeSetting->Get( aValue );
       
   135         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPEIncallLoudspeakerVolumeSetting, error code: %d", errorCode );
       
   136         }
       
   137     else if ( EPECallDurationDisplaySetting == aSetting )
   124     else if ( EPECallDurationDisplaySetting == aSetting )
   138         {
   125         {
   139         errorCode = iCallDurationDisplay->GetValue( aValue );
   126         errorCode = iCallDurationDisplay->Get( aValue );
   140         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPECallDurationDisplaySetting, error code: %d", errorCode );
   127         TEFLOGSTRING2( KTAINT, "CPEExternalDataHandler::Get EPECallDurationDisplaySetting, error code: %d", errorCode );
   141         }
   128         }
   142     else
   129     else
   143         {
   130         {
   144         errorCode = KErrNone;
   131         errorCode = KErrNone;
   194     {
   181     {
   195     TInt errorCode( KErrNotFound );
   182     TInt errorCode( KErrNotFound );
   196 
   183 
   197     switch ( aSetting )
   184     switch ( aSetting )
   198         {
   185         {
   199         case EPEIncallEarVolumeSetting:
       
   200             {
       
   201             errorCode = iEarVolumeSetting->Set( aValue );
       
   202             break;
       
   203             }
       
   204         case EPEIncallLoudspeakerVolumeSetting:
       
   205             {
       
   206             errorCode = iLoudspeakerVolumeSetting->Set( aValue );
       
   207             break;
       
   208             }
       
   209         case EPEEmergencyCallInfo:
   186         case EPEEmergencyCallInfo:
   210             {
   187             {
   211             errorCode = RProperty::Set( KPSUidCtsyEmergencyCallInfo, 
   188             errorCode = RProperty::Set( KPSUidCtsyEmergencyCallInfo, 
   212                                         KCTSYEmergencyCallInfo, aValue );
   189                                         KCTSYEmergencyCallInfo, aValue );
   213             TEFLOGSTRING2( KTAERROR, 
   190             TEFLOGSTRING2( KTAERROR,