phoneapp/phoneuistates/src/cphonecallsetup.cpp
changeset 65 2a5d4ab426d3
parent 50 377c906a8701
child 74 d1c62c765e48
equal deleted inserted replaced
60:1eef62f5c541 65:2a5d4ab426d3
   100         {
   100         {
   101         case MEngineMonitor::EPEMessageConnecting:
   101         case MEngineMonitor::EPEMessageConnecting:
   102             HandleConnectingL( aCallId );
   102             HandleConnectingL( aCallId );
   103             break;
   103             break;
   104 
   104 
   105         // fall through.    
   105         // fall through.
   106         case MEngineMonitor::EPEMessageIssuingSSRequest:
   106         case MEngineMonitor::EPEMessageIssuingSSRequest:
   107         case MEngineMonitor::EPEMessageCallBarred:
   107         case MEngineMonitor::EPEMessageCallBarred:
   108         case MEngineMonitor::EPEMessageIssuedSSRequest:
   108         case MEngineMonitor::EPEMessageIssuedSSRequest:
   109         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   109         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   110         case MEngineMonitor::EPEMessageIncCallIsForw:
   110         case MEngineMonitor::EPEMessageIncCallIsForw:
   116             __PHONELOG1( 
   116             __PHONELOG1( 
   117                 EBasic, 
   117                 EBasic, 
   118                 EPhoneUIStates, 
   118                 EPhoneUIStates, 
   119                 "CPhoneCallSetup::HandlePhoneEngineMessageL Start create gsm message handler %d",
   119                 "CPhoneCallSetup::HandlePhoneEngineMessageL Start create gsm message handler %d",
   120                 aMessage ); 
   120                 aMessage ); 
   121             
       
   122             CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
   121             CPhoneGeneralGsmMessagesHandler* gsmMsgHandler =
   123                 CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine,
   122                 CPhoneGeneralGsmMessagesHandler::NewL( 
   124                                                        *iViewCommandHandle,
   123                         *iStateMachine,
   125                                                        *this );
   124                         *iViewCommandHandle,
   126 
   125                         *this );
   127             CleanupStack::PushL( gsmMsgHandler );
   126             CleanupStack::PushL( gsmMsgHandler );
   128             gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
   127             gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId );
   129             CleanupStack::PopAndDestroy( gsmMsgHandler );       
   128             CleanupStack::PopAndDestroy( gsmMsgHandler );
   130             }
   129             }
   131             break;
   130             break;
   132             
   131             
   133         default:
   132         default:
   134             CPhoneStateCallSetup::HandlePhoneEngineMessageL( aMessage, 
   133             CPhoneStateCallSetup::HandlePhoneEngineMessageL( aMessage, 
   145     {
   144     {
   146     // Only handle connecting case for GSM protocol. In CDMA, this message is 
   145     // Only handle connecting case for GSM protocol. In CDMA, this message is 
   147     // set when the CDMA network receives the call, not (like in GSM) when
   146     // set when the CDMA network receives the call, not (like in GSM) when
   148     // when the remote party receives the call. So, in CDMA, the user
   147     // when the remote party receives the call. So, in CDMA, the user
   149     // should still be able to cancel the MO call before the call is connected.
   148     // should still be able to cancel the MO call before the call is connected.
   150     __LOGMETHODSTARTEND( EPhoneUIStates, 
   149     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetup::HandleConnectingL()");
   151         "CPhoneCallSetup::HandleConnectingL()");
       
   152     
       
   153     BeginUiUpdateLC();
   150     BeginUiUpdateLC();
   154     UpdateRemoteInfoDataL ( aCallId );
   151     UpdateRemoteInfoDataL ( aCallId );
   155     
   152     
   156     // Re-enable global notes
       
   157     TPhoneCmdParamBoolean globalNotifierParam;
   153     TPhoneCmdParamBoolean globalNotifierParam;
   158     globalNotifierParam.SetBoolean( EFalse );
   154     globalNotifierParam.SetBoolean( EFalse );
   159     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   155     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   160         &globalNotifierParam );
   156         &globalNotifierParam );
   161 
   157 
   162     // Home screen to foreground after call
       
   163     TPhoneCmdParamBoolean booleanParam;
   158     TPhoneCmdParamBoolean booleanParam;
   164     booleanParam.SetBoolean( ETrue );
   159     booleanParam.SetBoolean( ETrue );
   165     iViewCommandHandle->ExecuteCommand( EPhoneViewHsToForegroundAfterCall,
   160     iViewCommandHandle->ExecuteCommand( EPhoneViewHsToForegroundAfterCall,
   166         &booleanParam );
   161         &booleanParam );
   167     
       
   168     // Stop capturing keys
       
   169     CaptureKeysDuringCallNotificationL( EFalse );
       
   170     
   162     
   171     TPhoneCmdParamCallHeaderData callHeaderParam;
   163     TPhoneCmdParamCallHeaderData callHeaderParam;
   172     callHeaderParam.SetCallState( EPEStateConnecting );
   164     callHeaderParam.SetCallState( EPEStateConnecting );
   173     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   165     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   174         &callHeaderParam );
   166         &callHeaderParam );
   175 
   167 
   176     SetToolbarButtonLoudspeakerEnabled();
   168     SetToolbarButtonLoudspeakerEnabled();
   177 
       
   178     EndUiUpdate();
   169     EndUiUpdate();
   179     
       
   180     // Go to alerting state
       
   181     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   170     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   182 
       
   183     iStateMachine->ChangeState( EPhoneStateAlerting );
   171     iStateMachine->ChangeState( EPhoneStateAlerting );
   184     }
   172     }
   185 
   173 
   186 // End of File
   174 // End of File