phoneapp/phoneuistates/src/cphonegeneralgsmmessageshandler.cpp
changeset 77 2be0b271d017
parent 72 c76a0b1755b9
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
    19 // INCLUDES
    19 // INCLUDES
    20 #ifdef __SYNCML_DM
    20 #ifdef __SYNCML_DM
    21 #include <apgcli.h>
    21 #include <apgcli.h>
    22 #endif
    22 #endif
    23 #include <mpeengineinfo.h>
    23 #include <mpeengineinfo.h>
    24 #include <UikonInternalPSKeys.h>
       
    25 #include <mccessobserver.h>
    24 #include <mccessobserver.h>
    26 #include <featmgr.h>
    25 #include <featmgr.h>
    27 #include <StringLoader.h>
    26 #include <StringLoader.h>
    28 
    27 
    29 #include "phoneconstants.h"
    28 #include "phoneconstants.h"
   100         case MEngineMonitor::EPEMessageCallBarred:
    99         case MEngineMonitor::EPEMessageCallBarred:
   101             SendGlobalInfoNoteL( EPhoneActiveBarrings, ETrue );
   100             SendGlobalInfoNoteL( EPhoneActiveBarrings, ETrue );
   102             break;
   101             break;
   103         
   102         
   104         case MEngineMonitor::EPEMessageIncCallIsForw:
   103         case MEngineMonitor::EPEMessageIncCallIsForw:
   105             HandleIncomingCallForwardedL();
       
   106             break;
   104             break;
   107             
   105             
   108         case MEngineMonitor::EPEMessageIncCallForwToC:
   106         case MEngineMonitor::EPEMessageIncCallForwToC:
   109             SendGlobalInfoNoteL( EPhoneMtCallDiverting, ETrue );
   107             SendGlobalInfoNoteL( EPhoneMtCallDiverting, ETrue );
   110             break;
   108             break;
   166         TInt aResourceId, TBool aNotificationDialog )
   164         TInt aResourceId, TBool aNotificationDialog )
   167     {
   165     {
   168     __LOGMETHODSTARTEND( EPhoneUIStates, 
   166     __LOGMETHODSTARTEND( EPhoneUIStates, 
   169         "CPhoneGeneralGsmMessagesHandler::SendGlobalInfoNoteL()" );
   167         "CPhoneGeneralGsmMessagesHandler::SendGlobalInfoNoteL()" );
   170     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   168     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   171     if ( CPhonePubSubProxy::Instance()->Value( 
   169     
   172             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   170     TPhoneCmdParamBoolean globalNotifierParam;
   173         {
   171     globalNotifierParam.SetBoolean( EFalse );
   174         TPhoneCmdParamBoolean globalNotifierParam;
   172     iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   175         globalNotifierParam.SetBoolean( EFalse );
   173         &globalNotifierParam );
   176         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   174         
   177             &globalNotifierParam );
   175     TPhoneCmdParamGlobalNote globalNoteParam;
   178             
   176     PhoneNotificationType type = aNotificationDialog ? 
   179         TPhoneCmdParamGlobalNote globalNoteParam;
   177             EPhoneNotificationDialog : EPhoneMessageBoxInformation;
   180         PhoneNotificationType type = aNotificationDialog ? 
   178     globalNoteParam.SetType( type );
   181                 EPhoneNotificationDialog : EPhoneMessageBoxInformation;
   179   
   182         globalNoteParam.SetType( type );
   180     globalNoteParam.SetTextResourceId( 
   183       
   181         CPhoneMainResourceResolver::Instance()->
   184         globalNoteParam.SetTextResourceId( 
   182         ResolveResourceID( aResourceId ) );
   185             CPhoneMainResourceResolver::Instance()->
   183     globalNoteParam.SetNotificationDialog( aNotificationDialog );
   186             ResolveResourceID( aResourceId ) );
   184 
   187         globalNoteParam.SetNotificationDialog( aNotificationDialog );
   185     iViewCommandHandle.ExecuteCommandL( 
   188 
   186         EPhoneViewShowGlobalNote, &globalNoteParam );    
   189         iViewCommandHandle.ExecuteCommandL( 
       
   190             EPhoneViewShowGlobalNote, &globalNoteParam );    
       
   191         }
       
   192     }
       
   193 
       
   194 // -----------------------------------------------------------
       
   195 // CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL
       
   196 // -----------------------------------------------------------
       
   197 //
       
   198 void CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()
       
   199     {
       
   200     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   201         "CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()" );
       
   202     iActiveState.SetDivertIndication( ETrue );
       
   203     }
   187     }
   204 
   188 
   205 // ---------------------------------------------------------
   189 // ---------------------------------------------------------
   206 //  CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL
   190 //  CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL
   207 // ---------------------------------------------------------
   191 // ---------------------------------------------------------
   210         TInt aResourceId, TBool aNotificationDialog )
   194         TInt aResourceId, TBool aNotificationDialog )
   211     {
   195     {
   212     __LOGMETHODSTARTEND( EPhoneUIStates, 
   196     __LOGMETHODSTARTEND( EPhoneUIStates, 
   213         "CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL()" );
   197         "CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL()" );
   214     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   198     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   215     if ( CPhonePubSubProxy::Instance()->Value( 
   199     TPhoneCmdParamBoolean globalNotifierParam;
   216             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   200     globalNotifierParam.SetBoolean( EFalse );
   217         {
   201     iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   218         TPhoneCmdParamBoolean globalNotifierParam;
   202         &globalNotifierParam );
   219         globalNotifierParam.SetBoolean( EFalse );
       
   220         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
       
   221             &globalNotifierParam );
       
   222             
       
   223         TPhoneCmdParamGlobalNote globalNoteParam;
       
   224         PhoneNotificationType type = aNotificationDialog ? 
       
   225                 EPhoneNotificationDialog : EPhoneMessageBoxInformation;
       
   226         globalNoteParam.SetType( type );
       
   227         globalNoteParam.SetTextResourceId( 
       
   228             CPhoneMainResourceResolver::Instance()->
       
   229             ResolveResourceID( aResourceId ) );
       
   230         globalNoteParam.SetNotificationDialog( aNotificationDialog );
       
   231         
   203         
   232         iViewCommandHandle.ExecuteCommandL( 
   204     TPhoneCmdParamGlobalNote globalNoteParam;
   233             EPhoneViewShowGlobalNote, &globalNoteParam );
   205     PhoneNotificationType type = aNotificationDialog ? 
   234         }
   206             EPhoneNotificationDialog : EPhoneMessageBoxInformation;
       
   207     globalNoteParam.SetType( type );
       
   208     globalNoteParam.SetTextResourceId( 
       
   209         CPhoneMainResourceResolver::Instance()->
       
   210         ResolveResourceID( aResourceId ) );
       
   211     globalNoteParam.SetNotificationDialog( aNotificationDialog );
       
   212     
       
   213     iViewCommandHandle.ExecuteCommandL( 
       
   214         EPhoneViewShowGlobalNote, &globalNoteParam );
       
   215 
   235     }
   216     }
   236 
   217 
   237 // End of File
   218 // End of File