phoneapp/phoneuistates/src/cphonesinglecall.cpp
changeset 65 2a5d4ab426d3
parent 50 377c906a8701
child 74 d1c62c765e48
equal deleted inserted replaced
60:1eef62f5c541 65:2a5d4ab426d3
    63     {
    63     {
    64     }
    64     }
    65 
    65 
    66 // -----------------------------------------------------------
    66 // -----------------------------------------------------------
    67 // CPhoneSingleCall::~CPhoneSingleCall()
    67 // CPhoneSingleCall::~CPhoneSingleCall()
    68 // Destructor
       
    69 // (other items were commented in a header).
       
    70 // -----------------------------------------------------------
    68 // -----------------------------------------------------------
    71 //
    69 //
    72 EXPORT_C CPhoneSingleCall::~CPhoneSingleCall()
    70 EXPORT_C CPhoneSingleCall::~CPhoneSingleCall()
    73     {
    71     {
    74     }
    72     }
    75 
    73 
    76 // -----------------------------------------------------------
    74 // -----------------------------------------------------------
    77 // CPhoneSingleCall::ConstructL()
    75 // CPhoneSingleCall::ConstructL()
    78 // Constructor
       
    79 // (other items were commented in a header).
       
    80 // -----------------------------------------------------------
    76 // -----------------------------------------------------------
    81 //
    77 //
    82 EXPORT_C void CPhoneSingleCall::ConstructL()
    78 EXPORT_C void CPhoneSingleCall::ConstructL()
    83     {
    79     {
    84     CPhoneGsmInCall::ConstructL();
    80     CPhoneGsmInCall::ConstructL();
    85     
    81     
    86     // Re-enable global notes
       
    87     TPhoneCmdParamBoolean globalNotifierParam;
    82     TPhoneCmdParamBoolean globalNotifierParam;
    88     globalNotifierParam.SetBoolean( EFalse );
    83     globalNotifierParam.SetBoolean( EFalse );
    89     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
    84     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
    90         &globalNotifierParam );
    85         &globalNotifierParam );
    91 
    86     
    92     TPhoneCmdParamBoolean holdFlag;
       
    93     holdFlag.SetBoolean( EFalse );
       
    94     // Fetch active call's id from view    
       
    95     TPhoneCmdParamCallStateData callStateData;
    87     TPhoneCmdParamCallStateData callStateData;
    96     callStateData.SetCallState( EPEStateConnected );
    88     callStateData.SetCallState( EPEStateConnected );
    97     iViewCommandHandle->HandleCommandL(
    89     iViewCommandHandle->HandleCommandL(
    98         EPhoneViewGetCallIdByState, &callStateData );
    90         EPhoneViewGetCallIdByState, &callStateData );
    99             
    91     
       
    92     TPhoneCmdParamBoolean holdFlag;
       
    93     holdFlag.SetBoolean( EFalse );
       
    94     // No connected call, 
   100     if( callStateData.CallId() == KErrNotFound )
    95     if( callStateData.CallId() == KErrNotFound )
   101         {
    96         {
   102         holdFlag.SetBoolean( ETrue );
    97         holdFlag.SetBoolean( ETrue );
   103         // No connected call, find the hold call
    98         //find the held call.
   104         callStateData.SetCallState( EPEStateHeld );                    
    99         callStateData.SetCallState( EPEStateHeld );
   105         iViewCommandHandle->HandleCommandL(
   100         iViewCommandHandle->HandleCommandL(
   106             EPhoneViewGetCallIdByState, &callStateData );
   101             EPhoneViewGetCallIdByState, &callStateData );
   107             
   102         // No held call.
   108         if ( callStateData.CallId() == KErrNotFound ) 
   103         if ( callStateData.CallId() == KErrNotFound ) 
   109             {
   104             {
   110             // No hold call, find the disconnected call
   105             // find the disconnected call.
   111             callStateData.SetCallState( EPEStateDisconnecting );                    
   106             callStateData.SetCallState( EPEStateDisconnecting );
   112             iViewCommandHandle->HandleCommandL(
   107             iViewCommandHandle->HandleCommandL(
   113             EPhoneViewGetCallIdByState, &callStateData );    
   108             EPhoneViewGetCallIdByState, &callStateData );    
   114             }
   109             }
   115         }
   110         }
   116 
       
   117     iCallId = callStateData.CallId();
   111     iCallId = callStateData.CallId();
   118     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   112     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   119       
   113       
   120     }
   114     }
   121 
   115 
   149     TKeyCode aCode )
   143     TKeyCode aCode )
   150     {
   144     {
   151     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::HandleKeyMessageL()");
   145     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::HandleKeyMessageL()");
   152     switch ( aCode )
   146     switch ( aCode )
   153         {
   147         {
   154         // send-key
   148         case EKeyYes: // send-key
   155         case EKeyYes:
       
   156             if( IsNumberEntryUsedL() )
   149             if( IsNumberEntryUsedL() )
   157                 {
   150                 {
   158                 if ( IsVideoCallActiveL() )
   151                 if ( IsVideoCallActiveL() )
   159                     {
   152                     {
   160                     HBufC *phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize );
   153                     HBufC *phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize );
   166                         &stringParam );
   159                         &stringParam );
   167                     iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ) ;
   160                     iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ) ;
   168                                             
   161                                             
   169                     if (  iStateMachine->PhoneEngineInfo()->PhoneNumberIsServiceCode() ||
   162                     if (  iStateMachine->PhoneEngineInfo()->PhoneNumberIsServiceCode() ||
   170                           phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
   163                           phoneNumber->Des().Length() < KPhoneValidPhoneNumberLength )
   171                         {  
   164                         {
   172                         // Send a manual control sequence by providing number 
       
   173                         // information with dial command
       
   174                         CallFromNumberEntryL();
   165                         CallFromNumberEntryL();
   175                         }
   166                         }
   176                     else
   167                     else
   177                         {
   168                         {
   178                         iStateMachine->SendPhoneEngineMessage( 
   169                         iStateMachine->SendPhoneEngineMessage( 
   180                         }
   171                         }
   181                     CleanupStack::PopAndDestroy( phoneNumber ); 
   172                     CleanupStack::PopAndDestroy( phoneNumber ); 
   182                     }
   173                     }
   183                 else
   174                 else
   184                     {
   175                     {
   185                     // Provide number information with dial command
       
   186                     CallFromNumberEntryL();
   176                     CallFromNumberEntryL();
   187                     }
   177                     }
   188                 }
   178                 }
   189             else
   179             else
   190                 {
   180                 {
   191                 ToggleHoldL();                    
   181                 ToggleHoldL();
   192                 }
   182                 }
   193             break;
   183             break;
   194             
   184             
   195         default:
   185         default:
   196             // do base operation
       
   197             CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode );
   186             CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode );
   198             break;
   187             break;
   199         }
   188         }
   200     }
   189     }
   201 
   190 
   253 //
   242 //
   254 EXPORT_C TBool CPhoneSingleCall::HandleCommandL( TInt aCommand )
   243 EXPORT_C TBool CPhoneSingleCall::HandleCommandL( TInt aCommand )
   255     {
   244     {
   256     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::HandleCommandL()");
   245     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::HandleCommandL()");
   257     TBool commandStatus = ETrue;
   246     TBool commandStatus = ETrue;
   258 
       
   259     switch( aCommand )
   247     switch( aCommand )
   260         {
   248         {
   261         /* Flow through */           
   249         /* Flow through */           
   262         case EPhoneInCallCmdHold:
   250         case EPhoneInCallCmdHold:
   263         case EPhoneInCallCmdUnhold:
   251         case EPhoneInCallCmdUnhold:
   264             ToggleHoldL();
   252             ToggleHoldL();
   265             break;
   253             break;
   266             
   254             
   267         case EPhoneInCallCmdNewCall:
       
   268             break;
       
   269             
       
   270         case EPhoneInCallCmdNewCallCall:
       
   271             break;
       
   272 
       
   273         case EPhoneInCallCmdSwitchToVideo:
   255         case EPhoneInCallCmdSwitchToVideo:
   274             SwitchToVideoL();
   256             SwitchToVideoL();
   275             break;
       
   276             
       
   277         case EPhoneInCallCmdSwitchToVoice:
       
   278             SwitchToVoiceL();
       
   279             break;
   257             break;
   280             
   258             
   281         case EPhoneCmdYesSwitchToVideo:
   259         case EPhoneCmdYesSwitchToVideo:
   282             // Set current call id
   260             // Set current call id
   283             iStateMachine->SetCallId( iCallId );
   261             iStateMachine->SetCallId( iCallId );
   284             iStateMachine->SendPhoneEngineMessage(
   262             iStateMachine->SendPhoneEngineMessage(
   285                 CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );
   263                 CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );
   286             break;
   264             break;
   287         
   265         
   288         /* Flow through */ 
   266         /* Flow through */ 
       
   267         case EPhoneInCallCmdNewCall:
       
   268         case EPhoneInCallCmdNewCallCall:
       
   269         case EPhoneInCallCmdSwitchToVoice:
   289         case EPhoneCmdNoSwitchToVideo:
   270         case EPhoneCmdNoSwitchToVideo:
   290         case EPhoneCmdNoSwitchToVoice:
   271         case EPhoneCmdNoSwitchToVoice:
   291             break;        
   272             break;        
   292                 
   273                 
   293         case EPhoneCmdYesSwitchToVoice:
   274         case EPhoneCmdYesSwitchToVoice:
   294             // Set current call id
   275             // Set current call id.
   295             iStateMachine->SetCallId( iCallId );
   276             iStateMachine->SetCallId( iCallId );
   296                         if( IsVideoCall( iCallId ) )
   277             if( IsVideoCall( iCallId ) )
   297                         {
   278                 {
   298                            // Video call can be released only after we get response to VT Shutdown Command
   279                 // Video call can be released only after we get response to VT Shutdown Command
   299                            CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain,
   280                 CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( 
   300                                                                                       KCatPhoneToVideotelCommands, 
   281                        KMediatorVideoTelephonyDomain,
   301                                                                                       EVtCmdReleaseDataport,
   282                        KCatPhoneToVideotelCommands, 
   302                                                                                       TVersion( KPhoneToVideotelCmdVersionMajor,
   283                        EVtCmdReleaseDataport,
   303                                                                                             KPhoneToVideotelCmdVersionMinor, 
   284                        TVersion( KPhoneToVideotelCmdVersionMajor,
   304                                                                                             KPhoneToVideotelCmdVersionBuild ),
   285                              KPhoneToVideotelCmdVersionMinor, 
   305                                                                                       KNullDesC8,
   286                              KPhoneToVideotelCmdVersionBuild ),
   306                                                                                       CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) );
   287                        KNullDesC8,
   307                         }
   288                        CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) );
   308                         else
   289                 }
   309                         {
   290             else
   310                           iStateMachine->SendPhoneEngineMessage(
   291                 {
   311                               CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );                    
   292                 iStateMachine->SendPhoneEngineMessage(
   312                         }
   293                   CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );
       
   294                 }
   313             break;
   295             break;
   314 
   296 
   315         case EPhoneVideoSharing:
   297         case EPhoneVideoSharing:
   316         case EPhoneVideoSharingOpt2:
   298         case EPhoneVideoSharingOpt2:
   317         case EPhoneVideoSharingOpt3:
   299         case EPhoneVideoSharingOpt3:
   318             {
   300             {
   319             TPhoneCmdParamInteger command;
   301             TPhoneCmdParamInteger command;
   320             command.SetInteger( aCommand );
   302             command.SetInteger( aCommand );
   321             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendAiwCommand, 
   303             iViewCommandHandle->ExecuteCommandL( 
   322                 &command );                
   304                     EPhoneViewSendAiwCommand, 
       
   305                     &command );
   323             }
   306             }
   324             break;           
   307             break;
   325             
   308             
   326         default:
   309         default:
   327             commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand );
   310             commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand );
   328             break;
   311             break;
   329         }
   312         }
   330 
       
   331     return commandStatus;
   313     return commandStatus;
   332     }
   314     }
   333 
   315 
   334 // -----------------------------------------------------------
   316 // -----------------------------------------------------------
   335 // CPhoneSingleCall::CallId
   317 // CPhoneSingleCall::CallId
   336 // -----------------------------------------------------------
   318 // -----------------------------------------------------------
   337 //
   319 //
   338 EXPORT_C TInt CPhoneSingleCall::CallId() const
   320 EXPORT_C TInt CPhoneSingleCall::CallId() const
   339     {
   321     {
   340     return iCallId;
   322     return iCallId;
   341     }
       
   342 
       
   343 // -----------------------------------------------------------
       
   344 // CPhoneSingleCall::OpenVideoCallMenuBarL
       
   345 // -----------------------------------------------------------
       
   346 //
       
   347 void CPhoneSingleCall::OpenVideoCallMenuBarL()
       
   348     {
       
   349     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleCall::OpenVideoCallMenuBarL()");
       
   350                    
       
   351     }
   323     }
   352     
   324     
   353 // -----------------------------------------------------------
   325 // -----------------------------------------------------------
   354 // CPhoneSingleCall::HandleHeldL
   326 // CPhoneSingleCall::HandleHeldL
   355 // -----------------------------------------------------------
   327 // -----------------------------------------------------------
   372         CCoeEnv::Static() );        
   344         CCoeEnv::Static() );        
   373     callHeaderParam.SetLabelText( labelText );
   345     callHeaderParam.SetLabelText( labelText );
   374  
   346  
   375     iViewCommandHandle->ExecuteCommandL( 
   347     iViewCommandHandle->ExecuteCommandL( 
   376         EPhoneViewUpdateBubble, aCallId, &callHeaderParam );
   348         EPhoneViewUpdateBubble, aCallId, &callHeaderParam );
   377        
   349     
   378     // Set Hold flag to view
       
   379     TPhoneCmdParamBoolean holdFlag;
   350     TPhoneCmdParamBoolean holdFlag;
   380     holdFlag.SetBoolean( ETrue );
   351     holdFlag.SetBoolean( ETrue );
   381     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   352     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   382         
       
   383     if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
       
   384         { 
       
   385         HandleHoldNoteL( aCallId , ETrue );
       
   386         }
       
   387 
   353 
   388     UpdateInCallCbaL();
   354     UpdateInCallCbaL();
   389     SetTouchPaneButtons( EPhoneIncallHeldButtons );
   355     SetTouchPaneButtons( EPhoneIncallHeldButtons );
   390     }
   356     }
   391     
   357     
   395 //
   361 //
   396 void CPhoneSingleCall::HandleConnectedL( TInt aCallId )
   362 void CPhoneSingleCall::HandleConnectedL( TInt aCallId )
   397     {
   363     {
   398     __LOGMETHODSTARTEND( EPhoneUIStates, 
   364     __LOGMETHODSTARTEND( EPhoneUIStates, 
   399         "CPhoneSingleCall::HandleConnectedL()");
   365         "CPhoneSingleCall::HandleConnectedL()");
   400     
       
   401     // Show bubble
       
   402     TPhoneCmdParamCallHeaderData callHeaderParam;
   366     TPhoneCmdParamCallHeaderData callHeaderParam;
   403     callHeaderParam.SetCallState( EPEStateConnected );
   367     callHeaderParam.SetCallState( EPEStateConnected );
   404     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   368     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   405         &callHeaderParam );
   369         &callHeaderParam );
   406     
   370     
   408     TPhoneCmdParamBoolean holdFlag;
   372     TPhoneCmdParamBoolean holdFlag;
   409     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &holdFlag );
   373     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &holdFlag );
   410         
   374         
   411     if ( holdFlag.Boolean() )
   375     if ( holdFlag.Boolean() )
   412         {
   376         {
   413         // Update hold flag to view
       
   414         holdFlag.SetBoolean( EFalse );
   377         holdFlag.SetBoolean( EFalse );
   415         iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   378         iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   416         
       
   417         if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
       
   418             {
       
   419             HandleHoldNoteL( aCallId , EFalse );
       
   420             }
       
   421         }
   379         }
   422 
   380 
   423     UpdateInCallCbaL();  
   381     UpdateInCallCbaL();  
   424     SetTouchPaneButtons( EPhoneIncallButtons );
   382     SetTouchPaneButtons( EPhoneIncallButtons );
   425     }
   383     }
   460 //
   418 //
   461 void CPhoneSingleCall::HandleIncomingL( TInt aCallId )
   419 void CPhoneSingleCall::HandleIncomingL( TInt aCallId )
   462     {
   420     {
   463     __LOGMETHODSTARTEND( EPhoneUIStates, 
   421     __LOGMETHODSTARTEND( EPhoneUIStates, 
   464         "CPhoneSingleCall::HandleIncomingL()");
   422         "CPhoneSingleCall::HandleIncomingL()");
   465     
       
   466     BeginUiUpdateLC();
   423     BeginUiUpdateLC();
   467     
   424     
       
   425     // Get allow waiting call header param value.
   468     TPhoneCmdParamBoolean dialerParam;
   426     TPhoneCmdParamBoolean dialerParam;
   469     dialerParam.SetBoolean( ETrue );
   427     dialerParam.SetBoolean( ETrue );
   470     
   428     AllowShowingOfWaitingCallHeaderL( dialerParam );
   471     // Get allow waiting call header param value.
   429     
   472     AllowShowingOfWaitingCallHeaderL( dialerParam );    
       
   473 
       
   474     // Display incoming call
       
   475     DisplayIncomingCallL( aCallId, dialerParam );
   430     DisplayIncomingCallL( aCallId, dialerParam );
   476     
       
   477     // Show incoming call buttons
       
   478     SetTouchPaneButtons( EPhoneWaitingCallButtons ); 
   431     SetTouchPaneButtons( EPhoneWaitingCallButtons ); 
   479     
   432     
   480     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   433     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   481             && !CPhoneCenRepProxy::Instance()->
   434             && !CPhoneCenRepProxy::Instance()->
   482             IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) 
   435             IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) 
   507     if ( iSwitchToVideoQuery )
   460     if ( iSwitchToVideoQuery )
   508         {
   461         {
   509         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
   462         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
   510         }
   463         }
   511     
   464     
   512     // Go to incoming state
       
   513     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   465     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   514     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   466     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   515     }
   467     }
   516     
   468     
   517 // -----------------------------------------------------------
   469 // -----------------------------------------------------------
   522     TInt aCallId, 
   474     TInt aCallId, 
   523     const TPhoneCmdParamBoolean aCommandParam )
   475     const TPhoneCmdParamBoolean aCommandParam )
   524     {
   476     {
   525     __LOGMETHODSTARTEND( EPhoneUIStates, 
   477     __LOGMETHODSTARTEND( EPhoneUIStates, 
   526         "CPhoneSingleCall::DisplayIncomingCallL()");
   478         "CPhoneSingleCall::DisplayIncomingCallL()");
   527 
       
   528     // Cannot delete active note, e.g. New call query, 
   479     // Cannot delete active note, e.g. New call query, 
   529     // but show waiting note with or without caller name
   480     // but show waiting note with or without caller name
   530     if ( IsAnyQueryActiveL() || 
   481     if ( IsAnyQueryActiveL() || !aCommandParam.Boolean() )
   531         ( !aCommandParam.Boolean() && iOnScreenDialer ) )
   482         {
   532         {
   483         CallWaitingNoteL( aCallId );
   533         CallWaitingNoteL( aCallId );        
       
   534         }
   484         }
   535     else
   485     else
   536         {
   486         {
   537         // Remove any phone dialogs if they are displayed
       
   538         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   487         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   539         }
   488         }
   540     
   489     
   541     // Indicate that the Phone needs to be sent to the background if
   490     // Indicate that the Phone needs to be sent to the background if
   542     // an application other than the top application is in the foreground
   491     // an application other than the top application is in the foreground
   544     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   493     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   545     iViewCommandHandle->ExecuteCommandL( 
   494     iViewCommandHandle->ExecuteCommandL( 
   546         EPhoneViewSetNeedToSendToBackgroundStatus,
   495         EPhoneViewSetNeedToSendToBackgroundStatus,
   547         &booleanParam );
   496         &booleanParam );
   548 
   497 
   549     // Bring Phone app in the foreground
       
   550     TPhoneCmdParamInteger uidParam;
   498     TPhoneCmdParamInteger uidParam;
   551     uidParam.SetInteger( KUidPhoneApplication.iUid );
   499     uidParam.SetInteger( KUidPhoneApplication.iUid );
   552     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   500     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   553         &uidParam );
   501         &uidParam );
   554 
       
   555     // Set Phone as the top application
       
   556     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
   502     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication,
   557         &uidParam );
   503         &uidParam );
   558 
       
   559     DisplayHeaderForCallComingInL( aCallId, ETrue ); //waiting call 
   504     DisplayHeaderForCallComingInL( aCallId, ETrue ); //waiting call 
   560     }    
   505     }    
   561 // -----------------------------------------------------------
   506 // -----------------------------------------------------------
   562 // CPhoneSingleCall::HandleDiallingL
   507 // CPhoneSingleCall::HandleDiallingL
   563 // -----------------------------------------------------------
   508 // -----------------------------------------------------------
   565 void CPhoneSingleCall::HandleDiallingL( TInt aCallId )
   510 void CPhoneSingleCall::HandleDiallingL( TInt aCallId )
   566     {
   511     {
   567     __LOGMETHODSTARTEND( EPhoneUIStates, 
   512     __LOGMETHODSTARTEND( EPhoneUIStates, 
   568         "CPhoneSingleCall::HandleDiallingL()");
   513         "CPhoneSingleCall::HandleDiallingL()");
   569     BeginUiUpdateLC();
   514     BeginUiUpdateLC();
   570     
       
   571     SetNumberEntryVisibilityL(EFalse);
   515     SetNumberEntryVisibilityL(EFalse);
   572 
       
   573     // Display call setup 
       
   574     DisplayCallSetupL( aCallId );
   516     DisplayCallSetupL( aCallId );
   575     
       
   576     // Show incoming call buttons
       
   577     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   517     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   578 
       
   579     EndUiUpdate();
   518     EndUiUpdate();
   580 
   519     
   581     // Go to call setup state
       
   582     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   520     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
   583     iStateMachine->ChangeState( EPhoneStateCallSetupInSingle );
   521     iStateMachine->ChangeState( EPhoneStateCallSetupInSingle );
   584     }
   522     }
   585     
   523     
   586 // -----------------------------------------------------------
   524 // -----------------------------------------------------------
   589 //
   527 //
   590 void CPhoneSingleCall::DisplayCallSetupL( TInt aCallId )
   528 void CPhoneSingleCall::DisplayCallSetupL( TInt aCallId )
   591     {
   529     {
   592     __LOGMETHODSTARTEND( EPhoneUIStates, 
   530     __LOGMETHODSTARTEND( EPhoneUIStates, 
   593         "CPhoneSingleCall::DisplayCallSetupL()");
   531         "CPhoneSingleCall::DisplayCallSetupL()");
   594 
       
   595     // Remove dialogs if necessary
       
   596     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   532     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   597 
       
   598     // Capture keys when the phone is dialling
       
   599     CaptureKeysDuringCallNotificationL( ETrue );
       
   600 
       
   601     // Force telephony to the foreground
       
   602     TPhoneCmdParamInteger uidParam;
   533     TPhoneCmdParamInteger uidParam;
   603     uidParam.SetInteger( KUidPhoneApplication.iUid );
   534     uidParam.SetInteger( KUidPhoneApplication.iUid );
   604     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   535     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   605         &uidParam );
   536         &uidParam );
   606 
   537 
   607     // Display call setup header
       
   608     DisplayHeaderForOutgoingCallL( aCallId );
   538     DisplayHeaderForOutgoingCallL( aCallId );
   609     }
   539     }
   610 
   540 
   611 // -----------------------------------------------------------
   541 // -----------------------------------------------------------
   612 // CPhoneSingleCall::SwitchToVideoL
   542 // CPhoneSingleCall::SwitchToVideoL
   614 //
   544 //
   615 void CPhoneSingleCall::SwitchToVideoL()
   545 void CPhoneSingleCall::SwitchToVideoL()
   616     {
   546     {
   617     __LOGMETHODSTARTEND( EPhoneUIStates, 
   547     __LOGMETHODSTARTEND( EPhoneUIStates, 
   618         "CPhoneSingleCall::SwitchToVideoL()");
   548         "CPhoneSingleCall::SwitchToVideoL()");
   619 
       
   620     if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   549     if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   621         {        
   550         {        
   622         TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo,
   551         TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo,
   623             KNWTelephonyNetworkMode ) );
   552             KNWTelephonyNetworkMode ) );
   624         TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory,
   553         TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory,
   625             conn::KUidBackupRestoreKey ));
   554             conn::KUidBackupRestoreKey ));
   626         
       
   627         if ( networkMode != ENWNetworkModeWcdma )
   555         if ( networkMode != ENWNetworkModeWcdma )
   628             {
   556             {
   629             // We aren't in 3G, video call not possible
   557             // We aren't in 3G, video call not possible
   630             SendGlobalInfoNoteL( EPhoneInformationNoNetworkSupportForVideoCallNote );    
   558             SendGlobalInfoNoteL( EPhoneInformationNoNetworkSupportForVideoCallNote );    
   631             }
   559             }
   632         else if ( restoreOngoing & ( conn::EBURRestoreFull | conn::EBURRestorePartial ))
   560         else if ( restoreOngoing & ( conn::EBURRestoreFull | conn::EBURRestorePartial ))
   633             {
   561             {
   634             // MC restore ongoing
       
   635             SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote );
   562             SendGlobalInfoNoteL( EPhoneInformationVideoCallNotAllowedDuringRestoreNote );
   636             }
   563             }
   637         else
   564         else
   638             {
   565             {
   639             iSwitchToVideoQuery = ETrue;
   566             iSwitchToVideoQuery = ETrue;
   640             //ShowQueryL( EPhoneSwitchToVideoQuery );
       
   641             iSwitchToVideoQuery = EFalse;
   567             iSwitchToVideoQuery = EFalse;
   642             }    
   568             }    
   643         }
   569         }
   644     }
   570     }
   645 
   571 
   646 // -----------------------------------------------------------
       
   647 // CPhoneSingleCall::SwitchToVoiceL
       
   648 // -----------------------------------------------------------
       
   649 //
       
   650 void CPhoneSingleCall::SwitchToVoiceL()
       
   651     {
       
   652     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   653         "CPhoneSingleCall::SwitchToVoiceL()");
       
   654     
       
   655     //ShowQueryL( EPhoneSwitchToVoiceQuery );
       
   656     }
       
   657 
   572 
   658 // End of File
   573 // End of File