phoneapp/phoneuistates/src/cphonesinglecall.cpp
branchRCL_3
changeset 58 40a3f856b14d
parent 39 b8d67d6176f5
child 61 41a7f70b3818
equal deleted inserted replaced
57:94dc1107e8b2 58:40a3f856b14d
   120                     KScreenSaverAllowScreenSaver,
   120                     KScreenSaverAllowScreenSaver,
   121                     EPhoneScreensaverAllowed );
   121                     EPhoneScreensaverAllowed );
   122     
   122     
   123     // Update phone number availability for menu use
   123     // Update phone number availability for menu use
   124     PhoneNumberAvailableInPhoneEngineL( callStateData.CallId() );
   124     PhoneNumberAvailableInPhoneEngineL( callStateData.CallId() );
   125 	  
       
   126     }
   125     }
   127 
   126 
   128 // -----------------------------------------------------------
   127 // -----------------------------------------------------------
   129 // CPhoneSingleCall::NewL()
   128 // CPhoneSingleCall::NewL()
   130 // Constructor
   129 // Constructor
   227         case MEngineMonitor::EPEMessageIncoming:
   226         case MEngineMonitor::EPEMessageIncoming:
   228             HandleIncomingL( aCallId );
   227             HandleIncomingL( aCallId );
   229             break;
   228             break;
   230                 
   229                 
   231         case MEngineMonitor::EPEMessageDialing:
   230         case MEngineMonitor::EPEMessageDialing:
   232             HandleDiallingL( aCallId );
   231             HandleDialingL( aCallId );
   233             break;
   232             break;
   234         
   233         
   235         /* Flow through */ 
   234         /* Flow through */ 
   236         case MEngineMonitor::EPEMessageRemoteTerminated:  
   235         case MEngineMonitor::EPEMessageRemoteTerminated:  
   237         case MEngineMonitor::EPEMessageDisconnecting:
   236         case MEngineMonitor::EPEMessageDisconnecting:
   501     
   500     
   502     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   501     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   503                     KPSUidScreenSaver,
   502                     KPSUidScreenSaver,
   504                     KScreenSaverAllowScreenSaver,
   503                     KScreenSaverAllowScreenSaver,
   505                     EPhoneScreensaverNotAllowed );
   504                     EPhoneScreensaverNotAllowed );
   506     
   505     IsNumberEntryUsedL() ? 
       
   506         BeginTransEffectLC( ECallUiAppear ) :
       
   507         BeginTransEffectLC( ENumberEntryOpen );
   507     BeginUiUpdateLC();
   508     BeginUiUpdateLC();
   508     
   509     
   509     // Hide the number entry if it exists
   510     // Hide the number entry if it exists
   510     if ( IsNumberEntryUsedL() )
   511     if ( IsNumberEntryUsedL() )
   511         {
   512         {
   517     
   518     
   518     // Get allow waiting call header param value.
   519     // Get allow waiting call header param value.
   519     AllowShowingOfWaitingCallHeaderL( dialerParam );    
   520     AllowShowingOfWaitingCallHeaderL( dialerParam );    
   520 
   521 
   521     // Close fast swap window if it's displayed
   522     // Close fast swap window if it's displayed
   522     CEikonEnv::Static()->DismissTaskList();
   523     EikonEnv()->DismissTaskList();
   523 
   524 
   524     // Show incoming call buttons
   525     // Show incoming call buttons
   525     SetTouchPaneButtons( EPhoneWaitingCallButtons );    
   526     SetTouchPaneButtons( EPhoneWaitingCallButtons );    
   526 
   527 
   527     // Display incoming call
   528     // Display incoming call
   528     DisplayIncomingCallL( aCallId, dialerParam );
   529     DisplayIncomingCallL( aCallId, dialerParam );
   529 
   530 
   530     EndUiUpdate();
   531     EndUiUpdate();
   531 
   532     EndTransEffect();
   532     // This query is required to dismiss
   533     // This query is required to dismiss
   533     // Operation cannot be completed in waiting and single state
   534     // Operation cannot be completed in waiting and single state
   534     if ( iSwitchToVideoQuery )
   535     if ( iSwitchToVideoQuery )
   535         {
   536         {
   536         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
   537         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery );
   537         }
   538         }
   538     
       
   539     // Go to incoming state
       
   540     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   539     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   541     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   540     iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   542     }
   541     }
   543     
   542     
   544 // -----------------------------------------------------------
   543 // -----------------------------------------------------------
   545 // CPhoneSingleCall::DisplayIncomingCallL
   544 // CPhoneSingleCall::DisplayIncomingCallL
   546 // -----------------------------------------------------------
   545 // -----------------------------------------------------------
   547 //
   546 //
   548 void CPhoneSingleCall::DisplayIncomingCallL( 
   547 void CPhoneSingleCall::DisplayIncomingCallL( 
   549     TInt aCallId, 
   548     TInt aCallId, 
   550     const TPhoneCmdParamBoolean aCommandParam )
   549     const TPhoneCmdParamBoolean /*aCommandParam*/ )
   551     {
   550     {
   552     __LOGMETHODSTARTEND( EPhoneUIStates, 
   551     __LOGMETHODSTARTEND( EPhoneUIStates, 
   553         "CPhoneSingleCall::DisplayIncomingCallL()");
   552         "CPhoneSingleCall::DisplayIncomingCallL()");
   554     // Close menu bar, if it is displayed
   553     // Close menu bar, if it is displayed
   555     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   554     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   563         iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote );
   562         iViewCommandHandle->ExecuteCommandL( EPhoneViewDisableKeyLockWithoutNote );
   564         }
   563         }
   565     
   564     
   566     // Indicate that the Phone needs to be sent to the background if
   565     // Indicate that the Phone needs to be sent to the background if
   567     // an application other than the top application is in the foreground
   566     // an application other than the top application is in the foreground
   568     TPhoneCmdParamBoolean booleanParam;
   567     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   569     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
   568     
   570     iViewCommandHandle->ExecuteCommandL( 
       
   571         EPhoneViewSetNeedToReturnToForegroundAppStatus,
       
   572         &booleanParam );
       
   573 
       
   574     // Bring Phone app in the foreground
   569     // Bring Phone app in the foreground
   575     TPhoneCmdParamInteger uidParam;
   570     TPhoneCmdParamInteger uidParam;
   576     uidParam.SetInteger( KUidPhoneApplication.iUid );
   571     uidParam.SetInteger( KUidPhoneApplication.iUid );
   577     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   572     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   578         &uidParam );
   573         &uidParam );
   608     
   603     
   609     DialVoiceCallL();
   604     DialVoiceCallL();
   610     }
   605     }
   611 
   606 
   612 // -----------------------------------------------------------
   607 // -----------------------------------------------------------
   613 // CPhoneSingleCall::HandleDiallingL
   608 // CPhoneSingleCall::HandleDialingL
   614 // -----------------------------------------------------------
   609 // -----------------------------------------------------------
   615 //
   610 //
   616 void CPhoneSingleCall::HandleDiallingL( TInt aCallId )
   611 void CPhoneSingleCall::HandleDialingL( TInt aCallId )
   617     {
   612     {
   618     __LOGMETHODSTARTEND( EPhoneUIStates, 
   613     __LOGMETHODSTARTEND( EPhoneUIStates, 
   619         "CPhoneSingleCall::HandleDiallingL()");
   614         "CPhoneSingleCall::HandleDialingL()");
   620     
   615     
   621     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   616     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   622                     KPSUidScreenSaver,
   617                     KPSUidScreenSaver,
   623                     KScreenSaverAllowScreenSaver,
   618                     KScreenSaverAllowScreenSaver,
   624                     EPhoneScreensaverNotAllowed );
   619                     EPhoneScreensaverNotAllowed );
   625     
   620     // Display call setup 
   626     BeginUiUpdateLC();
   621     DisplayCallSetupL( aCallId );
   627     
   622     iStateMachine->ChangeState( EPhoneStateCallSetupInSingle );
   628     SetNumberEntryVisibilityL(EFalse);
   623     }
   629     
   624 
       
   625 // -----------------------------------------------------------
       
   626 // CPhoneSingleCall::DoStateSpecificCallSetUpDefinitionsL
       
   627 // -----------------------------------------------------------
       
   628 //
       
   629 EXPORT_C void CPhoneSingleCall::DoStateSpecificCallSetUpDefinitionsL()
       
   630     {
   630     // Show incoming call buttons
   631     // Show incoming call buttons
   631     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   632     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   632 
       
   633     // Display call setup 
       
   634     DisplayCallSetupL( aCallId );
       
   635 
       
   636     EndUiUpdate();
       
   637 
       
   638     // Go to call setup state
       
   639     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
       
   640     iStateMachine->ChangeState( EPhoneStateCallSetupInSingle );
       
   641     }
       
   642     
       
   643 // -----------------------------------------------------------
       
   644 // CPhoneSingleCall::DisplayCallSetupL
       
   645 // -----------------------------------------------------------
       
   646 //
       
   647 void CPhoneSingleCall::DisplayCallSetupL( TInt aCallId )
       
   648     {
       
   649     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   650         "CPhoneSingleCall::DisplayCallSetupL()");
       
   651     // Close menu bar, if it is displayed
       
   652     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   653 
       
   654     // Remove dialogs if necessary
       
   655     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
       
   656 
       
   657     // Capture keys when the phone is dialling
       
   658     CaptureKeysDuringCallNotificationL( ETrue );
       
   659 
       
   660     // Force telephony to the foreground
       
   661     TPhoneCmdParamInteger uidParam;
       
   662     uidParam.SetInteger( KUidPhoneApplication.iUid );
       
   663     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
       
   664         &uidParam );
       
   665 
       
   666     // Display call setup header
       
   667     DisplayHeaderForOutgoingCallL( aCallId );
       
   668     }
   633     }
   669 
   634 
   670 // -----------------------------------------------------------
   635 // -----------------------------------------------------------
   671 // CPhoneSingleCall::SetCallHoldL
   636 // CPhoneSingleCall::SetCallHoldL
   672 // -----------------------------------------------------------
   637 // -----------------------------------------------------------