phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp
branchRCL_3
changeset 61 41a7f70b3818
parent 58 40a3f856b14d
child 62 5266b1f337bd
equal deleted inserted replaced
58:40a3f856b14d 61:41a7f70b3818
    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         }
       
    70     }
    60     }
    71 
    61 
    72 // -----------------------------------------------------------
    62 // -----------------------------------------------------------
    73 // CPhoneConferenceAndSingle::ConstructL()
    63 // CPhoneConferenceAndSingle::ConstructL()
    74 // Constructor
    64 // Constructor
    76 // -----------------------------------------------------------
    66 // -----------------------------------------------------------
    77 //
    67 //
    78 void CPhoneConferenceAndSingle::ConstructL()
    68 void CPhoneConferenceAndSingle::ConstructL()
    79     {
    69     {
    80     CPhoneConference::ConstructL();
    70     CPhoneConference::ConstructL();
    81     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
       
    82     }
    71     }
    83 
    72 
    84 // -----------------------------------------------------------
    73 // -----------------------------------------------------------
    85 // CPhoneConferenceAndSingle::NewL()
    74 // CPhoneConferenceAndSingle::NewL()
    86 // Constructor
    75 // Constructor
   127             
   116             
   128         case MEngineMonitor::EPEMessageHeld:
   117         case MEngineMonitor::EPEMessageHeld:
   129             HandleHeldL( aCallId );
   118             HandleHeldL( aCallId );
   130             break;
   119             break;
   131             
   120             
   132         case MEngineMonitor::EPEMessageInValidEmergencyNumber:				
   121         case MEngineMonitor::EPEMessageInValidEmergencyNumber:              
   133 	 		SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed );  	 					
   122             SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue );                       
   134             break;
   123             break;
   135             
   124             
   136         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   125         case MEngineMonitor::EPEMessageValidEmergencyNumber:
   137             DialVoiceCallL();
   126             DialVoiceCallL();
   138             break;        	 				
   127             break;                          
   139            
   128            
   140         case MEngineMonitor::EPEMessageAddedConferenceMember:
   129         case MEngineMonitor::EPEMessageAddedConferenceMember:
   141             HandleAddedConferenceMemberL( aCallId );
   130             HandleAddedConferenceMemberL( aCallId );
   142             break;
   131             break;
   143             
   132             
   164             HandleSendL();
   153             HandleSendL();
   165             break;
   154             break;
   166                     
   155                     
   167         case EAknSoftkeyCancel:
   156         case EAknSoftkeyCancel:
   168             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   157             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   169             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
       
   170             SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   158             SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   171             break;
   159             break;
   172             
   160             
   173         case EPhoneInCallCmdJoin:
   161         case EPhoneInCallCmdJoin:
   174             iStateMachine->SendPhoneEngineMessage(
   162             iStateMachine->SendPhoneEngineMessage(
   175                 CPEPhoneModelIF::EPEMessageAddConferenceMember );
   163                 CPEPhoneModelIF::EPEMessageAddConferenceMember );
   176             break;
   164             break;
   177         
   165         
   178         case EPhoneInCallCmdParticipants:
   166         case EPhoneInCallCmdParticipants:
   179             commandStatus = CPhoneConference::HandleCommandL( aCommand );
       
   180             SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
       
   181             break;
   167             break;
   182         
   168         
   183         default:
   169         default:
   184             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   170             commandStatus = CPhoneConference::HandleCommandL( aCommand );
   185             break;
   171             break;
   186         }
   172         }
   187 
   173 
   188     return commandStatus;
   174     return commandStatus;
   189     }
       
   190 
       
   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     }
   175     }
   300 
   176 
   301 // -----------------------------------------------------------
   177 // -----------------------------------------------------------
   302 // CPhoneConferenceAndSingle::HandleConnectedConferenceL
   178 // CPhoneConferenceAndSingle::HandleConnectedConferenceL
   303 // -----------------------------------------------------------
   179 // -----------------------------------------------------------
   305 void CPhoneConferenceAndSingle::HandleConnectedConferenceL()
   181 void CPhoneConferenceAndSingle::HandleConnectedConferenceL()
   306     {
   182     {
   307     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL");
   183     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL");
   308     // Update call state
   184     // Update call state
   309     TPhoneCmdParamCallHeaderData callHeaderParam;
   185     TPhoneCmdParamCallHeaderData callHeaderParam;
   310     callHeaderParam.SetCallState( EPEStateConnected );
   186     callHeaderParam.SetCallState( EPEStateConnectedConference );
   311 
   187 
   312     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   188     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   313     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   189     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   314             ResolveResourceID( EPhoneCLIConferenceCall );
   190             ResolveResourceID( EPhoneCLIConferenceCall );
   315 
   191 
   327     BeginUiUpdateLC();
   203     BeginUiUpdateLC();
   328     iViewCommandHandle->ExecuteCommandL( 
   204     iViewCommandHandle->ExecuteCommandL( 
   329         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   205         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   330     
   206     
   331     SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   207     SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
   332     
   208     UpdateInCallCbaL();
   333     EndUiUpdate();          
   209     EndUiUpdate();          
   334     }
   210     }
   335 
   211 
   336 
   212 
   337 // -----------------------------------------------------------
   213 // -----------------------------------------------------------
   342 //
   218 //
   343 void CPhoneConferenceAndSingle::HandleHeldConferenceL()
   219 void CPhoneConferenceAndSingle::HandleHeldConferenceL()
   344     {
   220     {
   345     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL");
   221     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL");
   346     TPhoneCmdParamCallHeaderData callHeaderParam;
   222     TPhoneCmdParamCallHeaderData callHeaderParam;
   347     callHeaderParam.SetCallState( EPEStateHeld );
   223     callHeaderParam.SetCallState( EPEStateHeldConference );
   348     
   224     
   349     TInt callLabelId;
   225     TInt callLabelId;
   350     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   226     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   351     callLabelId = CPhoneMainResourceResolver::Instance()->
   227     callLabelId = CPhoneMainResourceResolver::Instance()->
   352             ResolveResourceID( EPhoneCallOnHold );
   228             ResolveResourceID( EPhoneCallOnHold );
   354     StringLoader::Load( 
   230     StringLoader::Load( 
   355         labelText, 
   231         labelText, 
   356         callLabelId, 
   232         callLabelId, 
   357         CCoeEnv::Static() );        
   233         CCoeEnv::Static() );        
   358     callHeaderParam.SetLabelText( labelText );
   234     callHeaderParam.SetLabelText( labelText );
   359          
       
   360     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
       
   361 
   235 
   362     BeginUiUpdateLC();
   236     BeginUiUpdateLC();
   363      
   237      
   364     iViewCommandHandle->ExecuteCommandL( 
   238     iViewCommandHandle->ExecuteCommandL( 
   365         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   239         EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam );
   373 // -----------------------------------------------------------
   247 // -----------------------------------------------------------
   374 //
   248 //
   375 void CPhoneConferenceAndSingle::HandleConnectedL( TInt aCallId )
   249 void CPhoneConferenceAndSingle::HandleConnectedL( TInt aCallId )
   376     {
   250     {
   377     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedL");
   251     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedL");
   378     
       
   379     UpdateInCallCbaL();
       
   380     
       
   381     
   252     
   382     // Display connected bubble
   253     // Display connected bubble
   383     TPhoneCmdParamCallHeaderData callHeaderParam;
   254     TPhoneCmdParamCallHeaderData callHeaderParam;
   384     callHeaderParam.SetCallState( EPEStateConnected );
   255     callHeaderParam.SetCallState( EPEStateConnected );
   385     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   256     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   386         &callHeaderParam );
   257         &callHeaderParam );
   387     
   258 
       
   259     UpdateInCallCbaL();
       
   260     SetTouchPaneButtons( EPhoneConferenceButtons );
   388     }
   261     }
   389 
   262 
   390 // -----------------------------------------------------------
   263 // -----------------------------------------------------------
   391 // CPhoneConferenceAndSingle::HandleHeldL
   264 // CPhoneConferenceAndSingle::HandleHeldL
   392 // -----------------------------------------------------------
   265 // -----------------------------------------------------------
   407         callLabelId, 
   280         callLabelId, 
   408         CCoeEnv::Static() );        
   281         CCoeEnv::Static() );        
   409     callHeaderParam.SetLabelText( labelText );
   282     callHeaderParam.SetLabelText( labelText );
   410 
   283 
   411     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   284     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   412         &callHeaderParam );        
   285         &callHeaderParam );      
       
   286     
       
   287     SetTouchPaneButtons( EPhoneConferenceButtons );
   413     }
   288     }
   414 
   289 
   415 // -----------------------------------------------------------
   290 // -----------------------------------------------------------
   416 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL
   291 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL
   417 // -----------------------------------------------------------
   292 // -----------------------------------------------------------
   426     iViewCommandHandle->ExecuteCommandL( EPhoneViewAddToConference );
   301     iViewCommandHandle->ExecuteCommandL( EPhoneViewAddToConference );
   427     
   302     
   428     UpdateConferenceSecurityStatusL( aCallId );
   303     UpdateConferenceSecurityStatusL( aCallId );
   429 
   304 
   430     SetTouchPaneButtons( EPhoneConferenceButtons );
   305     SetTouchPaneButtons( EPhoneConferenceButtons );
   431     SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
       
   432     
   306     
   433     EndUiUpdate();
   307     EndUiUpdate();
   434 
       
   435     TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   436     conferenceAndSingleFlag.SetBoolean( EFalse );
       
   437     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   438     	&conferenceAndSingleFlag );
       
   439 
   308 
   440     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   309     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   441     iStateMachine->ChangeState( EPhoneStateConference );        
   310     iStateMachine->ChangeState( EPhoneStateConference );        
   442     }
   311     }
   443 
   312 
   457 // -----------------------------------------------------------
   326 // -----------------------------------------------------------
   458 //
   327 //
   459 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId )
   328 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId )
   460     {
   329     {
   461     __LOGMETHODSTARTEND( EPhoneUIStates, 
   330     __LOGMETHODSTARTEND( EPhoneUIStates, 
   462             "CPhoneConferenceAndSingle::HandleIncomingL");
   331         "CPhoneConferenceAndSingle::HandleIncomingL");
   463     IsNumberEntryUsedL() ? 
   332     
   464         BeginTransEffectLC( ECallUiAppear ) :
       
   465         BeginTransEffectLC( ENumberEntryOpen );
       
   466     BeginUiUpdateLC();  
   333     BeginUiUpdateLC();  
   467     
       
   468     // Hide the number entry if it exists
       
   469     if ( IsNumberEntryUsedL() )
       
   470         {
       
   471         SetNumberEntryVisibilityL( EFalse );
       
   472         }
       
   473     
   334     
   474     TPhoneCmdParamBoolean dialerParam;
   335     TPhoneCmdParamBoolean dialerParam;
   475     dialerParam.SetBoolean( ETrue );
   336     dialerParam.SetBoolean( ETrue );
   476     
   337     
   477     // Get allow waiting call header param value.
   338     // Get allow waiting call header param value.
   478     AllowShowingOfWaitingCallHeaderL( dialerParam );
   339     AllowShowingOfWaitingCallHeaderL( dialerParam );
   479     
   340     
   480     // Close conference list
       
   481     TPhoneCmdParamBoolean booleanParam;
       
   482     booleanParam.SetBoolean( EFalse );
       
   483     iViewCommandHandle->ExecuteCommandL( 
       
   484     	EPhoneViewOpenConferenceList, &booleanParam );
       
   485 
       
   486     iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
   341     iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
   487     
   342     
   488     // Set touch controls
   343     // Check if HW Keys or Call UI should be disabled
   489     SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
   344     CheckDisableHWKeysAndCallUIL();
   490 
   345     
   491     SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   492         
       
   493     // Display incoming call
   346     // Display incoming call
   494     DisplayIncomingCallL( aCallId, dialerParam  );
   347     DisplayIncomingCallL( aCallId, dialerParam  );
   495 
   348 
       
   349     // Set touch controls
       
   350     SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   351     
   496     EndUiUpdate();
   352     EndUiUpdate();
   497     EndTransEffect();
       
   498     TPhoneCmdParamBoolean conferenceAndSingleFlag;
       
   499     conferenceAndSingleFlag.SetBoolean( EFalse );
       
   500     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
       
   501     	&conferenceAndSingleFlag );
       
   502     
   353     
   503     // Go to Conference And Single And Waiting state
   354     // Go to Conference And Single And Waiting state
   504     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   355     UpdateCbaL( EPhoneCallHandlingIncomingRejectCBA );
   505     iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );                
   356     iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );                
   506     }
   357     }
   507 
   358 
   508 // -----------------------------------------------------------
   359 // -----------------------------------------------------------
   509 // CPhoneConferenceAndSingle::HandleIdleL
   360 // CPhoneConferenceAndSingle::HandleIdleL
   510 // -----------------------------------------------------------
   361 // -----------------------------------------------------------
   511 //
   362 //
   512 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId )
   363 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId )
   513     {
   364     {
   514     __LOGMETHODSTARTEND( EPhoneUIStates, 
   365     __LOGMETHODSTARTEND( EPhoneUIStates, 
   515     	"CPhoneConferenceAndSingle::HandleIdleL");
   366         "CPhoneConferenceAndSingle::HandleIdleL");
   516     
       
   517     // If dialler is not open then close menu bar.
       
   518     if ( !IsNumberEntryUsedL() )
       
   519         {
       
   520         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   521         }
       
   522     
   367     
   523     TPhoneCmdParamBoolean conferenceExistsForCallId;
   368     TPhoneCmdParamBoolean conferenceExistsForCallId;
   524     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   369     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
   525         aCallId, &conferenceExistsForCallId );
   370         aCallId, &conferenceExistsForCallId );
   526     
   371     
   527     if( conferenceExistsForCallId.Boolean() )
   372     if( conferenceExistsForCallId.Boolean() )
   528         {
   373         {
   529         // Remove conference member from conference bubble
   374         // Remove conference member from conference bubble
   530         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, 
   375         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, 
   531             aCallId );                    
   376             aCallId );                    
   532 
       
   533         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
       
   534         }
   377         }
   535     else
   378     else
   536         {       
   379         {       
   537         // Remove call
   380         // Remove call
   538         BeginUiUpdateLC(); 
   381         BeginUiUpdateLC(); 
   539         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   382         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
   540 
   383 
   541 	    TPhoneCmdParamBoolean conferenceAndSingleFlag;
   384         SetTouchPaneButtons( EPhoneConferenceButtons );
   542 	    conferenceAndSingleFlag.SetBoolean( EFalse );
   385         
   543 	    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
   386         UpdateCbaL( EPhoneCallHandlingInCallCBA );
   544 	    	&conferenceAndSingleFlag );
       
   545         
       
   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 	        }
       
   559       
   387       
   560 
   388 
   561         EndUiUpdate();
   389         EndUiUpdate();
   562 
   390 
   563         iStateMachine->ChangeState( EPhoneStateConference );
   391         iStateMachine->ChangeState( EPhoneStateConference );
   575     
   403     
   576     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   404     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   577     
   405     
   578     TPhoneCmdParamInteger intParam;
   406     TPhoneCmdParamInteger intParam;
   579     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls,
   407     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls,
   580     	&intParam );
   408         &intParam );
   581     	
   409         
   582     switch( intParam.Integer() )
   410     switch( intParam.Integer() )
   583 	    {
   411         {
   584 	    case EOneActiveCall:
   412         case EOneActiveCall:
   585 	    	MakeStateTransitionToSingleL();
   413             MakeStateTransitionToSingleL();
   586 	    	break;
   414             break;
   587 	    	
   415             
   588 	    case ETwoActiveCalls: // Fall through
   416         case ETwoActiveCalls: // Fall through
   589 	    default:
   417         default:
   590 	    	MakeStateTransitionToTwoSinglesL();
   418             MakeStateTransitionToTwoSinglesL();
   591 	    	break;
   419             break;
   592 	    }
   420         }
   593     }
   421     }
   594 
   422 
   595 // --------------------------------------------------------------
   423 // --------------------------------------------------------------
   596 // CPhoneConferenceAndSingle::HandleKeyMessageL
   424 // CPhoneConferenceAndSingle::HandleKeyMessageL
   597 // --------------------------------------------------------------
   425 // --------------------------------------------------------------
   605     switch ( aCode )
   433     switch ( aCode )
   606         {
   434         {
   607         // send-key
   435         // send-key
   608         case EKeyYes:
   436         case EKeyYes:
   609             if( IsNumberEntryVisibleL() )
   437             if( IsNumberEntryVisibleL() )
   610 				{
   438                 {
   611                 HandleSendL();
   439                 HandleSendL();
   612                 }
   440                 }
   613  			else
   441             else
   614 	 			{
   442                 {
   615                 // Number entry is below so swap the call
   443                 // Number entry is below so swap the call
   616                 iStateMachine->SendPhoneEngineMessage(
   444                 iStateMachine->SendPhoneEngineMessage(
   617                 	CPEPhoneModelIF::EPEMessageSwap );        
   445                     CPEPhoneModelIF::EPEMessageSwap );        
   618 	 			}
   446                 }
   619             break;
   447             break;
   620             
   448             
   621         default:
   449         default:
   622             // do base operation
   450             // do base operation
   623             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   451             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
   654         }
   482         }
   655     else
   483     else
   656         {
   484         {
   657         iStateMachine->SendPhoneEngineMessage( 
   485         iStateMachine->SendPhoneEngineMessage( 
   658             MPEPhoneModel::EPEMessageCheckEmergencyNumber );
   486             MPEPhoneModel::EPEMessageCheckEmergencyNumber );
   659         } 	
   487         }   
   660     CleanupStack::PopAndDestroy( phoneNumber );
   488     CleanupStack::PopAndDestroy( phoneNumber );
   661     }
   489     }
   662 
   490 
   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 
       
   687 // End of File
   491 // End of File