phoneapp/phoneuistates/src/cphonecallsetup.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 69 8baf28733c3d
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDES
    19 // INCLUDES
    20 #include <MediatorDomainUIDs.h>
    20 #include <MediatorDomainUIDs.h>
       
    21 #include <videotelcontrolmediatorapi.h>
    21 #include "cphonecallsetup.h"
    22 #include "cphonecallsetup.h"
    22 #include "mphonestatemachine.h"
    23 #include "mphonestatemachine.h"
    23 #include "tphonecmdparamboolean.h"
    24 #include "tphonecmdparamboolean.h"
    24 #include "tphonecmdparamcallheaderdata.h"
    25 #include "tphonecmdparamcallheaderdata.h"
    25 #include "phonestatedefinitionsgsm.h"
    26 #include "phonestatedefinitionsgsm.h"
    28 #include "cphonemainresourceresolver.h"
    29 #include "cphonemainresourceresolver.h"
    29 #include "phonelogger.h"
    30 #include "phonelogger.h"
    30 #include "cphonegeneralgsmmessageshandler.h"
    31 #include "cphonegeneralgsmmessageshandler.h"
    31 #include "cphonemediatorfactory.h"
    32 #include "cphonemediatorfactory.h"
    32 #include "cphonemediatorsender.h"
    33 #include "cphonemediatorsender.h"
       
    34 #include "mphonesecuritymodeobserver.h"
    33 
    35 
    34 // ================= MEMBER FUNCTIONS =======================
    36 // ================= MEMBER FUNCTIONS =======================
    35 
    37 
    36 // C++ default constructor can NOT contain any code, that
    38 // C++ default constructor can NOT contain any code, that
    37 // might leave.
    39 // might leave.
   100         {
   102         {
   101         case MEngineMonitor::EPEMessageConnecting:
   103         case MEngineMonitor::EPEMessageConnecting:
   102             HandleConnectingL( aCallId );
   104             HandleConnectingL( aCallId );
   103             break;
   105             break;
   104 
   106 
   105         // fall through.    
   107         case MEngineMonitor::EPEMessageShowVersion:
       
   108             {
       
   109             if ( iStateMachine->SecurityMode()->IsSecurityMode() )
       
   110                 {
       
   111                 // Do nothing if security mode is enabled.
       
   112                 return;
       
   113                 }
       
   114             }
       
   115         // Fall through
   106         case MEngineMonitor::EPEMessageIssuingSSRequest:
   116         case MEngineMonitor::EPEMessageIssuingSSRequest:
   107         case MEngineMonitor::EPEMessageCallBarred:
   117         case MEngineMonitor::EPEMessageCallBarred:
   108         case MEngineMonitor::EPEMessageIssuedSSRequest:
   118         case MEngineMonitor::EPEMessageIssuedSSRequest:
   109         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   119         case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful:
   110         case MEngineMonitor::EPEMessageIncCallIsForw:
   120         case MEngineMonitor::EPEMessageIncCallIsForw:
   145     {
   155     {
   146     // Only handle connecting case for GSM protocol. In CDMA, this message is 
   156     // 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
   157     // 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
   158     // 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.
   159     // should still be able to cancel the MO call before the call is connected.
   150     __LOGMETHODSTARTEND( EPhoneUIStates, 
   160     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetup::HandleConnectingL()");
   151         "CPhoneCallSetup::HandleConnectingL()");
       
   152     
       
   153     BeginUiUpdateLC();
   161     BeginUiUpdateLC();
   154     UpdateRemoteInfoDataL ( aCallId );
   162     UpdateRemoteInfoDataL ( aCallId );
       
   163     
       
   164     SetNeedToReturnToForegroundAppStatusL( EFalse );
   155     
   165     
   156     // Re-enable global notes
   166     // Re-enable global notes
   157     TPhoneCmdParamBoolean globalNotifierParam;
   167     TPhoneCmdParamBoolean globalNotifierParam;
   158     globalNotifierParam.SetBoolean( EFalse );
   168     globalNotifierParam.SetBoolean( EFalse );
   159     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   169     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   160         &globalNotifierParam );
   170         &globalNotifierParam );
   161 
   171 
   162     // Home screen to foreground after call
       
   163     TPhoneCmdParamBoolean booleanParam;
       
   164     booleanParam.SetBoolean( ETrue );
       
   165     iViewCommandHandle->ExecuteCommand( EPhoneViewHsToForegroundAfterCall,
       
   166         &booleanParam );
       
   167     
       
   168     // Stop capturing keys
   172     // Stop capturing keys
   169     CaptureKeysDuringCallNotificationL( EFalse );
   173     CaptureKeysDuringCallNotificationL( EFalse );
   170     
   174     
   171     TPhoneCmdParamCallHeaderData callHeaderParam;
   175     TPhoneCmdParamCallHeaderData callHeaderParam;
   172     callHeaderParam.SetCallState( EPEStateConnecting );
   176     callHeaderParam.SetCallState( EPEStateConnecting );
   173     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   177     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   174         &callHeaderParam );
   178         &callHeaderParam );
   175 
   179 
       
   180     // Remove the number entry if it isn't DTMF dialer
       
   181     if ( !iOnScreenDialer ||
       
   182          !IsNumberEntryVisibleL() ||
       
   183          !IsDTMFEditorVisibleL() )
       
   184         {
       
   185         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
       
   186         }
       
   187 
   176     SetToolbarButtonLoudspeakerEnabled();
   188     SetToolbarButtonLoudspeakerEnabled();
   177 
   189 
   178     EndUiUpdate();
   190     EndUiUpdate();
   179     
   191     
   180     // Go to alerting state
       
   181     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   192     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   182 
       
   183     iStateMachine->ChangeState( EPhoneStateAlerting );
   193     iStateMachine->ChangeState( EPhoneStateAlerting );
   184     }
   194     }
   185 
   195 
   186 // End of File
   196 // End of File