phoneapp/phoneuistates/src/cphonegeneralgsmmessageshandler.cpp
changeset 65 2a5d4ab426d3
parent 53 22cc52eade9b
child 74 d1c62c765e48
equal deleted inserted replaced
60:1eef62f5c541 65:2a5d4ab426d3
    77     MPhoneStateMachine& aStateMachine, 
    77     MPhoneStateMachine& aStateMachine, 
    78     MPhoneViewCommandHandle& aViewCommandHandle,
    78     MPhoneViewCommandHandle& aViewCommandHandle,
    79     MPhoneState& aActiveState )
    79     MPhoneState& aActiveState )
    80     {
    80     {
    81     CPhoneGeneralGsmMessagesHandler* self = new( ELeave ) 
    81     CPhoneGeneralGsmMessagesHandler* self = new( ELeave ) 
    82         CPhoneGeneralGsmMessagesHandler( aStateMachine, 
    82             CPhoneGeneralGsmMessagesHandler( aStateMachine, 
    83                                          aViewCommandHandle,
    83                                          aViewCommandHandle,
    84                                          aActiveState );
    84                                          aActiveState );
    85     
       
    86     return self;
    85     return self;
    87     }
    86     }
    88 
    87 
    89 // -----------------------------------------------------------
    88 // -----------------------------------------------------------
    90 // CPhoneGeneralGsmMessagesHandler::HandlePhoneEngineMessageL
    89 // CPhoneGeneralGsmMessagesHandler::HandlePhoneEngineMessageL
    94     const TInt aMessage, 
    93     const TInt aMessage, 
    95     TInt /*aCallId*/ )
    94     TInt /*aCallId*/ )
    96     {
    95     {
    97     __LOGMETHODSTARTEND( EPhoneUIStates, 
    96     __LOGMETHODSTARTEND( EPhoneUIStates, 
    98         "CPhoneGeneralGsmMessagesHandler::HandlePhoneEngineMessageL()" );
    97         "CPhoneGeneralGsmMessagesHandler::HandlePhoneEngineMessageL()" );
    99 
       
   100     switch ( aMessage )
    98     switch ( aMessage )
   101         {
    99         {
   102         case MEngineMonitor::EPEMessageCallBarred:
   100         case MEngineMonitor::EPEMessageCallBarred:
   103             SendGlobalInfoNoteL( EPhoneActiveBarrings, ETrue );
   101             SendGlobalInfoNoteL( EPhoneActiveBarrings, ETrue );
   104             break;
   102             break;
   119             {
   117             {
   120             __PHONELOG(
   118             __PHONELOG(
   121                 EBasic, 
   119                 EBasic, 
   122                 EPhoneUIStates,
   120                 EPhoneUIStates,
   123                 "CPhoneGeneralGsmMessagesHandler::EPEMessageIssuedSSRequest" );
   121                 "CPhoneGeneralGsmMessagesHandler::EPEMessageIssuedSSRequest" );
   124             break;
       
   125             }
   122             }
       
   123             break;
   126             
   124             
   127         case MEngineMonitor::EPEMessageIssuingSSRequest:
   125         case MEngineMonitor::EPEMessageIssuingSSRequest:
   128             {
   126             {
   129             __PHONELOG(
   127             __PHONELOG(
   130                 EBasic, 
   128                 EBasic, 
   131                 EPhoneUIStates,
   129                 EPhoneUIStates,
   132                 "CPhoneGeneralGsmMessagesHandler::EPEMessageIssuingSSRequest" );
   130                 "CPhoneGeneralGsmMessagesHandler::EPEMessageIssuingSSRequest" );
   133                     
       
   134             iStateMachine.SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
   131             iStateMachine.SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF );
   135              
   132             iViewCommandHandle.ExecuteCommandL( 
   136             // Remove number entry from screen
   133                 EPhoneViewClearNumberEntryContent );
   137             if ( !FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) &&
   134             
   138                  iViewCommandHandle.HandleCommandL( 
       
   139                      EPhoneViewGetNumberEntryIsVisibleStatus ) == 
       
   140                      EPhoneViewResponseSuccess )  
       
   141                 {            
       
   142                 iViewCommandHandle.ExecuteCommandL( 
       
   143                     EPhoneViewRemoveNumberEntry );
       
   144                 }
       
   145             else if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )
       
   146                 {
       
   147                 iViewCommandHandle.ExecuteCommandL( 
       
   148                     EPhoneViewClearNumberEntryContent );
       
   149                 }
       
   150 
       
   151             // Enable global notes
       
   152             TPhoneCmdParamBoolean globalNotifierParam;
   135             TPhoneCmdParamBoolean globalNotifierParam;
   153             globalNotifierParam.SetBoolean( EFalse );
   136             globalNotifierParam.SetBoolean( EFalse );
   154             iViewCommandHandle.ExecuteCommandL( 
   137             iViewCommandHandle.ExecuteCommandL( 
   155                 EPhoneViewSetGlobalNotifiersDisabled,
   138                 EPhoneViewSetGlobalNotifiersDisabled,
   156                 &globalNotifierParam );
   139                 &globalNotifierParam );
   157             
       
   158             // Get active call count
       
   159             TPhoneCmdParamInteger activeCallCount;
       
   160             iViewCommandHandle.ExecuteCommandL(
       
   161                 EPhoneViewGetCountOfActiveCalls, &activeCallCount );
       
   162             
       
   163             // Remove phoneumber query
       
   164             iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveQuery );
   140             iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveQuery );
   165             break;
       
   166             }
   141             }
   167 
   142             break;
       
   143             
   168         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   144         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   169             SendGlobalErrorNoteL( EPhoneSSNotifCLIRSupprReject, ETrue );
   145             SendGlobalErrorNoteL( EPhoneSSNotifCLIRSupprReject, ETrue );
   170             break;
   146             break;
   171             
   147             
   172         case MEngineMonitor::EPEMessageForwardUnconditionalModeActive:
   148         case MEngineMonitor::EPEMessageForwardUnconditionalModeActive:
   193         "CPhoneGeneralGsmMessagesHandler::SendGlobalInfoNoteL()" );
   169         "CPhoneGeneralGsmMessagesHandler::SendGlobalInfoNoteL()" );
   194     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   170     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   195     if ( CPhonePubSubProxy::Instance()->Value( 
   171     if ( CPhonePubSubProxy::Instance()->Value( 
   196             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   172             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   197         {
   173         {
   198         // Re-enable global notes
       
   199         TPhoneCmdParamBoolean globalNotifierParam;
   174         TPhoneCmdParamBoolean globalNotifierParam;
   200         globalNotifierParam.SetBoolean( EFalse );
   175         globalNotifierParam.SetBoolean( EFalse );
   201         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   176         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   202             &globalNotifierParam );
   177             &globalNotifierParam );
   203             
   178             
   222 //
   197 //
   223 void CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()
   198 void CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()
   224     {
   199     {
   225     __LOGMETHODSTARTEND( EPhoneUIStates, 
   200     __LOGMETHODSTARTEND( EPhoneUIStates, 
   226         "CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()" );
   201         "CPhoneGeneralGsmMessagesHandler::HandleIncomingCallForwardedL()" );
   227     
       
   228     iActiveState.SetDivertIndication( ETrue );
   202     iActiveState.SetDivertIndication( ETrue );
   229     
       
   230     }
   203     }
   231 
   204 
   232 // ---------------------------------------------------------
   205 // ---------------------------------------------------------
   233 //  CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL
   206 //  CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL
   234 // ---------------------------------------------------------
   207 // ---------------------------------------------------------
   237         TInt aResourceId, TBool aNotificationDialog )
   210         TInt aResourceId, TBool aNotificationDialog )
   238     {
   211     {
   239     __LOGMETHODSTARTEND( EPhoneUIStates, 
   212     __LOGMETHODSTARTEND( EPhoneUIStates, 
   240         "CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL()" );
   213         "CPhoneGeneralGsmMessagesHandler::SendGlobalErrorNoteL()" );
   241     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   214     __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) );
   242 
       
   243     if ( CPhonePubSubProxy::Instance()->Value( 
   215     if ( CPhonePubSubProxy::Instance()->Value( 
   244             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   216             KPSUidUikon, KUikGlobalNotesAllowed ) == 1 )
   245         {
   217         {
   246         // Re-enable global notes
       
   247         TPhoneCmdParamBoolean globalNotifierParam;
   218         TPhoneCmdParamBoolean globalNotifierParam;
   248         globalNotifierParam.SetBoolean( EFalse );
   219         globalNotifierParam.SetBoolean( EFalse );
   249         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   220         iViewCommandHandle.ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   250             &globalNotifierParam );
   221             &globalNotifierParam );
   251             
   222