phoneapp/phoneuistates/src/cphonesinglecall.cpp
changeset 21 92ab7f8d0eab
parent 0 5f000ab63145
child 22 6bb1b21d2484
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
    23 #include <featmgr.h>
    23 #include <featmgr.h>
    24 #include <pevirtualengine.h>
    24 #include <pevirtualengine.h>
    25 #include <mpeengineinfo.h>
    25 #include <mpeengineinfo.h>
    26 #include <cpephonemodelif.h>
    26 #include <cpephonemodelif.h>
    27 #include <connect/sbdefs.h>
    27 #include <connect/sbdefs.h>
       
    28 // <-- QT PHONE START --> 
    28 #include <videotelcontrolmediatorapi.h>
    29 #include <videotelcontrolmediatorapi.h>
       
    30 // <-- QT PHONE END --> 
    29 #include <MediatorDomainUIDs.h>
    31 #include <MediatorDomainUIDs.h>
    30 #include <TelephonyVariant.hrh>
    32 #include <telephonyvariant.hrh>
    31 
    33 
    32 #include "cphonesinglecall.h"
    34 #include "cphonesinglecall.h"
    33 #include "tphonecmdparamstring.h"
    35 #include "tphonecmdparamstring.h"
    34 #include "tphonecmdparamboolean.h"
    36 #include "tphonecmdparamboolean.h"
    35 #include "tphonecmdparamcallheaderdata.h"
    37 #include "tphonecmdparamcallheaderdata.h"
   118     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   120     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   119 
   121 
   120     
   122     
   121     // Update phone number availability for menu use
   123     // Update phone number availability for menu use
   122     PhoneNumberAvailableInPhoneEngineL( callStateData.CallId() );
   124     PhoneNumberAvailableInPhoneEngineL( callStateData.CallId() );
   123 	  
   125       
   124     }
   126     }
   125 
   127 
   126 // -----------------------------------------------------------
   128 // -----------------------------------------------------------
   127 // CPhoneSingleCall::NewL()
   129 // CPhoneSingleCall::NewL()
   128 // Constructor
   130 // Constructor
   299             break;        
   301             break;        
   300                 
   302                 
   301         case EPhoneCmdYesSwitchToVoice:
   303         case EPhoneCmdYesSwitchToVoice:
   302             // Set current call id
   304             // Set current call id
   303             iStateMachine->SetCallId( iCallId );
   305             iStateMachine->SetCallId( iCallId );
   304 						if( IsVideoCall( iCallId ) )
   306                         if( IsVideoCall( iCallId ) )
   305 						{
   307                         {
   306 						   // Video call can be released only after we get response to VT Shutdown Command
   308                            // Video call can be released only after we get response to VT Shutdown Command
   307 						   CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain,
   309 // <-- QT PHONE START -->
   308 						                                                              KCatPhoneToVideotelCommands, 
   310  
   309 						                                                              EVtCmdReleaseDataport,
   311                            CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( KMediatorVideoTelephonyDomain,
   310 						                                                              TVersion( KPhoneToVideotelCmdVersionMajor,
   312                                                                                       KCatPhoneToVideotelCommands, 
   311 						            	                                                    KPhoneToVideotelCmdVersionMinor, 
   313                                                                                       EVtCmdReleaseDataport,
   312 						            	                                                    KPhoneToVideotelCmdVersionBuild ),
   314                                                                                       TVersion( KPhoneToVideotelCmdVersionMajor,
   313 						                                                              KNullDesC8,
   315                                                                                             KPhoneToVideotelCmdVersionMinor, 
   314 						                                                              CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) );
   316                                                                                             KPhoneToVideotelCmdVersionBuild ),
   315 						}
   317                                                                                       KNullDesC8,
   316 						else
   318                                                                                       CPhoneSwitchToVideoOrVoiceCommand::NewL( *iStateMachine ) );
   317 						{
   319 
   318 						  iStateMachine->SendPhoneEngineMessage(
   320 // <-- QT PHONE END --> 
   319 						      CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );					
   321                         }
   320 						}
   322                         else
       
   323                         {
       
   324                           iStateMachine->SendPhoneEngineMessage(
       
   325                               CPEPhoneModelIF::EPEMessageSwitchToVideoOrVoice );                    
       
   326                         }
   321             break;
   327             break;
   322 
   328 
   323         case EPhoneVideoSharing:
   329         case EPhoneVideoSharing:
   324         case EPhoneVideoSharingOpt2:
   330         case EPhoneVideoSharingOpt2:
   325         case EPhoneVideoSharingOpt3:
   331         case EPhoneVideoSharingOpt3:
   429         { 
   435         { 
   430         HandleHoldNoteL( aCallId , ETrue );
   436         HandleHoldNoteL( aCallId , ETrue );
   431         }
   437         }
   432 
   438 
   433     UpdateInCallCbaL();
   439     UpdateInCallCbaL();
       
   440 // <-- QT PHONE START -->
       
   441     SetTouchPaneButtons( EPhoneIncallHeldButtons );
       
   442 // <-- QT PHONE END -->
   434     }
   443     }
   435     
   444     
   436 // -----------------------------------------------------------
   445 // -----------------------------------------------------------
   437 // CPhoneSingleCall::HandleConnectedL
   446 // CPhoneSingleCall::HandleConnectedL
   438 // -----------------------------------------------------------
   447 // -----------------------------------------------------------
   463             HandleHoldNoteL( aCallId , EFalse );
   472             HandleHoldNoteL( aCallId , EFalse );
   464             }
   473             }
   465         }
   474         }
   466 
   475 
   467     UpdateInCallCbaL();  
   476     UpdateInCallCbaL();  
       
   477 // <-- QT PHONE START -->
       
   478     SetTouchPaneButtons( EPhoneIncallButtons );
       
   479 // <-- QT PHONE END -->
   468     }
   480     }
   469     
   481     
   470 // -----------------------------------------------------------
   482 // -----------------------------------------------------------
   471 // CPhoneSingleCall::ToggleHold
   483 // CPhoneSingleCall::ToggleHold
   472 // -----------------------------------------------------------
   484 // -----------------------------------------------------------
   473 //
   485 //
   474 void CPhoneSingleCall::ToggleHoldL()
   486 void CPhoneSingleCall::ToggleHoldL()
   475     {
   487     {
   476     __LOGMETHODSTARTEND( EPhoneUIStates, 
   488     __LOGMETHODSTARTEND( EPhoneUIStates, 
   477         "CPhoneSingleCall::ToggleHoldL()");
   489         "CPhoneSingleCall::ToggleHoldL()");
   478     TPhoneCmdParamBoolean hold;
   490 
   479     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &hold );
   491     // <-- QT PHONE START --> 
   480    
   492     TPECallControlCaps callControlCaps =
   481     if( hold.Boolean() )
   493         iStateMachine->PhoneEngineInfo()->CallControlCaps( iCallId );
   482         {
   494     
   483         SetCallResumeL();
   495     if ( callControlCaps & MCCECallObserver::ECCECapsHold  )
       
   496         {
       
   497         iStateMachine->SetCallId( iCallId );         
       
   498         iStateMachine->SendPhoneEngineMessage( 
       
   499             CPEPhoneModelIF::EPEMessageHold );    
       
   500         }
       
   501     else if ( callControlCaps & MCCECallObserver::ECCECapsResume )
       
   502         {
       
   503         iStateMachine->SetCallId( iCallId );         
       
   504         iStateMachine->SendPhoneEngineMessage( 
       
   505             CPEPhoneModelIF::EPEMessageResume );    
   484         }
   506         }
   485     else
   507     else
   486         {
   508         {
   487         SetCallHoldL();
   509         SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed );    
   488         }
   510         }
       
   511     // <-- QT PHONE END -->
   489     }
   512     }
   490         
   513         
   491 // -----------------------------------------------------------
   514 // -----------------------------------------------------------
   492 // CPhoneSingleCall::HandleIncomingL
   515 // CPhoneSingleCall::HandleIncomingL
   493 // -----------------------------------------------------------
   516 // -----------------------------------------------------------
   504     
   527     
   505     // Get allow waiting call header param value.
   528     // Get allow waiting call header param value.
   506     AllowShowingOfWaitingCallHeaderL( dialerParam );    
   529     AllowShowingOfWaitingCallHeaderL( dialerParam );    
   507 
   530 
   508     // Close fast swap window if it's displayed
   531     // Close fast swap window if it's displayed
   509     CEikonEnv::Static()->DismissTaskList();
   532 // <-- QT PHONE START --> 
   510 
   533 //    CEikonEnv::Static()->DismissTaskList();
   511     // Show incoming call buttons
   534  
   512     SetTouchPaneButtons( EPhoneWaitingCallButtons );    
       
   513 
   535 
   514     // Display incoming call
   536     // Display incoming call
   515     DisplayIncomingCallL( aCallId, dialerParam );
   537     DisplayIncomingCallL( aCallId, dialerParam );
   516 
   538     
       
   539     // Show incoming call buttons
       
   540     SetTouchPaneButtons( EPhoneWaitingCallButtons ); 
       
   541 // <-- QT PHONE END -->
       
   542     
   517     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   543     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
   518             && !CPhoneCenRepProxy::Instance()->
   544             && !CPhoneCenRepProxy::Instance()->
   519             IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) 
   545             IsTelephonyFeatureSupported( KTelephonyLVFlagAllowUnlockOnIncoming ) 
   520             && ( IsKeyLockOn() || IsAutoLockOn() ) )
   546             && ( IsKeyLockOn() || IsAutoLockOn() ) )
   521         {
   547         {
   534             IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) 
   560             IsTelephonyFeatureSupported( KTelephonyLVFlagDisableCallControlHardKeysWhileLocked ) 
   535             && ( IsKeyLockOn() || IsAutoLockOn() ) )
   561             && ( IsKeyLockOn() || IsAutoLockOn() ) )
   536         {
   562         {
   537         DisableHWKeysL();
   563         DisableHWKeysL();
   538         }
   564         }
   539     
   565         
   540     EndUiUpdate();
   566     EndUiUpdate();
   541 
   567 
   542     // This query is required to dismiss
   568     // This query is required to dismiss
   543     // Operation cannot be completed in waiting and single state
   569     // Operation cannot be completed in waiting and single state
   544     if ( iSwitchToVideoQuery )
   570     if ( iSwitchToVideoQuery )
   634     
   660     
   635     BeginTransEffectLC( ENumberEntryClose );
   661     BeginTransEffectLC( ENumberEntryClose );
   636     BeginUiUpdateLC();
   662     BeginUiUpdateLC();
   637     
   663     
   638     SetNumberEntryVisibilityL(EFalse);
   664     SetNumberEntryVisibilityL(EFalse);
       
   665 
       
   666     //QT PHONE START
       
   667     // Display call setup 
       
   668     DisplayCallSetupL( aCallId );
   639     
   669     
   640     // Show incoming call buttons
   670     // Show incoming call buttons
   641     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   671     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   642 
   672     //QT PHONE END
   643     // Display call setup 
       
   644     DisplayCallSetupL( aCallId );
       
   645 
   673 
   646     EndUiUpdate();
   674     EndUiUpdate();
   647     
   675     
   648     EndTransEffect();
   676     EndTransEffect();
   649 
   677 
   741     {
   769     {
   742     __LOGMETHODSTARTEND( EPhoneUIStates, 
   770     __LOGMETHODSTARTEND( EPhoneUIStates, 
   743         "CPhoneSingleCall::SwitchToVideoL()");
   771         "CPhoneSingleCall::SwitchToVideoL()");
   744 
   772 
   745     if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   773     if( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
   746     	{        
   774         {        
   747         TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo,
   775         TInt networkMode( CPhonePubSubProxy::Instance()->Value( KPSUidNetworkInfo,
   748             KNWTelephonyNetworkMode ) );
   776             KNWTelephonyNetworkMode ) );
   749         TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory,
   777         TBool restoreOngoing( CPhonePubSubProxy::Instance()->Value( KUidSystemCategory,
   750             conn::KUidBackupRestoreKey ));
   778             conn::KUidBackupRestoreKey ));
   751     
   779