phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 69 8baf28733c3d
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
    55 // (other items were commented in a header).
    55 // (other items were commented in a header).
    56 // -----------------------------------------------------------
    56 // -----------------------------------------------------------
    57 //
    57 //
    58 CPhoneConferenceAndSingle::~CPhoneConferenceAndSingle()
    58 CPhoneConferenceAndSingle::~CPhoneConferenceAndSingle()
    59     {
    59     {
       
    60     // Need to check iViewCommandHandle validity here to not
       
    61     // trigger a high/can panic error in a Codescanner run.
       
    62     // coverity[var_compare_op]
       
    63     if ( iViewCommandHandle )
       
    64         {
       
    65         TPhoneCmdParamBoolean dtmfSendFlag;
       
    66         dtmfSendFlag.SetBoolean( EFalse );
       
    67         TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
       
    68     	    &dtmfSendFlag ) );     	
       
    69         }
    60     }
    70     }
    61 
    71 
    62 // -----------------------------------------------------------
    72 // -----------------------------------------------------------
    63 // CPhoneConferenceAndSingle::ConstructL()
    73 // CPhoneConferenceAndSingle::ConstructL()
    64 // Constructor
    74 // Constructor
    66 // -----------------------------------------------------------
    76 // -----------------------------------------------------------
    67 //
    77 //
    68 void CPhoneConferenceAndSingle::ConstructL()
    78 void CPhoneConferenceAndSingle::ConstructL()
    69     {
    79     {
    70     CPhoneConference::ConstructL();
    80     CPhoneConference::ConstructL();
       
    81     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
    71     }
    82     }
    72 
    83 
    73 // -----------------------------------------------------------
    84 // -----------------------------------------------------------
    74 // CPhoneConferenceAndSingle::NewL()
    85 // CPhoneConferenceAndSingle::NewL()
    75 // Constructor
    86 // Constructor
   116             
   127             
   117         case MEngineMonitor::EPEMessageHeld:
   128         case MEngineMonitor::EPEMessageHeld:
   118             HandleHeldL( aCallId );
   129             HandleHeldL( aCallId );
   119             break;
   130             break;
   120             
   131             
   121         case MEngineMonitor::EPEMessageInValidEmergencyNumber:              
   132         case MEngineMonitor::EPEMessageInValidEmergencyNumber:				
   122             SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue );                       
   133 	 		SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );  	 					
   123             break;
   134             break;
   124             
   135             
   125         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   136         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   126             DialVoiceCallL();
   137             DialVoiceCallL();
   127             break;                          
   138             break;        	 				
   128            
   139            
   129         case MEngineMonitor::EPEMessageAddedConferenceMember:
   140         case MEngineMonitor::EPEMessageAddedConferenceMember:
   130             HandleAddedConferenceMemberL( aCallId );
   141             HandleAddedConferenceMemberL( aCallId );
   131             break;
   142             break;
   132             
   143             
   153             HandleSendL();
   164             HandleSendL();
   154             break;
   165             break;
   155                     
   166                     
   156         case EAknSoftkeyCancel:
   167         case EAknSoftkeyCancel:
   157             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   168             commandStatus = CPhoneConference::HandleCommandL( aCommand );
       
   169             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
   158             SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   170             SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   159             break;
   171             break;
   160             
   172             
   161         case EPhoneInCallCmdJoin:
   173         case EPhoneInCallCmdJoin:
   162             iStateMachine->SendPhoneEngineMessage(
   174             iStateMachine->SendPhoneEngineMessage(
   163                 CPEPhoneModelIF::EPEMessageAddConferenceMember );
   175                 CPEPhoneModelIF::EPEMessageAddConferenceMember );
   164             break;
   176             break;
   165         
   177         
   166         case EPhoneInCallCmdParticipants:
   178         case EPhoneInCallCmdParticipants:
       
   179             commandStatus = CPhoneConference::HandleCommandL( aCommand );
       
   180             SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
   167             break;
   181             break;
   168         
   182         
   169         default:
   183         default:
   170             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   184             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   171             break;
   185             break;
   173 
   187 
   174     return commandStatus;
   188     return commandStatus;
   175     }
   189     }
   176 
   190 
   177 // -----------------------------------------------------------
   191 // -----------------------------------------------------------
       
   192 // CPhoneConferenceAndSingle::OpenMenuBarL
       
   193 // -----------------------------------------------------------
       
   194 //
       
   195 void CPhoneConferenceAndSingle::OpenMenuBarL()
       
   196     {
       
   197     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::OpenMenuBarL");
       
   198     
       
   199     // Set Conference And Single specific flag to view
       
   200     TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   201     conferenceAndSingleFlag.SetBoolean( ETrue );
       
   202     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   203     	&conferenceAndSingleFlag );
       
   204     
       
   205     // Set specific flag to view so that DTMF menu item available
       
   206     TPhoneCmdParamBoolean dtmfSendFlag;
       
   207     dtmfSendFlag.SetBoolean( ETrue );
       
   208     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
       
   209     	&dtmfSendFlag );    	
       
   210     
       
   211     TPhoneViewResponseId response;
       
   212     TPhoneCmdParamCallStateData callStateData;
       
   213     TPhoneCmdParamBoolean booleaParam;
       
   214     TInt heldCallId( KErrNotFound );
       
   215     TInt connectedCallId( KErrNotFound );
       
   216     
       
   217     // Fetch active call's id from view
       
   218     callStateData.SetCallState( EPEStateConnected );
       
   219     response = iViewCommandHandle->HandleCommandL(
       
   220         EPhoneViewGetCallIdByState, &callStateData );
       
   221     if( response != EPhoneViewResponseSuccess )
       
   222         {
       
   223         // Unsuccesfull fetch - do nothing
       
   224         return;            
       
   225         }
       
   226     connectedCallId = callStateData.CallId();
       
   227     
       
   228     // Fetch held call's id from view
       
   229     callStateData.SetCallState( EPEStateHeld );
       
   230     response = iViewCommandHandle->HandleCommandL(
       
   231         EPhoneViewGetCallIdByState, &callStateData );
       
   232     if( response != EPhoneViewResponseSuccess )
       
   233         {
       
   234         // Unsuccesfull fetch - do nothing
       
   235         return;            
       
   236         }
       
   237     heldCallId = callStateData.CallId();
       
   238 
       
   239     // Open the correct menubar according which call is active
       
   240     TInt resourceId;
       
   241     if( connectedCallId == KConferenceCallId )
       
   242         {
       
   243         if ( IsNumberEntryVisibleL() )
       
   244             {
       
   245             resourceId = EPhoneConfAndHeldCallMenubarWithNumberEntry;
       
   246             }
       
   247         else if ( IsConferenceBubbleInSelectionMode() )
       
   248             {
       
   249             resourceId = EPhoneConfCallParticipantsDropMenubar;    
       
   250             }
       
   251         else
       
   252             {
       
   253             resourceId = EPhoneConfAndHeldCallMenubar;
       
   254             }
       
   255         }
       
   256     else
       
   257         {
       
   258         if ( IsNumberEntryVisibleL() )
       
   259             {
       
   260             resourceId = EPhoneActiveAndHeldConfMenubarWithNumberEntry;
       
   261             }
       
   262         else if ( IsConferenceBubbleInSelectionMode() )
       
   263             {
       
   264             resourceId = EPhoneConfCallParticipantsDropMenubar;    
       
   265             }            
       
   266         else
       
   267             {
       
   268             resourceId = EPhoneActiveAndHeldConfMenubar;
       
   269             }            
       
   270         }
       
   271         
       
   272     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
       
   273     
       
   274     // Check that calls are the same type (f.ex. both are CS calls)
       
   275     booleaParam.SetBoolean( 
       
   276         heldCallId != KErrNotFound && connectedCallId != KErrNotFound &&
       
   277         iStateMachine->PhoneEngineInfo()->CallType( heldCallId ) != 
       
   278         iStateMachine->PhoneEngineInfo()->CallType( connectedCallId ));
       
   279 
       
   280     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConfrenceOptionsFlag, 
       
   281         &booleaParam );
       
   282 
       
   283     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   284         {
       
   285         resourceId = EPhoneDtmfDialerMenubar;
       
   286         }
       
   287     else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
       
   288         {  
       
   289         resourceId = CustomizedDialerMenuResourceIdL();         
       
   290         }
       
   291             
       
   292     TPhoneCmdParamInteger integerParam;
       
   293     integerParam.SetInteger( 
       
   294                 CPhoneMainResourceResolver::Instance()->
       
   295                 ResolveResourceID( resourceId ) );
       
   296     
       
   297     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, 
       
   298         &integerParam );
       
   299     }
       
   300 
       
   301 // -----------------------------------------------------------
   178 // CPhoneConferenceAndSingle::HandleConnectedConferenceL
   302 // CPhoneConferenceAndSingle::HandleConnectedConferenceL
   179 // -----------------------------------------------------------
   303 // -----------------------------------------------------------
   180 //
   304 //
   181 void CPhoneConferenceAndSingle::HandleConnectedConferenceL()
   305 void CPhoneConferenceAndSingle::HandleConnectedConferenceL()
   182     {
   306     {
   183     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL");
   307     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL");
   184     // Update call state
   308     // Update call state
   185     TPhoneCmdParamCallHeaderData callHeaderParam;
   309     TPhoneCmdParamCallHeaderData callHeaderParam;
   186     callHeaderParam.SetCallState( EPEStateConnectedConference );
   310     callHeaderParam.SetCallState( EPEStateConnected );
   187 
   311 
   188     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   312     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   189     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   313     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   190             ResolveResourceID( EPhoneCLIConferenceCall );
   314             ResolveResourceID( EPhoneCLIConferenceCall );
   191 
   315 
   203     BeginUiUpdateLC();
   327     BeginUiUpdateLC();
   204     iViewCommandHandle->ExecuteCommandL( 
   328     iViewCommandHandle->ExecuteCommandL( 
   205         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   329         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   206     
   330     
   207     SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   331     SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   208     UpdateInCallCbaL();
   332     
   209     EndUiUpdate();          
   333     EndUiUpdate();          
   210     }
   334     }
   211 
   335 
   212 
   336 
   213 // -----------------------------------------------------------
   337 // -----------------------------------------------------------
   218 //
   342 //
   219 void CPhoneConferenceAndSingle::HandleHeldConferenceL()
   343 void CPhoneConferenceAndSingle::HandleHeldConferenceL()
   220     {
   344     {
   221     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL");
   345     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL");
   222     TPhoneCmdParamCallHeaderData callHeaderParam;
   346     TPhoneCmdParamCallHeaderData callHeaderParam;
   223     callHeaderParam.SetCallState( EPEStateHeldConference );
   347     callHeaderParam.SetCallState( EPEStateHeld );
   224     
   348     
   225     TInt callLabelId;
   349     TInt callLabelId;
   226     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   350     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   227     callLabelId = CPhoneMainResourceResolver::Instance()->
   351     callLabelId = CPhoneMainResourceResolver::Instance()->
   228             ResolveResourceID( EPhoneCallOnHold );
   352             ResolveResourceID( EPhoneCallOnHold );
   230     StringLoader::Load( 
   354     StringLoader::Load( 
   231         labelText, 
   355         labelText, 
   232         callLabelId, 
   356         callLabelId, 
   233         CCoeEnv::Static() );        
   357         CCoeEnv::Static() );        
   234     callHeaderParam.SetLabelText( labelText );
   358     callHeaderParam.SetLabelText( labelText );
       
   359          
       
   360     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
   235 
   361 
   236     BeginUiUpdateLC();
   362     BeginUiUpdateLC();
   237      
   363      
   238     iViewCommandHandle->ExecuteCommandL( 
   364     iViewCommandHandle->ExecuteCommandL( 
   239         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   365         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   248 //
   374 //
   249 void CPhoneConferenceAndSingle::HandleConnectedL( TInt aCallId )
   375 void CPhoneConferenceAndSingle::HandleConnectedL( TInt aCallId )
   250     {
   376     {
   251     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedL");
   377     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedL");
   252     
   378     
       
   379     UpdateInCallCbaL();
       
   380     
       
   381     
   253     // Display connected bubble
   382     // Display connected bubble
   254     TPhoneCmdParamCallHeaderData callHeaderParam;
   383     TPhoneCmdParamCallHeaderData callHeaderParam;
   255     callHeaderParam.SetCallState( EPEStateConnected );
   384     callHeaderParam.SetCallState( EPEStateConnected );
   256     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   385     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   257         &callHeaderParam );
   386         &callHeaderParam );
   258 
   387     
   259     UpdateInCallCbaL();
       
   260     SetTouchPaneButtons( EPhoneConferenceButtons );
       
   261     }
   388     }
   262 
   389 
   263 // -----------------------------------------------------------
   390 // -----------------------------------------------------------
   264 // CPhoneConferenceAndSingle::HandleHeldL
   391 // CPhoneConferenceAndSingle::HandleHeldL
   265 // -----------------------------------------------------------
   392 // -----------------------------------------------------------
   280         callLabelId, 
   407         callLabelId, 
   281         CCoeEnv::Static() );        
   408         CCoeEnv::Static() );        
   282     callHeaderParam.SetLabelText( labelText );
   409     callHeaderParam.SetLabelText( labelText );
   283 
   410 
   284     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   411     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   285         &callHeaderParam );      
   412         &callHeaderParam );        
   286     
       
   287     SetTouchPaneButtons( EPhoneConferenceButtons );
       
   288     }
   413     }
   289 
   414 
   290 // -----------------------------------------------------------
   415 // -----------------------------------------------------------
   291 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL
   416 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL
   292 // -----------------------------------------------------------
   417 // -----------------------------------------------------------
   301     iViewCommandHandle->ExecuteCommandL( EPhoneViewAddToConference );
   426     iViewCommandHandle->ExecuteCommandL( EPhoneViewAddToConference );
   302     
   427     
   303     UpdateConferenceSecurityStatusL( aCallId );
   428     UpdateConferenceSecurityStatusL( aCallId );
   304 
   429 
   305     SetTouchPaneButtons( EPhoneConferenceButtons );
   430     SetTouchPaneButtons( EPhoneConferenceButtons );
       
   431     SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
   306     
   432     
   307     EndUiUpdate();
   433     EndUiUpdate();
       
   434 
       
   435     TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   436     conferenceAndSingleFlag.SetBoolean( EFalse );
       
   437     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   438     	&conferenceAndSingleFlag );
   308 
   439 
   309     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   440     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   310     iStateMachine->ChangeState( EPhoneStateConference );        
   441     iStateMachine->ChangeState( EPhoneStateConference );        
   311     }
   442     }
   312 
   443 
   326 // -----------------------------------------------------------
   457 // -----------------------------------------------------------
   327 //
   458 //
   328 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId )
   459 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId )
   329     {
   460     {
   330     __LOGMETHODSTARTEND( EPhoneUIStates, 
   461     __LOGMETHODSTARTEND( EPhoneUIStates, 
   331         "CPhoneConferenceAndSingle::HandleIncomingL");
   462             "CPhoneConferenceAndSingle::HandleIncomingL");
   332     
   463     IsNumberEntryUsedL() ? 
       
   464         BeginTransEffectLC( ECallUiAppear ) :
       
   465         BeginTransEffectLC( ENumberEntryOpen );
   333     BeginUiUpdateLC();  
   466     BeginUiUpdateLC();  
       
   467     
       
   468     // Hide the number entry if it exists
       
   469     if ( IsNumberEntryUsedL() )
       
   470         {
       
   471         SetNumberEntryVisibilityL( EFalse );
       
   472         }
   334     
   473     
   335     TPhoneCmdParamBoolean dialerParam;
   474     TPhoneCmdParamBoolean dialerParam;
   336     dialerParam.SetBoolean( ETrue );
   475     dialerParam.SetBoolean( ETrue );
   337     
   476     
   338     // Get allow waiting call header param value.
   477     // Get allow waiting call header param value.
   339     AllowShowingOfWaitingCallHeaderL( dialerParam );
   478     AllowShowingOfWaitingCallHeaderL( dialerParam );
   340     
   479     
       
   480     // Close conference list
       
   481     TPhoneCmdParamBoolean booleanParam;
       
   482     booleanParam.SetBoolean( EFalse );
       
   483     iViewCommandHandle->ExecuteCommandL( 
       
   484     	EPhoneViewOpenConferenceList, &booleanParam );
       
   485 
   341     iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
   486     iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
   342     
   487     
   343     // Check if HW Keys or Call UI should be disabled
   488     // Set touch controls
   344     CheckDisableHWKeysAndCallUIL();
   489     SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
   345     
   490 
       
   491     SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   492         
   346     // Display incoming call
   493     // Display incoming call
   347     DisplayIncomingCallL( aCallId, dialerParam  );
   494     DisplayIncomingCallL( aCallId, dialerParam  );
   348 
   495 
   349     // Set touch controls
       
   350     SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   351     
       
   352     EndUiUpdate();
   496     EndUiUpdate();
       
   497     EndTransEffect();
       
   498     TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   499     conferenceAndSingleFlag.SetBoolean( EFalse );
       
   500     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   501     	&conferenceAndSingleFlag );
   353     
   502     
   354     // Go to Conference And Single And Waiting state
   503     // Go to Conference And Single And Waiting state
   355     UpdateCbaL( EPhoneCallHandlingIncomingRejectCBA );
   504     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   356     iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );                
   505     iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );                
   357     }
   506     }
   358 
   507 
   359 // -----------------------------------------------------------
   508 // -----------------------------------------------------------
   360 // CPhoneConferenceAndSingle::HandleIdleL
   509 // CPhoneConferenceAndSingle::HandleIdleL
   361 // -----------------------------------------------------------
   510 // -----------------------------------------------------------
   362 //
   511 //
   363 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId )
   512 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId )
   364     {
   513     {
   365     __LOGMETHODSTARTEND( EPhoneUIStates, 
   514     __LOGMETHODSTARTEND( EPhoneUIStates, 
   366         "CPhoneConferenceAndSingle::HandleIdleL");
   515     	"CPhoneConferenceAndSingle::HandleIdleL");
       
   516     
       
   517     // If dialler is not open then close menu bar.
       
   518     if ( !IsNumberEntryUsedL() )
       
   519         {
       
   520         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   521         }
   367     
   522     
   368     TPhoneCmdParamBoolean conferenceExistsForCallId;
   523     TPhoneCmdParamBoolean conferenceExistsForCallId;
   369     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   524     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   370         aCallId, &conferenceExistsForCallId );
   525         aCallId, &conferenceExistsForCallId );
   371     
   526     
   372     if( conferenceExistsForCallId.Boolean() )
   527     if( conferenceExistsForCallId.Boolean() )
   373         {
   528         {
   374         // Remove conference member from conference bubble
   529         // Remove conference member from conference bubble
   375         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, 
   530         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, 
   376             aCallId );                    
   531             aCallId );                    
       
   532 
       
   533         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
   377         }
   534         }
   378     else
   535     else
   379         {       
   536         {       
   380         // Remove call
   537         // Remove call
   381         BeginUiUpdateLC(); 
   538         BeginUiUpdateLC(); 
   382         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   539         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   383 
   540 
   384         SetTouchPaneButtons( EPhoneConferenceButtons );
   541 	    TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   542 	    conferenceAndSingleFlag.SetBoolean( EFalse );
       
   543 	    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   544 	    	&conferenceAndSingleFlag );
   385         
   545         
   386         UpdateCbaL( EPhoneCallHandlingInCallCBA );
   546 	    TPhoneCmdParamBoolean participantsVisibleFlag;
       
   547 	    iViewCommandHandle->ExecuteCommandL( EPhoneViewGetConferenceListVisibleFlag,
       
   548 	            &participantsVisibleFlag );
       
   549 	    
       
   550 	    // if participants list is visible - do not change buttons or cba
       
   551 	    if( !participantsVisibleFlag.Boolean() )
       
   552 	        {
       
   553 	        // Go to Conference state
       
   554 	        SetTouchPaneButtons( EPhoneConferenceButtons );
       
   555 	        SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );  
       
   556 	        
       
   557 	        UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   558 	        }
   387       
   559       
   388 
   560 
   389         EndUiUpdate();
   561         EndUiUpdate();
   390 
   562 
   391         iStateMachine->ChangeState( EPhoneStateConference );
   563         iStateMachine->ChangeState( EPhoneStateConference );
   403     
   575     
   404     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   576     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   405     
   577     
   406     TPhoneCmdParamInteger intParam;
   578     TPhoneCmdParamInteger intParam;
   407     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls,
   579     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls,
   408         &intParam );
   580     	&intParam );
   409         
   581     	
   410     switch( intParam.Integer() )
   582     switch( intParam.Integer() )
   411         {
   583 	    {
   412         case EOneActiveCall:
   584 	    case EOneActiveCall:
   413             MakeStateTransitionToSingleL();
   585 	    	MakeStateTransitionToSingleL();
   414             break;
   586 	    	break;
   415             
   587 	    	
   416         case ETwoActiveCalls: // Fall through
   588 	    case ETwoActiveCalls: // Fall through
   417         default:
   589 	    default:
   418             MakeStateTransitionToTwoSinglesL();
   590 	    	MakeStateTransitionToTwoSinglesL();
   419             break;
   591 	    	break;
   420         }
   592 	    }
   421     }
   593     }
   422 
   594 
   423 // --------------------------------------------------------------
   595 // --------------------------------------------------------------
   424 // CPhoneConferenceAndSingle::HandleKeyMessageL
   596 // CPhoneConferenceAndSingle::HandleKeyMessageL
   425 // --------------------------------------------------------------
   597 // --------------------------------------------------------------
   433     switch ( aCode )
   605     switch ( aCode )
   434         {
   606         {
   435         // send-key
   607         // send-key
   436         case EKeyYes:
   608         case EKeyYes:
   437             if( IsNumberEntryVisibleL() )
   609             if( IsNumberEntryVisibleL() )
   438                 {
   610 				{
   439                 HandleSendL();
   611                 HandleSendL();
   440                 }
   612                 }
   441             else
   613  			else
   442                 {
   614 	 			{
   443                 // Number entry is below so swap the call
   615                 // Number entry is below so swap the call
   444                 iStateMachine->SendPhoneEngineMessage(
   616                 iStateMachine->SendPhoneEngineMessage(
   445                     CPEPhoneModelIF::EPEMessageSwap );        
   617                 	CPEPhoneModelIF::EPEMessageSwap );        
   446                 }
   618 	 			}
   447             break;
   619             break;
   448             
   620             
   449         default:
   621         default:
   450             // do base operation
   622             // do base operation
   451             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   623             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   482         }
   654         }
   483     else
   655     else
   484         {
   656         {
   485         iStateMachine->SendPhoneEngineMessage( 
   657         iStateMachine->SendPhoneEngineMessage( 
   486             MPEPhoneModel::EPEMessageCheckEmergencyNumber );
   658             MPEPhoneModel::EPEMessageCheckEmergencyNumber );
   487         }   
   659         } 	
   488     CleanupStack::PopAndDestroy( phoneNumber );
   660     CleanupStack::PopAndDestroy( phoneNumber );
   489     }
   661     }
   490 
   662 
       
   663 // -----------------------------------------------------------
       
   664 // CPhoneConferenceAndSingle::DisconnectCallL
       
   665 // -----------------------------------------------------------
       
   666 //
       
   667 void CPhoneConferenceAndSingle::DisconnectCallL()
       
   668     {
       
   669     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConferenceAndSingle::DisconnectCallL( ) ");
       
   670     // Fetch active call's id from view
       
   671     TPhoneCmdParamCallStateData callStateData;
       
   672     callStateData.SetCallState( EPEStateConnected );
       
   673     iViewCommandHandle->HandleCommandL(
       
   674         EPhoneViewGetCallIdByState, &callStateData );
       
   675   
       
   676     if( callStateData.CallId() > KErrNotFound  && callStateData.CallId() == KConferenceCallId )
       
   677         {
       
   678         iStateMachine->SendPhoneEngineMessage(
       
   679                       CPEPhoneModelIF::EPEMessageHangUpConference );  
       
   680         }
       
   681     else
       
   682         {
       
   683         CPhoneState::DisconnectCallL();
       
   684         }
       
   685     }
       
   686 
   491 // End of File
   687 // End of File