phoneapp/phoneuistates/src/cphoneconference.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 69 8baf28733c3d
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDES
    19 // INCLUDES
       
    20 #include <ScreensaverInternalPSKeys.h>
    20 #include <eikmenub.h> 
    21 #include <eikmenub.h> 
    21 #include <eikenv.h>
    22 #include <eikenv.h>
    22 #include <StringLoader.h>
    23 #include <StringLoader.h>
    23 #include <pevirtualengine.h>
    24 #include <pevirtualengine.h>
    24 #include <mpeengineinfo.h>
    25 #include <mpeengineinfo.h>
    39 #include "tphonecmdparamglobalnote.h"
    40 #include "tphonecmdparamglobalnote.h"
    40 #include "phonestatedefinitionsgsm.h"
    41 #include "phonestatedefinitionsgsm.h"
    41 #include "tphonecmdparamcallstatedata.h"
    42 #include "tphonecmdparamcallstatedata.h"
    42 #include "cphonekeys.h"
    43 #include "cphonekeys.h"
    43 #include "phonelogger.h"
    44 #include "phonelogger.h"
       
    45 #include "cphonepubsubproxy.h"
    44 
    46 
    45 // ================= MEMBER FUNCTIONS =======================
    47 // ================= MEMBER FUNCTIONS =======================
    46 
    48 
    47 // C++ default constructor can NOT contain any code, that
    49 // C++ default constructor can NOT contain any code, that
    48 // might leave.
    50 // might leave.
    79     TPhoneCmdParamBoolean globalNotifierParam;
    81     TPhoneCmdParamBoolean globalNotifierParam;
    80     globalNotifierParam.SetBoolean( EFalse );
    82     globalNotifierParam.SetBoolean( EFalse );
    81     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
    83     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
    82         &globalNotifierParam );
    84         &globalNotifierParam );
    83     
    85     
       
    86     CPhonePubSubProxy::Instance()->ChangePropertyValue(
       
    87                     KPSUidScreenSaver,
       
    88                     KScreenSaverAllowScreenSaver,
       
    89                     EPhoneScreensaverAllowed ); 
       
    90   
       
    91     DefineAndSetHoldFlagL();
       
    92     
    84     }
    93     }
    85 
    94 
    86 // -----------------------------------------------------------
    95 // -----------------------------------------------------------
    87 // CPhoneConference::NewL()
    96 // CPhoneConference::NewL()
    88 // Constructor
    97 // Constructor
   142             
   151             
   143         case MEngineMonitor::EPEMessageHeld:
   152         case MEngineMonitor::EPEMessageHeld:
   144             {
   153             {
   145             TPhoneCmdParamCallHeaderData callHeaderParam;
   154             TPhoneCmdParamCallHeaderData callHeaderParam;
   146             callHeaderParam.SetCallState( EPEStateHeld );
   155             callHeaderParam.SetCallState( EPEStateHeld );
   147             TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
       
   148             TInt callLabelId = CPhoneMainResourceResolver::Instance()->
       
   149                     ResolveResourceID( EPhoneCallOnHold );
       
   150 
       
   151             StringLoader::Load( labelText, callLabelId, CCoeEnv::Static() );
       
   152             callHeaderParam.SetLabelText( labelText );
       
   153             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   156             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
   154                 &callHeaderParam );
   157                 &callHeaderParam );
   155             }
   158             }
   156             break;
   159             break;
   157             
   160             
   163                 &callHeaderParam );
   166                 &callHeaderParam );
   164             }
   167             }
   165             break;
   168             break;
   166             
   169             
   167         case MEngineMonitor::EPEMessageDialing:
   170         case MEngineMonitor::EPEMessageDialing:
   168             HandleDiallingL( aCallId );
   171             HandleDialingL( aCallId );
   169             break;
   172             break;
   170             
   173             
   171         case MEngineMonitor::EPEMessageIncoming:
   174         case MEngineMonitor::EPEMessageIncoming:
   172             HandleIncomingL( aCallId );
   175             HandleIncomingL( aCallId );
   173             break;
   176             break;
   190 
   193 
   191     switch( aCommand )
   194     switch( aCommand )
   192         {   
   195         {   
   193         case EAknSoftkeyCancel:
   196         case EAknSoftkeyCancel:
   194             BeginUiUpdateLC();
   197             BeginUiUpdateLC();
       
   198             CloseSelectionListL();
   195             SetTouchPaneButtons( EPhoneConferenceButtons );
   199             SetTouchPaneButtons( EPhoneConferenceButtons );
   196             EndUiUpdate();    
   200             EndUiUpdate();    
   197             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   201             UpdateCbaL( EPhoneCallHandlingInCallCBA );
   198             break;
   202             break;
   199     
   203     
   209                 CPEPhoneModelIF::EPEMessageResumeConference );
   213                 CPEPhoneModelIF::EPEMessageResumeConference );
   210             break;
   214             break;
   211             
   215             
   212         // Conference -> Drop participant
   216         // Conference -> Drop participant
   213         case EPhoneInCallCmdDropSelection:
   217         case EPhoneInCallCmdDropSelection:
       
   218             OpenDropParticipantSelectionL();
   214             break;
   219             break;
   215         
   220         
   216         // Drop CBA    
   221         // Drop CBA    
   217         case EPhoneInCallCmdDrop:
   222         case EPhoneInCallCmdDrop:
   218             DropSelectedParticipantL();
   223             DropSelectedParticipantL();
   219             break;
   224             break;
   220             
   225             
   221         case EPhoneInCallCmdPrivateSelection:
   226         case EPhoneInCallCmdPrivateSelection:
       
   227             OpenPrivateSelectionL();
   222             break;
   228             break;
   223             
   229             
   224         case EPhoneInCallCmdPrivate:
   230         case EPhoneInCallCmdPrivate:
   225             PrivateSelectedParticipantL();
   231             PrivateSelectedParticipantL();
   226             break;
   232             break;
   227           
   233           
   228         case EPhoneInCallCmdNewCall:
   234         case EPhoneInCallCmdNewCall:
       
   235             LaunchNewCallQueryL();
   229             break;
   236             break;
   230             
   237             
   231         case EPhoneInCallCmdNewCallCall:
   238         case EPhoneInCallCmdNewCallCall:
       
   239             CallFromNewCallQueryL();
   232             break;
   240             break;
   233             
   241             
   234         case EPhoneInCallCmdParticipants:
   242         case EPhoneInCallCmdParticipants:
   235             break;     
   243             OpenParticipantsListL();
       
   244             break;
       
   245             
       
   246         case EPhoneViewOpenNumberEntry:
       
   247             if ( IsConferenceBubbleInSelectionMode() )
       
   248                 {
       
   249                 CloseSelectionListL();
       
   250                 SetTouchPaneButtons( EPhoneConferenceButtons );
       
   251                 }
       
   252             commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand );
       
   253             break;            
   236 
   254 
   237         default:
   255         default:
   238             commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand );
   256             commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand );
   239             break;
   257             break;
   240         }
   258         }
   246 // CPhoneConference::UpdateInCallCbaL
   264 // CPhoneConference::UpdateInCallCbaL
   247 // -----------------------------------------------------------
   265 // -----------------------------------------------------------
   248 //
   266 //
   249 void CPhoneConference::UpdateInCallCbaL()
   267 void CPhoneConference::UpdateInCallCbaL()
   250     {
   268     {
   251     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   269     if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode ) 
       
   270         != EPhoneViewResponseSuccess )
       
   271         {
       
   272         UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   273         }    
       
   274     }
       
   275 
       
   276 // -----------------------------------------------------------
       
   277 // CPhoneConference::OpenMenuBarL
       
   278 // -----------------------------------------------------------
       
   279 //
       
   280 void CPhoneConference::OpenMenuBarL()
       
   281     {
       
   282     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   283         "CPhoneConference::OpenMenuBarL()");
       
   284     TInt resourceId;
       
   285 
       
   286     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   287         {
       
   288         resourceId = EPhoneDtmfDialerMenubar;
       
   289         }
       
   290     else if ( IsNumberEntryVisibleL() )
       
   291         {
       
   292         resourceId = EPhoneConfCallMenubarWithNumberEntry;
       
   293         }
       
   294     else if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) 
       
   295               && IsConferenceBubbleInSelectionMode() )        
       
   296         {
       
   297         resourceId = EPhoneConfCallParticipantsMenubar;            
       
   298         }
       
   299     else
       
   300         {
       
   301         resourceId = EPhoneConfCallMenubar;
       
   302         }
       
   303 
       
   304     TPhoneCmdParamInteger integerParam;
       
   305     integerParam.SetInteger( 
       
   306         CPhoneMainResourceResolver::Instance()->
       
   307         ResolveResourceID( resourceId ) );
       
   308     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, 
       
   309         &integerParam );
   252     }
   310     }
   253 
   311 
   254 // -----------------------------------------------------------
   312 // -----------------------------------------------------------
   255 // CPhoneConference::HandleKeyEventL
   313 // CPhoneConference::HandleKeyEventL
   256 // -----------------------------------------------------------
   314 // -----------------------------------------------------------
   259     const TKeyEvent& aKeyEvent, 
   317     const TKeyEvent& aKeyEvent, 
   260     TEventCode aEventCode )
   318     TEventCode aEventCode )
   261     {
   319     {
   262     __LOGMETHODSTARTEND( EPhoneUIStates, 
   320     __LOGMETHODSTARTEND( EPhoneUIStates, 
   263         "CPhoneConference::HandleKeyEventL()");
   321         "CPhoneConference::HandleKeyEventL()");
   264 
   322     if ( IsConferenceBubbleInSelectionMode() )
   265     if ( CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) )
   323         {
   266         {
   324         if ( aKeyEvent.iCode == EKeyUpArrow ||
   267         // Handle numeric keys when key events are received 
   325              aKeyEvent.iCode == EKeyDownArrow )
   268         // in conference state.
   326             {
   269         CPhoneGsmInCall::HandleNumericKeyEventL( aKeyEvent, aEventCode );
   327             TPhoneCmdParamKeyEvent keyEventParam;
       
   328             keyEventParam.SetKeyEvent( aKeyEvent );
       
   329             keyEventParam.SetEventCode( aEventCode );    
       
   330             
       
   331             iViewCommandHandle->ExecuteCommandL( 
       
   332                 EPhoneViewMoveHighLightInList, &keyEventParam );
       
   333             }
   270         }
   334         }
   271     else
   335     else
   272         {
   336         {
   273         // Handle other key events.
   337         if ( CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) )
   274         CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode );
   338             {
   275         }
   339             // Handle numeric keys when key events are received 
   276     
   340             // in conference state.
       
   341             CPhoneGsmInCall::HandleNumericKeyEventL( aKeyEvent, aEventCode );
       
   342             }
       
   343         else
       
   344             {
       
   345             // Handle other key events.
       
   346             CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode );
       
   347             }
       
   348         }
   277     }
   349     }
   278 
   350 
   279 // --------------------------------------------------------------
   351 // --------------------------------------------------------------
   280 // CPhoneConference::HandleKeyMessageL
   352 // CPhoneConference::HandleKeyMessageL
   281 // --------------------------------------------------------------
   353 // --------------------------------------------------------------
   334     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   406     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled,
   335         &globalNotifierParam );
   407         &globalNotifierParam );
   336 
   408 
   337     // Stop capturing keys
   409     // Stop capturing keys
   338     CaptureKeysDuringCallNotificationL( EFalse );
   410     CaptureKeysDuringCallNotificationL( EFalse );
       
   411 
       
   412     // If dialler is not open then close menu bar.
       
   413     if ( !IsNumberEntryUsedL() )
       
   414         {
       
   415         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   416         }
   339         
   417         
   340     // If conference bubble still exists then we have conference and
   418     // If conference bubble still exists then we have conference and
   341     // single call
   419     // single call
   342     TPhoneCmdParamBoolean conferenceBubbleExists;
   420     TPhoneCmdParamBoolean conferenceBubbleExists;
   343     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, 
   421     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, 
   363 //
   441 //
   364 void CPhoneConference::HandleConferenceIdleL()
   442 void CPhoneConference::HandleConferenceIdleL()
   365     {
   443     {
   366     __LOGMETHODSTARTEND( EPhoneUIStates, 
   444     __LOGMETHODSTARTEND( EPhoneUIStates, 
   367         "CPhoneConference::HandleConferenceIdleL()");
   445         "CPhoneConference::HandleConferenceIdleL()");
       
   446     BeginTransEffectLC( ENumberEntryClose );
   368     BeginUiUpdateLC();
   447     BeginUiUpdateLC();
   369     
   448     
   370     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   449     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
   371 
   450 
   372     TPhoneCmdParamInteger activeCallCount;
   451     TPhoneCmdParamInteger activeCallCount;
   375 
   454 
   376     switch( activeCallCount.Integer() )
   455     switch( activeCallCount.Integer() )
   377         {
   456         {
   378         case ENoActiveCalls:
   457         case ENoActiveCalls:
   379             MakeStateTransitionToIdleL();
   458             MakeStateTransitionToIdleL();
   380             break;
   459             break; 
   381             
   460             
   382         case EOneActiveCall:
   461         case EOneActiveCall:
   383             {
   462             {
   384             // Fetch ringing call's id from view
   463             // Fetch ringing call's id from view
   385             TPhoneCmdParamCallStateData callStateData;
   464             TPhoneCmdParamCallStateData callStateData;
   386             callStateData.SetCallState( EPEStateRinging );
   465             callStateData.SetCallState( EPEStateRinging );
   387             iViewCommandHandle->HandleCommandL(
   466             iViewCommandHandle->HandleCommandL(
   388                 EPhoneViewGetCallIdByState, &callStateData );
   467                 EPhoneViewGetCallIdByState, &callStateData );
   389                 
   468                 
   390             if( callStateData.CallId() > KErrNotFound )
   469             if( callStateData.CallId() > KErrNotFound )
   391                 {
   470                 {            
       
   471                 CPhonePubSubProxy::Instance()->ChangePropertyValue(
       
   472                                 KPSUidScreenSaver,
       
   473                                 KScreenSaverAllowScreenSaver,
       
   474                                 EPhoneScreensaverNotAllowed );
   392                 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   475                 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   393                 iStateMachine->ChangeState( EPhoneStateWaitingInSingle );    
   476                 iStateMachine->ChangeState( EPhoneStateWaitingInSingle );    
   394                 }
   477                 }
   395             else
   478             else
   396                 {
   479                 {
   397                 MakeStateTransitionToSingleL();                    
   480                 MakeStateTransitionToSingleL();
   398                 }
   481                 }
   399             }
   482             }
   400             break;
   483             break;
   401             
   484             
   402         case ETwoActiveCalls:
   485         case ETwoActiveCalls:
   405             
   488             
   406         default:
   489         default:
   407             MakeStateTransitionToTwoSinglesL();
   490             MakeStateTransitionToTwoSinglesL();
   408             break;
   491             break;
   409         }
   492         }
   410     
   493     EndUiUpdate();
   411     EndUiUpdate(); 
   494     EndTransEffect();     
   412     }
   495     }
   413 
   496 
   414 // -----------------------------------------------------------
   497 // -----------------------------------------------------------
   415 // CPhoneConference::HandleHeldConferenceL
   498 // CPhoneConference::HandleHeldConferenceL
   416 // -----------------------------------------------------------
   499 // -----------------------------------------------------------
   418 void CPhoneConference::HandleHeldConferenceL( TInt aCallId )
   501 void CPhoneConference::HandleHeldConferenceL( TInt aCallId )
   419     {
   502     {
   420     __LOGMETHODSTARTEND( EPhoneUIStates, 
   503     __LOGMETHODSTARTEND( EPhoneUIStates, 
   421         "CPhoneConference::HandleHeldConferenceL()");
   504         "CPhoneConference::HandleHeldConferenceL()");
   422     TPhoneCmdParamCallHeaderData callHeaderParam;
   505     TPhoneCmdParamCallHeaderData callHeaderParam;
   423     callHeaderParam.SetCallState( EPEStateHeldConference );
   506     callHeaderParam.SetCallState( EPEStateHeld );
   424     
   507     
   425     TInt callLabelId;
   508     TInt callLabelId;
   426     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   509     TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC );
   427     callLabelId = CPhoneMainResourceResolver::Instance()->
   510     callLabelId = CPhoneMainResourceResolver::Instance()->
   428             ResolveResourceID( EPhoneCallOnHold );
   511             ResolveResourceID( EPhoneCallOnHold );
   433         CCoeEnv::Static() );        
   516         CCoeEnv::Static() );        
   434     callHeaderParam.SetLabelText( labelText );
   517     callHeaderParam.SetLabelText( labelText );
   435  
   518  
   436     iViewCommandHandle->ExecuteCommandL( 
   519     iViewCommandHandle->ExecuteCommandL( 
   437         EPhoneViewUpdateBubble, aCallId, &callHeaderParam );
   520         EPhoneViewUpdateBubble, aCallId, &callHeaderParam );
   438            
   521        
       
   522     // Set Hold flag to view
       
   523     SetHoldFlagL();
       
   524     
   439     if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
   525     if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
   440         {
   526         {
   441         SendGlobalInfoNoteL( EPhoneInformationConferenceOnHold, ETrue );
   527         SendGlobalInfoNoteL( EPhoneInformationConferenceOnHold );
   442         }
   528         }
   443     
   529     
   444     SetTouchPaneButtons( EPhoneConferenceButtons );
   530     SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
       
   531     
   445     UpdateInCallCbaL();
   532     UpdateInCallCbaL();
       
   533     }
       
   534 
       
   535 
       
   536 // -----------------------------------------------------------
       
   537 // CPhoneConference::DefineAndSetHoldFlagL
       
   538 // -----------------------------------------------------------
       
   539 //
       
   540 void CPhoneConference::DefineAndSetHoldFlagL()
       
   541     {
       
   542     // Find out is conference held or not
       
   543     TPhoneCmdParamCallStateData callStateData;
       
   544     callStateData.SetCallId( KConferenceCallId );
       
   545     iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState,
       
   546             &callStateData );
       
   547     
       
   548     // Set Hold flag to view
       
   549     TPhoneCmdParamBoolean holdFlag;
       
   550         
       
   551     if( callStateData.CallState() == EPEStateHeld )
       
   552         {
       
   553         holdFlag.SetBoolean( ETrue );
       
   554         }
       
   555     else
       
   556         {
       
   557         holdFlag.SetBoolean( EFalse );   
       
   558         }
       
   559     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
       
   560     
       
   561     }
       
   562 
       
   563 // -----------------------------------------------------------
       
   564 // CPhoneConference::SetHoldFlagL
       
   565 // -----------------------------------------------------------
       
   566 //
       
   567 void CPhoneConference::SetHoldFlagL()
       
   568     {
       
   569     // Set Hold flag to view
       
   570     TPhoneCmdParamBoolean holdFlag;
       
   571     holdFlag.SetBoolean( ETrue );
       
   572     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
       
   573 
   446     }
   574     }
   447 
   575 
   448 // -----------------------------------------------------------
   576 // -----------------------------------------------------------
   449 // CPhoneConference::HandleConnectedConferenceL
   577 // CPhoneConference::HandleConnectedConferenceL
   450 // -----------------------------------------------------------
   578 // -----------------------------------------------------------
   453     {
   581     {
   454     __LOGMETHODSTARTEND( EPhoneUIStates, 
   582     __LOGMETHODSTARTEND( EPhoneUIStates, 
   455         "CPhoneConference::HandleConnectedConferenceL()");
   583         "CPhoneConference::HandleConnectedConferenceL()");
   456     // Update call state
   584     // Update call state
   457     TPhoneCmdParamCallHeaderData callHeaderParam;
   585     TPhoneCmdParamCallHeaderData callHeaderParam;
   458     callHeaderParam.SetCallState( EPEStateConnectedConference );
   586     callHeaderParam.SetCallState( EPEStateConnected );
   459     
   587 
   460     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   588     TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC );
   461     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   589     TInt callLabelId = CPhoneMainResourceResolver::Instance()->
   462             ResolveResourceID( EPhoneCLIConferenceCall );
   590             ResolveResourceID( EPhoneCLIConferenceCall );
   463 
   591 
   464     StringLoader::Load( 
   592     StringLoader::Load( 
   475     holdFlag.SetBoolean( EFalse );
   603     holdFlag.SetBoolean( EFalse );
   476     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   604     iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
   477     
   605     
   478     if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
   606     if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) )
   479         { 
   607         { 
   480         SendGlobalInfoNoteL( EPhoneInformationConferenceActiveted, ETrue );
   608         SendGlobalInfoNoteL( EPhoneInformationConferenceActiveted );
   481         }
   609         }
   482     
   610     
   483     SetTouchPaneButtons( EPhoneConferenceButtons );
   611     SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
   484     
   612     
   485     UpdateInCallCbaL();
   613     UpdateInCallCbaL();
       
   614     }
       
   615 
       
   616 // -----------------------------------------------------------
       
   617 // CPhoneConference::OpenDropParticipantSelectionL
       
   618 // -----------------------------------------------------------
       
   619 //
       
   620 void CPhoneConference::OpenDropParticipantSelectionL()
       
   621     {
       
   622     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   623         "CPhoneConference::OpenDropParticipantSelectionL()");
       
   624     TPhoneCmdParamBoolean booleanParam;
       
   625     booleanParam.SetBoolean( ETrue );
       
   626     iViewCommandHandle->ExecuteCommandL( 
       
   627         EPhoneViewOpenConferenceList, &booleanParam );
       
   628 
       
   629     iCbaManager->SetCbaL( EPhoneDropParticipantCBA );
   486     }
   630     }
   487 
   631 
   488 // -----------------------------------------------------------
   632 // -----------------------------------------------------------
   489 // CPhoneConference::DropSelectedParticipantL
   633 // CPhoneConference::DropSelectedParticipantL
   490 // -----------------------------------------------------------
   634 // -----------------------------------------------------------
   507             CPEPhoneModelIF::EPEMessageDropConferenceMember );            
   651             CPEPhoneModelIF::EPEMessageDropConferenceMember );            
   508         }
   652         }
   509     }
   653     }
   510 
   654 
   511 // -----------------------------------------------------------
   655 // -----------------------------------------------------------
       
   656 // CPhoneConference::OpenPrivateSelectionL
       
   657 // -----------------------------------------------------------
       
   658 //
       
   659 void CPhoneConference::OpenPrivateSelectionL()
       
   660     {
       
   661     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   662         "CPhoneConference::OpenPrivateSelectionL()");
       
   663     TPhoneCmdParamBoolean booleanParam;
       
   664     booleanParam.SetBoolean( ETrue );
       
   665     iViewCommandHandle->ExecuteCommandL( 
       
   666         EPhoneViewOpenConferenceList, &booleanParam );
       
   667 
       
   668     iCbaManager->SetCbaL( EPhonePrivateParticipantCBA );
       
   669     }
       
   670 
       
   671 // -----------------------------------------------------------
   512 // CPhoneConference::PrivateSelectedParticipantL
   672 // CPhoneConference::PrivateSelectedParticipantL
   513 // -----------------------------------------------------------
   673 // -----------------------------------------------------------
   514 //
   674 //
   515 void CPhoneConference::PrivateSelectedParticipantL()
   675 void CPhoneConference::PrivateSelectedParticipantL()
   516     {
   676     {
   529         iStateMachine->SendPhoneEngineMessage( 
   689         iStateMachine->SendPhoneEngineMessage( 
   530             CPEPhoneModelIF::EPEMessageGoOneToOne );
   690             CPEPhoneModelIF::EPEMessageGoOneToOne );
   531         
   691         
   532         // Update call view
   692         // Update call view
   533         BeginUiUpdateLC();
   693         BeginUiUpdateLC();
       
   694         CloseSelectionListL();
   534         SetTouchPaneButtons( EPhoneConferenceButtons );
   695         SetTouchPaneButtons( EPhoneConferenceButtons );
   535         EndUiUpdate();    
   696         EndUiUpdate();    
   536                 
   697                 
   537         UpdateCbaL( EPhoneCallHandlingInCallCBA );               
   698         UpdateCbaL( EPhoneCallHandlingInCallCBA );               
   538         }
   699         }
   549     
   710     
   550     SetDefaultFlagsL();
   711     SetDefaultFlagsL();
   551 
   712 
   552     if ( IsNumberEntryUsedL() )
   713     if ( IsNumberEntryUsedL() )
   553         {
   714         {
   554         // Show the number entry if it exists
   715         if ( NeedToReturnToForegroundAppL() )
   555         SetNumberEntryVisibilityL(ETrue);      
   716             {
   556         }
   717             // Return phone to the background if menu application is needed to foreground.
   557     else if ( !TopAppIsDisplayedL() )
   718             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   558         {
   719     
       
   720             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
       
   721     
       
   722             // Set Number Entry CBA
       
   723             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
       
   724             }
       
   725         else
       
   726             {
       
   727             // Show the number entry if it exists
       
   728             SetNumberEntryVisibilityL(ETrue);
       
   729         
       
   730             // Close dtmf dialer when call is disconnected.
       
   731             if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
       
   732                 {            
       
   733                 CloseDTMFEditorL();
       
   734                 // Display idle screen and update CBAs
       
   735                 DisplayIdleScreenL();
       
   736                 }
       
   737             }
       
   738         }  
       
   739     else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() )
       
   740         {
       
   741         // Close menu bar, if it is displayed
       
   742         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   559         
   743         
   560         // Continue displaying current app but set up the 
   744         // Continue displaying current app but set up the 
   561         // idle screen in the background
   745         // idle screen in the background
   562         SetupIdleScreenInBackgroundL();
   746         SetupIdleScreenInBackgroundL();
   563         }
   747         }
   564     else
   748     else
   565         {
   749         {
       
   750         // Close menu bar, if it is displayed
       
   751         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   752         
   566          // Display idle screen
   753          // Display idle screen
   567         DisplayIdleScreenL();
   754         DisplayIdleScreenL();
   568         }
   755         }
   569 
   756 
   570     // Display call termination note, if necessary
   757     // Display call termination note, if necessary
   581 //
   768 //
   582 void CPhoneConference::MakeStateTransitionToSingleL()
   769 void CPhoneConference::MakeStateTransitionToSingleL()
   583     {
   770     {
   584     __LOGMETHODSTARTEND( EPhoneUIStates, 
   771     __LOGMETHODSTARTEND( EPhoneUIStates, 
   585         "CPhoneConference::MakeStateTransitionToSingleL()");
   772         "CPhoneConference::MakeStateTransitionToSingleL()");
       
   773     // Close menu bar, if it is displayed
       
   774     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   586  
   775  
   587     if ( IsNumberEntryUsedL() )
   776 
   588         {
       
   589         // Show the number entry if it exists
       
   590         SetNumberEntryVisibilityL(ETrue);
       
   591         }
       
   592     SetTouchPaneButtons( EPhoneIncallButtons );    
   777     SetTouchPaneButtons( EPhoneIncallButtons );    
   593   
   778   
   594     // Go to single state
   779     // Go to single state
   595     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   780     UpdateCbaL( EPhoneCallHandlingInCallCBA );
   596     iStateMachine->ChangeState( EPhoneStateSingle );        
   781     iStateMachine->ChangeState( EPhoneStateSingle );        
   602 //
   787 //
   603 void CPhoneConference::MakeStateTransitionToTwoSinglesL()
   788 void CPhoneConference::MakeStateTransitionToTwoSinglesL()
   604     {
   789     {
   605     __LOGMETHODSTARTEND( EPhoneUIStates, 
   790     __LOGMETHODSTARTEND( EPhoneUIStates, 
   606         "CPhoneConference::MakeStateTransitionToTwoSinglesL()");
   791         "CPhoneConference::MakeStateTransitionToTwoSinglesL()");
   607 
   792     // Close menu bar, if it is displayed
   608     if ( IsNumberEntryUsedL() )
   793     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   609         {
   794 
   610         // Show the number entry if it exists
       
   611         SetNumberEntryVisibilityL(ETrue);
       
   612         }
       
   613         
   795         
   614     SetTouchPaneButtons( EPhoneTwoSinglesButtons );        
   796     SetTouchPaneButtons( EPhoneTwoSinglesButtons );        
   615     
   797     
   616     // Set Two singles softkeys
   798     // Set Two singles softkeys
   617     UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   799     UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   619     // Go to two singles state
   801     // Go to two singles state
   620     iStateMachine->ChangeState( EPhoneStateTwoSingles );        
   802     iStateMachine->ChangeState( EPhoneStateTwoSingles );        
   621     }
   803     }
   622 
   804 
   623 // -----------------------------------------------------------
   805 // -----------------------------------------------------------
       
   806 // CPhoneConference::CloseSelectionListL
       
   807 // -----------------------------------------------------------
       
   808 //
       
   809 void CPhoneConference::CloseSelectionListL()
       
   810     {
       
   811     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   812         "CPhoneConference::CloseSelectionListL()");
       
   813     // Close conference list
       
   814     TPhoneCmdParamBoolean booleanParam;
       
   815     booleanParam.SetBoolean( EFalse );
       
   816     iViewCommandHandle->ExecuteCommandL( 
       
   817         EPhoneViewOpenConferenceList, &booleanParam );
       
   818     }
       
   819 
       
   820 // -----------------------------------------------------------
   624 // CPhoneConference::ToggleHold
   821 // CPhoneConference::ToggleHold
   625 // -----------------------------------------------------------
   822 // -----------------------------------------------------------
   626 //
   823 //
   627 void CPhoneConference::ToggleHoldL()
   824 void CPhoneConference::ToggleHoldL()
   628     {
   825     {
   629     __LOGMETHODSTARTEND( EPhoneUIStates, 
   826     __LOGMETHODSTARTEND( EPhoneUIStates, 
   630         "CPhoneConference::ToggleHoldL()");
   827         "CPhoneConference::ToggleHoldL()");
   631     
   828     TPhoneCmdParamBoolean hold;
   632     TPECallControlCaps callControlCaps =
   829     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &hold );
   633         iStateMachine->PhoneEngineInfo()->CallControlCaps( KConferenceCallId );
   830     
   634     
   831     if( hold.Boolean() )
   635     if ( callControlCaps & MCCECallObserver::ECCECapsHold  )
   832         {
   636         {
       
   637         iStateMachine->SetCallId( KConferenceCallId );         
       
   638         iStateMachine->SendPhoneEngineMessage( 
   833         iStateMachine->SendPhoneEngineMessage( 
   639             CPEPhoneModelIF::EPEMessageHold );    
   834             CPEPhoneModelIF::EPEMessageResumeConference );
   640         }
   835         }
   641     else if ( callControlCaps & MCCECallObserver::ECCECapsResume )
   836     else
   642         {
   837         {
   643         iStateMachine->SetCallId( KConferenceCallId );         
       
   644         iStateMachine->SendPhoneEngineMessage( 
   838         iStateMachine->SendPhoneEngineMessage( 
   645             CPEPhoneModelIF::EPEMessageResume );    
   839             CPEPhoneModelIF::EPEMessageHoldConference );
   646         }
   840         }
   647     else
   841     }
   648         {
   842 
   649         SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed, ETrue );    
   843 // -----------------------------------------------------------
   650         }
   844 // CPhoneConference::HandleDialingL
   651     }
   845 // -----------------------------------------------------------
   652 
   846 //
   653 // -----------------------------------------------------------
   847 void CPhoneConference::HandleDialingL( TInt aCallId )
   654 // CPhoneConference::HandleDiallingL
   848     {
   655 // -----------------------------------------------------------
   849     __LOGMETHODSTARTEND( EPhoneUIStates, 
   656 //
   850         "CPhoneConference::HandleDialingL()");
   657 void CPhoneConference::HandleDiallingL( TInt aCallId )
   851     CPhonePubSubProxy::Instance()->ChangePropertyValue(
   658     {
   852                     KPSUidScreenSaver,
   659     __LOGMETHODSTARTEND( EPhoneUIStates, 
   853                     KScreenSaverAllowScreenSaver,
   660         "CPhoneConference::HandleDiallingL()");
   854                     EPhoneScreensaverNotAllowed );
   661     BeginUiUpdateLC(); 
   855     CloseSelectionListL();
   662     
       
   663     SetNumberEntryVisibilityL(EFalse);
       
   664     
   856     
   665     // Display call setup 
   857     // Display call setup 
   666     DisplayCallSetupL( aCallId );
   858     DisplayCallSetupL( aCallId );
   667     
   859           
   668     // Conference is understood as single call in buttons enumerations.
       
   669     SetTouchPaneButtons(EPhoneCallSetupAndSingleButtons); 
       
   670 
       
   671     EndUiUpdate();
       
   672     
       
   673     // Set Call Setup CBA 
       
   674     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
       
   675       
       
   676     // Go to conference and call setup state
   860     // Go to conference and call setup state
   677     iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup );
   861     iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup );
   678     }
   862     }
   679 
   863 
   680 // -----------------------------------------------------------
   864 // -----------------------------------------------------------
   681 // CPhoneConference::DisplayCallSetupL
   865 // CPhoneConference::DoStateSpecificCallSetUpDefinitionsL
   682 // -----------------------------------------------------------
   866 // -----------------------------------------------------------
   683 //
   867 //
   684 void CPhoneConference::DisplayCallSetupL( TInt aCallId )
   868 EXPORT_C void CPhoneConference::DoStateSpecificCallSetUpDefinitionsL()
   685     {
   869     {
   686     __LOGMETHODSTARTEND( EPhoneUIStates, 
   870     // Show incoming call buttons
   687         "CPhoneConference::DisplayCallSetupL()");
   871     SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons );
   688 
   872     }
   689     // Remove dialogs if necessary
   873 
   690     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   874 // ---------------------------------------------------------
   691 
   875 // CPhoneConference::CallFromNewCallQueryL
   692     // Capture keys when the phone is dialling
   876 // ---------------------------------------------------------
   693     CaptureKeysDuringCallNotificationL( ETrue );
   877 //
   694 
   878 void CPhoneConference::CallFromNewCallQueryL()
   695     // Bring Phone app in the foreground
   879     {
   696     TPhoneCmdParamInteger uidParam;
   880     __LOGMETHODSTARTEND( EPhoneUIStates, 
   697     uidParam.SetInteger( KUidPhoneApplication.iUid );
   881         "CPhoneConference::CallFromNewCallQueryL()");
   698     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   882     // First get the phone number from the dialog
   699         &uidParam );
   883     TPhoneCmdParamString phoneNumberParam;
   700 
   884     HBufC *content = HBufC::NewLC( KPhoneNumberEntryBufferSize );
   701     // Display call setup header
   885     TPtr ptr( content->Des() );
   702     DisplayHeaderForOutgoingCallL( aCallId );
   886     phoneNumberParam.SetString( &ptr );
       
   887     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent,
       
   888         &phoneNumberParam );
       
   889 
       
   890     // Store the phone number
       
   891     iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr );
       
   892 
       
   893     // clean up stack
       
   894     CleanupStack::PopAndDestroy( content );
       
   895   
       
   896     // Dial number
       
   897     DialVoiceCallL();
   703     }
   898     }
   704 
   899 
   705 // -----------------------------------------------------------
   900 // -----------------------------------------------------------
   706 // CPhoneConference::HandleIncomingL
   901 // CPhoneConference::HandleIncomingL
   707 // -----------------------------------------------------------
   902 // -----------------------------------------------------------
   709 void CPhoneConference::HandleIncomingL( TInt aCallId )
   904 void CPhoneConference::HandleIncomingL( TInt aCallId )
   710     {
   905     {
   711     __LOGMETHODSTARTEND( EPhoneUIStates, 
   906     __LOGMETHODSTARTEND( EPhoneUIStates, 
   712         "CPhoneConference::HandleIncomingL()");
   907         "CPhoneConference::HandleIncomingL()");
   713     
   908     
       
   909     CPhonePubSubProxy::Instance()->ChangePropertyValue(
       
   910                     KPSUidScreenSaver,
       
   911                     KScreenSaverAllowScreenSaver,
       
   912                     EPhoneScreensaverNotAllowed );
       
   913     
       
   914     IsNumberEntryUsedL() ? 
       
   915         BeginTransEffectLC( ECallUiAppear ) :
       
   916         BeginTransEffectLC( ENumberEntryOpen );
   714     BeginUiUpdateLC();
   917     BeginUiUpdateLC();
   715  
   918     
       
   919     // Hide the number entry if it exists
       
   920     if ( IsNumberEntryUsedL() )
       
   921         {
       
   922         SetNumberEntryVisibilityL( EFalse );    
       
   923         }
       
   924     
       
   925     // Indicate that the menu application on foreground needs to be sent back to the foreground 
       
   926     // after call is ended.
       
   927     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
       
   928     
   716     TPhoneCmdParamBoolean dialerParam;
   929     TPhoneCmdParamBoolean dialerParam;
   717     dialerParam.SetBoolean( ETrue );
   930     dialerParam.SetBoolean( ETrue );
   718     
   931     
   719     // Get allow waiting call header param value.
   932     // Get allow waiting call header param value.
   720     AllowShowingOfWaitingCallHeaderL( dialerParam );
   933     AllowShowingOfWaitingCallHeaderL( dialerParam );
       
   934             
       
   935     CloseSelectionListL();
       
   936 
   721     // Close fast swap window if it's displayed
   937     // Close fast swap window if it's displayed
   722     CEikonEnv::Static()->DismissTaskList();
   938     EikonEnv()->DismissTaskList();
   723     
   939 
   724     // Check if HW Keys or Call UI should be disabled
   940     SetTouchPaneButtons( EPhoneWaitingCallButtons );
   725     CheckDisableHWKeysAndCallUIL();
       
   726     
   941     
   727     // Display incoming call
   942     // Display incoming call
   728     DisplayIncomingCallL( aCallId, dialerParam );
   943     DisplayIncomingCallL( aCallId, dialerParam );
   729     
       
   730     SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   731 
   944 
   732     EndUiUpdate();
   945     EndUiUpdate();
       
   946     EndTransEffect();
   733 
   947 
   734     // Go to incoming state
   948     // Go to incoming state
   735     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   949     UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
   736     iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting );        
   950     iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting );        
   737     }
   951     }
   740 // CPhoneConference::DisplayIncomingCallL
   954 // CPhoneConference::DisplayIncomingCallL
   741 // -----------------------------------------------------------
   955 // -----------------------------------------------------------
   742 //
   956 //
   743 void CPhoneConference::DisplayIncomingCallL( 
   957 void CPhoneConference::DisplayIncomingCallL( 
   744     TInt aCallId, 
   958     TInt aCallId, 
   745     const TPhoneCmdParamBoolean aCommandParam )
   959     const TPhoneCmdParamBoolean /*aCommandParam*/ )
   746     {
   960     {
   747     __LOGMETHODSTARTEND( EPhoneUIStates, 
   961     __LOGMETHODSTARTEND( EPhoneUIStates, 
   748         "CPhoneConference::DisplayIncomingCallL()");
   962         "CPhoneConference::DisplayIncomingCallL()");
   749 
   963     // Close menu bar, if it is displayed
   750     // Cannot delete active note, e.g. New call query, 
   964     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   751     // but show waiting note with or without caller name
   965 
   752     if ( IsAnyQueryActiveL() ||  
   966     // Remove any phone dialogs if they are displayed
   753         ( !aCommandParam.Boolean() && iOnScreenDialer ) )
   967     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
   754         {
       
   755         CallWaitingNoteL( aCallId );        
       
   756         }
       
   757     else
       
   758         {
       
   759         // Remove any phone dialogs if they are displayed
       
   760         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs );
       
   761         }
       
   762 
   968 
   763     // Indicate that the Phone needs to be sent to the background if
   969     // Indicate that the Phone needs to be sent to the background if
   764     // an application other than the top application is in the foreground
   970     // an application other than the top application is in the foreground
   765     TPhoneCmdParamBoolean booleanParam;
   971     SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() );
   766     booleanParam.SetBoolean( !TopAppIsDisplayedL() );
       
   767     iViewCommandHandle->ExecuteCommandL( 
       
   768         EPhoneViewSetNeedToSendToBackgroundStatus,
       
   769         &booleanParam );
       
   770 
   972 
   771     // Bring Phone app in the foreground
   973     // Bring Phone app in the foreground
   772     TPhoneCmdParamInteger uidParam;
   974     TPhoneCmdParamInteger uidParam;
   773     uidParam.SetInteger( KUidPhoneApplication.iUid );
   975     uidParam.SetInteger( KUidPhoneApplication.iUid );
   774     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   976     iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground,
   806         // Go to Conference And Single state
  1008         // Go to Conference And Single state
   807       
  1009       
   808         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
  1010         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
   809         iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                    
  1011         iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                    
   810         SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
  1012         SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
       
  1013         SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
   811         }
  1014         }
   812     else
  1015     else
   813         {            
  1016         {            
   814         SetTouchPaneButtons( EPhoneTwoSinglesButtons );
  1017         SetTouchPaneButtons( EPhoneTwoSinglesButtons );
   815         }       
  1018         }       
   816     EndUiUpdate();
  1019     EndUiUpdate();
   817     }
  1020     }
       
  1021 
       
  1022 // -----------------------------------------------------------
       
  1023 // CPhoneConference::OpenParticipantsListL
       
  1024 // -----------------------------------------------------------
       
  1025 //    
       
  1026 void CPhoneConference::OpenParticipantsListL()
       
  1027     {
       
  1028     BeginUiUpdateLC();
       
  1029     
       
  1030     TPhoneCmdParamBoolean booleanParam;
       
  1031     booleanParam.SetBoolean( ETrue );
       
  1032     
       
  1033     iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList,
       
  1034                                          &booleanParam );    
       
  1035 
       
  1036     SetTouchPaneButtons( EPhoneParticipantListButtons );
       
  1037                                          
       
  1038     EndUiUpdate();
       
  1039     
       
  1040     iCbaManager->SetCbaL( EPhoneParticipantListCBA );
       
  1041      
       
  1042     // Find out is conference held or not
       
  1043     TPhoneCmdParamCallStateData callStateData;
       
  1044     callStateData.SetCallId( KConferenceCallId );
       
  1045     iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState,
       
  1046         &callStateData );
       
  1047     
       
  1048     if( callStateData.CallState() == EPEStateHeld )
       
  1049         {
       
  1050         //set Private button to Dimmed.        
       
  1051         SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
       
  1052         } 
       
  1053     else
       
  1054         {
       
  1055         //set Private button to UnDimmed.        
       
  1056          SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );        
       
  1057         }   
       
  1058                                            
       
  1059     }
       
  1060 
       
  1061 // -----------------------------------------------------------
       
  1062 // CPhoneConference::IsConferenceBubbleInSelectionMode
       
  1063 // -----------------------------------------------------------
       
  1064 //
       
  1065 TBool CPhoneConference::IsConferenceBubbleInSelectionMode() const
       
  1066     {
       
  1067     TPhoneCmdParamBoolean booleanParam;
       
  1068     
       
  1069     iViewCommandHandle->ExecuteCommand( 
       
  1070         EPhoneViewGetIsConferenceInSelectionMode, &booleanParam );
       
  1071     
       
  1072     return booleanParam.Boolean();
       
  1073     }
       
  1074 
       
  1075 // ---------------------------------------------------------
       
  1076 // CPhoneState::HandleCreateNumberEntryL
       
  1077 // ---------------------------------------------------------
       
  1078 //
       
  1079 void CPhoneConference::HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent,
       
  1080         TEventCode aEventCode )
       
  1081     {
       
  1082     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneConference::HandleCreateNumberEntryL() ");
       
  1083     if ( !IsConferenceBubbleInSelectionMode() )
       
  1084         {
       
  1085         CPhoneGsmInCall::HandleCreateNumberEntryL( aKeyEvent,aEventCode );
       
  1086         }
       
  1087     }
   818     
  1088     
   819 // -----------------------------------------------------------
  1089 // -----------------------------------------------------------
   820 // CPhoneConference::UpdateConferenceSecurityStatusL
  1090 // CPhoneConference::UpdateConferenceSecurityStatusL
   821 // -----------------------------------------------------------
  1091 // -----------------------------------------------------------
   822 //
  1092 //
   839             KPEConferenceCallID,
  1109             KPEConferenceCallID,
   840             &callHeaderParam );
  1110             &callHeaderParam );
   841         }
  1111         }
   842     }
  1112     }
   843 
  1113 
       
  1114 // -----------------------------------------------------------
       
  1115 // CPhoneConference::DisconnectCallL
       
  1116 // -----------------------------------------------------------
       
  1117 //
       
  1118 void CPhoneConference::DisconnectCallL()
       
  1119     {
       
  1120     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneConference::DisconnectCallL( ) ");
       
  1121     // Fetch active call's id from view
       
  1122     TPhoneCmdParamCallStateData callStateData;
       
  1123     callStateData.SetCallState( EPEStateConnected );
       
  1124     iViewCommandHandle->HandleCommandL(
       
  1125         EPhoneViewGetCallIdByState, &callStateData );
       
  1126 
       
  1127     if( callStateData.CallId() == KErrNotFound )
       
  1128         {
       
  1129         // No connected call, find the hold call
       
  1130         callStateData.SetCallState( EPEStateHeld );
       
  1131         iViewCommandHandle->HandleCommandL(
       
  1132             EPhoneViewGetCallIdByState, &callStateData );
       
  1133         }
       
  1134   
       
  1135     if( callStateData.CallId() > KErrNotFound  )
       
  1136         {
       
  1137         iStateMachine->SendPhoneEngineMessage(
       
  1138                       CPEPhoneModelIF::EPEMessageHangUpConference );  
       
  1139         }
       
  1140     else
       
  1141         {
       
  1142         CPhoneState::DisconnectCallL();
       
  1143         }
       
  1144     }
   844 // End of File
  1145 // End of File