phoneapp/phoneuistates/src/cphoneconferenceandcallsetup.cpp
changeset 56 5bcb308bd24d
parent 45 6b911d05207e
child 65 2a5d4ab426d3
equal deleted inserted replaced
46:bc5a64e5bc3c 56:5bcb308bd24d
    50 // (other items were commented in a header).
    50 // (other items were commented in a header).
    51 // -----------------------------------------------------------
    51 // -----------------------------------------------------------
    52 //
    52 //
    53 CPhoneConferenceAndCallSetup::~CPhoneConferenceAndCallSetup()
    53 CPhoneConferenceAndCallSetup::~CPhoneConferenceAndCallSetup()
    54     {
    54     {
    55     // Reset flag
       
    56     if ( iViewCommandHandle )
       
    57         {
       
    58         TPhoneCmdParamBoolean dtmfSendFlag;
       
    59         dtmfSendFlag.SetBoolean( EFalse );
       
    60         iViewCommandHandle->ExecuteCommand( EPhoneViewSetDtmfOptionsFlag, 
       
    61             &dtmfSendFlag );
       
    62         }
       
    63     }
    55     }
    64 
    56 
    65 // -----------------------------------------------------------
    57 // -----------------------------------------------------------
    66 // CPhoneConferenceAndCallSetup::ConstructL()
    58 // CPhoneConferenceAndCallSetup::ConstructL()
    67 // Constructor
    59 // Constructor
   142     
   134     
   143     switch( aCommand )
   135     switch( aCommand )
   144         {   
   136         {   
   145         case EPhoneDtmfDialerCancel:
   137         case EPhoneDtmfDialerCancel:
   146             {
   138             {
   147             CloseDTMFEditorL();
       
   148             }
   139             }
   149             break;    
   140             break;    
   150     
   141     
   151         default:
   142         default:
   152             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   143             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   185             // do base operation
   176             // do base operation
   186             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   177             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   187             break;
   178             break;
   188         }
   179         }
   189     }
   180     }
   190 // -----------------------------------------------------------
       
   191 // CPhoneConferenceAndCallSetup::OpenMenuBarL
       
   192 // -----------------------------------------------------------
       
   193 //
       
   194 void CPhoneConferenceAndCallSetup::OpenMenuBarL()
       
   195     {
       
   196     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::OpenMenuBarL()");
       
   197     TInt resourceId;
       
   198     
       
   199     // Set specific flag to view so that DTMF menu item available
       
   200     TPhoneCmdParamBoolean dtmfSendFlag;
       
   201     dtmfSendFlag.SetBoolean( ETrue );
       
   202     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
       
   203         &dtmfSendFlag );
       
   204      
       
   205     if ( iOnScreenDialer &&  IsDTMFEditorVisibleL() )
       
   206         {
       
   207         resourceId = EPhoneDtmfDialerMenubar;
       
   208         }
       
   209     else if ( IsNumberEntryVisibleL() )
       
   210         {
       
   211         resourceId = EPhoneAlertingAndConfHeldCallMenuBarWithNumberEntry;
       
   212         }
       
   213     else if ( IsConferenceBubbleInSelectionMode() )
       
   214         {
       
   215         resourceId = EPhoneConfCallParticipantsDropMenubar;    
       
   216         }        
       
   217     else
       
   218         {
       
   219         resourceId = EPhoneAlertingAndConfHeldCallMenuBar;
       
   220         }
       
   221 
       
   222     TPhoneCmdParamInteger integerParam;
       
   223     integerParam.SetInteger( 
       
   224                 CPhoneMainResourceResolver::Instance()->
       
   225                 ResolveResourceID( resourceId ) );
       
   226         
       
   227     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, 
       
   228         &integerParam );
       
   229     }
       
   230 
   181 
   231 // -----------------------------------------------------------
   182 // -----------------------------------------------------------
   232 // CPhoneConferenceAndCallSetup::HandleConnectingL
   183 // CPhoneConferenceAndCallSetup::HandleConnectingL
   233 // -----------------------------------------------------------
   184 // -----------------------------------------------------------
   234 //
   185 //
   250 
   201 
   251     // Stop capturing keys
   202     // Stop capturing keys
   252     CaptureKeysDuringCallNotificationL( EFalse );
   203     CaptureKeysDuringCallNotificationL( EFalse );
   253 
   204 
   254     // Remove the number entry if it isn't DTMF dialer
   205     // Remove the number entry if it isn't DTMF dialer
   255     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || ! IsDTMFEditorVisibleL() )
   206     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   256         {
   207         {
   257         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   208         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   258         }
   209         }
   259     
   210     
   260     // Set Hold flag to view EFalse that IHF is on RSK not unhold
   211     // Set Hold flag to view EFalse that IHF is on RSK not unhold
   278 // -----------------------------------------------------------
   229 // -----------------------------------------------------------
   279 //
   230 //
   280 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId )
   231 void CPhoneConferenceAndCallSetup::HandleConnectedL( TInt aCallId )
   281     {
   232     {
   282     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()");
   233     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndCallSetup::HandleConnectedL()");
   283     
       
   284     // Close menu bar, if it is displayed
       
   285     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   286     
   234     
   287     // Keep Phone in the foreground
   235     // Keep Phone in the foreground
   288     TPhoneCmdParamBoolean booleanParam;
   236     TPhoneCmdParamBoolean booleanParam;
   289     booleanParam.SetBoolean( EFalse );
   237     booleanParam.SetBoolean( EFalse );
   290     iViewCommandHandle->ExecuteCommandL( 
   238     iViewCommandHandle->ExecuteCommandL( 
   301     // Capturing keys and number entry must be removed because some
   249     // Capturing keys and number entry must be removed because some
   302     // networks jump over connecting state directly to connected state.
   250     // networks jump over connecting state directly to connected state.
   303     CaptureKeysDuringCallNotificationL( EFalse );
   251     CaptureKeysDuringCallNotificationL( EFalse );
   304     
   252     
   305     // Remove the number entry if it isn't DTMF dialer
   253     // Remove the number entry if it isn't DTMF dialer
   306     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() || ! IsDTMFEditorVisibleL() )
   254     if ( !iOnScreenDialer || !IsNumberEntryVisibleL() )
   307         {
   255         {
   308         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   256         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry );
   309         }
   257         }
   310     
   258     
   311     SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
   259     SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
   312     SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
       
   313     EndUiUpdate(); 
   260     EndUiUpdate(); 
   314     
   261     
   315     UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA );
   262     UpdateCbaL ( EPhoneCallHandlingNewCallSwapCBA );
   316    
   263    
   317     iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                     
   264     iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                     
   331     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   278     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   332         &globalNotifierParam );
   279         &globalNotifierParam );
   333 
   280 
   334     // Stop capturing keys
   281     // Stop capturing keys
   335     CaptureKeysDuringCallNotificationL( EFalse );
   282     CaptureKeysDuringCallNotificationL( EFalse );
   336 
       
   337     // Close menu bar, if it is displayed
       
   338     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   339 
   283 
   340     TPhoneCmdParamBoolean conferenceExistsForCallId;
   284     TPhoneCmdParamBoolean conferenceExistsForCallId;
   341     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   285     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   342         aCallId, &conferenceExistsForCallId );
   286         aCallId, &conferenceExistsForCallId );
   343     
   287     
   373             }
   317             }
   374         }
   318         }
   375     else
   319     else
   376         {       
   320         {       
   377         // Remove  outgoing call 
   321         // Remove  outgoing call 
   378         BeginTransEffectLC( ENumberEntryOpen );
       
   379         BeginUiUpdateLC();
   322         BeginUiUpdateLC();
   380         
   323         
   381         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   324         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   382         
   325         
   383         CheckIfRestoreNEContentAfterDtmfDialer();
   326         CheckIfRestoreNEContentAfterDtmfDialer();
   388             SetNumberEntryVisibilityL(ETrue);
   331             SetNumberEntryVisibilityL(ETrue);
   389             }
   332             }
   390             
   333             
   391         SetTouchPaneButtons( EPhoneConferenceButtons );
   334         SetTouchPaneButtons( EPhoneConferenceButtons );
   392         EndUiUpdate();
   335         EndUiUpdate();
   393         EndTransEffect(); 
       
   394 
   336 
   395         // Go to conference state
   337         // Go to conference state
   396         UpdateCbaL( EPhoneCallHandlingInCallCBA );
   338         UpdateCbaL( EPhoneCallHandlingInCallCBA );
   397         iStateMachine->ChangeState( EPhoneStateConference );
   339         iStateMachine->ChangeState( EPhoneStateConference );
   398         } 
   340         }