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