phoneapp/phoneuistates/src/cphoneconferenceandsingleandwaiting.cpp
branchRCL_3
changeset 15 2a26698d78ba
parent 14 24062c24fe38
child 25 91c2fb4b78df
equal deleted inserted replaced
14:24062c24fe38 15:2a26698d78ba
    30 #include "tphonecmdparamcallstatedata.h"
    30 #include "tphonecmdparamcallstatedata.h"
    31 #include "cphonemainresourceresolver.h"
    31 #include "cphonemainresourceresolver.h"
    32 #include "phonerssbase.h"
    32 #include "phonerssbase.h"
    33 #include "tphonecmdparamglobalnote.h"
    33 #include "tphonecmdparamglobalnote.h"
    34 #include "phoneui.hrh"
    34 #include "phoneui.hrh"
    35 #include "mphonestorage.h"
       
    36 #include "cphonecenrepproxy.h"
       
    37 #include <telephonyvariant.hrh>
       
    38 
    35 
    39 // ================= MEMBER FUNCTIONS =======================
    36 // ================= MEMBER FUNCTIONS =======================
    40 
    37 
    41 // C++ default constructor can NOT contain any code, that
    38 // C++ default constructor can NOT contain any code, that
    42 // might leave.
    39 // might leave.
   294         }
   291         }
   295   
   292   
   296     SetTouchPaneButtons( EPhoneWaitingCallButtons ); 
   293     SetTouchPaneButtons( EPhoneWaitingCallButtons ); 
   297     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   294     SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   298     
   295     
   299     // Check if HW Keys or Call UI should be disabled
       
   300     CheckDisableHWKeysAndCallUIL();
       
   301 
       
   302     // Go to Conference And Waiting state
   296     // Go to Conference And Waiting state
   303     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   297     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   304     iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting );
   298     iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting );
   305     }
   299     }
   306 
   300 
   311 void CPhoneConferenceAndSingleAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt /*aCallId*/ )
   305 void CPhoneConferenceAndSingleAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt /*aCallId*/ )
   312     {
   306     {
   313     __LOGMETHODSTARTEND( EPhoneUIStates, 
   307     __LOGMETHODSTARTEND( EPhoneUIStates, 
   314         "CPhoneConferenceAndSingleAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
   308         "CPhoneConferenceAndSingleAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
   315 
   309 
   316     if( /*FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
       
   317         */ 1 &&  iStateMachine->PhoneStorage()->IsScreenLocked() )
       
   318         {
       
   319         EnableCallUIL();
       
   320         }
       
   321     
       
   322     // Reset blocked keys list
       
   323     iStateMachine->PhoneStorage()->ResetBlockedKeysList();
       
   324     
       
   325     if ( !IsNumberEntryUsedL() )
   310     if ( !IsNumberEntryUsedL() )
   326         {
   311         {
   327         // Close menu bar, if number entry isnt open.
   312         // Close menu bar, if number entry isnt open.
   328         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );       
   313         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );       
   329         }
   314         }
   417             
   402             
   418         default:
   403         default:
   419             // do base operation
   404             // do base operation
   420             CPhoneConferenceAndSingle::HandleKeyMessageL( aMessage, aCode );
   405             CPhoneConferenceAndSingle::HandleKeyMessageL( aMessage, aCode );
   421             break;
   406             break;
   422         }
       
   423     }
       
   424 
       
   425 // -----------------------------------------------------------
       
   426 // CPhoneConferenceAndSingleAndWaiting::HandleKeyEventL
       
   427 // -----------------------------------------------------------
       
   428 //
       
   429 void CPhoneConferenceAndSingleAndWaiting::HandleKeyEventL(
       
   430     const TKeyEvent& aKeyEvent,
       
   431     TEventCode aEventCode )
       
   432     {
       
   433     if( EKeyDeviceF == aKeyEvent.iCode )
       
   434         {
       
   435         __PHONELOG( EBasic, EPhoneUIStates,
       
   436             "CPhoneConferenceAndSingleAndWaiting::HandleKeyMessageL-deviceF" );
       
   437         HandleHoldSwitchL();
       
   438         }
   407         }
   439     }
   408     }
   440 
   409 
   441 // -----------------------------------------------------------
   410 // -----------------------------------------------------------
   442 // CPhoneConferenceAndSingleAndWaiting::HandleErrorL
   411 // CPhoneConferenceAndSingleAndWaiting::HandleErrorL
   507                 CaptureKeysDuringCallNotificationL( ETrue );    
   476                 CaptureKeysDuringCallNotificationL( ETrue );    
   508                 
   477                 
   509                 // Go to Incoming state
   478                 // Go to Incoming state
   510                 iCbaManager->UpdateIncomingCbaL( callStateData.CallId() );
   479                 iCbaManager->UpdateIncomingCbaL( callStateData.CallId() );
   511 
   480 
   512                 // Check if HW Keys or Call UI should be disabled
       
   513                 CheckDisableHWKeysAndCallUIL();
       
   514                 
       
   515                 SetTouchPaneButtons( EPhoneIncomingCallButtons );
   481                 SetTouchPaneButtons( EPhoneIncomingCallButtons );
   516                 UpdateSilenceButtonDimming();
   482                 UpdateSilenceButtonDimming();
   517                 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   483                 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   518                 SetRingingTonePlaybackL( callStateData.CallId() );      
   484                 SetRingingTonePlaybackL( callStateData.CallId() );      
   519                 SetToolbarDimming( ETrue );
   485                 SetToolbarDimming( ETrue );
   532             // Go to Single And Waiting state
   498             // Go to Single And Waiting state
   533             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   499             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   534             SetTouchPaneButtons( EPhoneWaitingCallButtons );        
   500             SetTouchPaneButtons( EPhoneWaitingCallButtons );        
   535             SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   501             SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer );
   536 
   502 
   537             // Check if HW Keys or Call UI should be disabled
       
   538             CheckDisableHWKeysAndCallUIL();
       
   539 
       
   540             iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   503             iStateMachine->ChangeState( EPhoneStateWaitingInSingle );        
   541             }
   504             }
   542             break;
   505             break;
   543          case ETwoActiveCalls:
   506          case ETwoActiveCalls:
   544             {
   507             {
   545             // Go to Two Singles And Waiting state
   508             // Go to Two Singles And Waiting state
   546             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   509             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   547 
       
   548             // Check if HW Keys or Call UI should be disabled
       
   549             CheckDisableHWKeysAndCallUIL();
       
   550 
   510 
   551             SetTouchPaneButtons( EPhoneWaitingCallButtons );        
   511             SetTouchPaneButtons( EPhoneWaitingCallButtons );        
   552             iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
   512             iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
   553             }
   513             }
   554             break;
   514             break;