phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp
changeset 0 5f000ab63145
child 9 8871b09be73b
child 21 92ab7f8d0eab
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of CPhoneConferenceAndWaiting class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDES
       
    20 #include <StringLoader.h>
       
    21 #include <cpephonemodelif.h>
       
    22 #include <featmgr.h>
       
    23 #include <TelephonyVariant.hrh>
       
    24 #include "cphoneconferenceandwaiting.h"
       
    25 #include "mphonestatemachine.h"
       
    26 #include "phoneviewcommanddefinitions.h"
       
    27 #include "tphonecmdparamcallheaderdata.h"
       
    28 #include "phonestatedefinitionsgsm.h"
       
    29 #include "phonelogger.h"
       
    30 #include "tphonecmdparamboolean.h"
       
    31 #include "tphonecmdparaminteger.h"
       
    32 #include "tphonecmdparamcallstatedata.h"
       
    33 #include "cphonemainresourceresolver.h"
       
    34 #include "phonerssbase.h"
       
    35 #include "tphonecmdparamglobalnote.h"
       
    36 #include "phoneui.hrh"
       
    37 #include "cphonecenrepproxy.h"
       
    38 #include "mphonestorage.h"
       
    39 
       
    40 // ================= MEMBER FUNCTIONS =======================
       
    41 
       
    42 // C++ default constructor can NOT contain any code, that
       
    43 // might leave.
       
    44 //
       
    45 CPhoneConferenceAndWaiting::CPhoneConferenceAndWaiting( 
       
    46     MPhoneStateMachine* aStateMachine, 
       
    47     MPhoneViewCommandHandle* aViewCommandHandle,
       
    48     MPhoneCustomization* aPhoneCustomization ) : 
       
    49     CPhoneConference( aStateMachine, aViewCommandHandle, aPhoneCustomization )
       
    50     {
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------
       
    54 // CPhoneConferenceAndWaiting::~CPhoneConferenceAndWaiting()
       
    55 // Destructor
       
    56 // (other items were commented in a header).
       
    57 // -----------------------------------------------------------
       
    58 //
       
    59 CPhoneConferenceAndWaiting::~CPhoneConferenceAndWaiting()
       
    60     {
       
    61     }
       
    62 
       
    63 // -----------------------------------------------------------
       
    64 // CPhoneConferenceAndWaiting::ConstructL()
       
    65 // Constructor
       
    66 // (other items were commented in a header).
       
    67 // -----------------------------------------------------------
       
    68 //
       
    69 void CPhoneConferenceAndWaiting::ConstructL()
       
    70     {
       
    71     CPhoneConference::ConstructL();
       
    72     
       
    73     // Fetch ringing call's id from view
       
    74     TPhoneCmdParamCallStateData callStateData;
       
    75     callStateData.SetCallState( EPEStateRinging );
       
    76     iViewCommandHandle->HandleCommandL(
       
    77         EPhoneViewGetCallIdByState, &callStateData );
       
    78     iRingingCallId = callStateData.CallId();
       
    79     }
       
    80 
       
    81 // -----------------------------------------------------------
       
    82 // CPhoneConferenceAndWaiting::NewL()
       
    83 // Constructor
       
    84 // (other items were commented in a header).
       
    85 // -----------------------------------------------------------
       
    86 //
       
    87 CPhoneConferenceAndWaiting* CPhoneConferenceAndWaiting::NewL( 
       
    88     MPhoneStateMachine* aStateMachine, 
       
    89     MPhoneViewCommandHandle* aViewCommandHandle,
       
    90     MPhoneCustomization* aPhoneCustomization )
       
    91     {
       
    92     CPhoneConferenceAndWaiting* self = new( ELeave ) CPhoneConferenceAndWaiting( 
       
    93         aStateMachine, aViewCommandHandle, aPhoneCustomization );
       
    94     
       
    95     CleanupStack::PushL( self );
       
    96     self->ConstructL();
       
    97     CleanupStack::Pop( self );
       
    98     
       
    99     return self;
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------
       
   103 // CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL
       
   104 // -----------------------------------------------------------
       
   105 //
       
   106 void CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL( 
       
   107     const TInt aMessage, 
       
   108     TInt aCallId )
       
   109     {
       
   110     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandlePhoneEngineMessageL()");
       
   111     switch ( aMessage )
       
   112         {
       
   113         case MEngineMonitor::EPEMessageIdle:
       
   114             HandleIdleL( aCallId );
       
   115             break;
       
   116             
       
   117         case MEngineMonitor::EPEMessageConnected:
       
   118             HandleConnectedL( aCallId );
       
   119             break;
       
   120             
       
   121         case MEngineMonitor::EPEMessageDialing:
       
   122             HandleDiallingL( aCallId );
       
   123             break;
       
   124             
       
   125         case MEngineMonitor::EPEMessageConferenceIdle:
       
   126             HandleConferenceIdleL();
       
   127             break;
       
   128             
       
   129         case MEngineMonitor::EPEMessageWentOneToOne:
       
   130             HandleWentOneToOneL( aCallId );
       
   131             break;
       
   132 
       
   133         default:
       
   134             CPhoneConference::HandlePhoneEngineMessageL( aMessage, 
       
   135                 aCallId );
       
   136             break;
       
   137         }
       
   138     }
       
   139 
       
   140 // --------------------------------------------------------------
       
   141 // CPhoneConferenceAndWaiting::HandleKeyMessageL
       
   142 // --------------------------------------------------------------
       
   143 //
       
   144 void CPhoneConferenceAndWaiting::HandleKeyMessageL( 
       
   145     TPhoneKeyEventMessages aMessage,
       
   146     TKeyCode aCode )
       
   147     {
       
   148     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleKeyMessageL()");
       
   149     switch ( aCode )
       
   150         {
       
   151         // send-key
       
   152         case EKeyYes:
       
   153             if( IsNumberEntryVisibleL() )
       
   154                 {
       
   155                 CallFromNumberEntryL();
       
   156                 }
       
   157             else
       
   158                 {
       
   159                 // Number entry is below incoming call bubble so
       
   160                 // answer the call
       
   161                 iStateMachine->SendPhoneEngineMessage(
       
   162                     MPEPhoneModel::EPEMessageAnswer ); 
       
   163                 }
       
   164             break;
       
   165             
       
   166         default:
       
   167             // do base operation
       
   168             CPhoneConference::HandleKeyMessageL( aMessage, aCode );
       
   169             break;
       
   170         }
       
   171     }
       
   172 
       
   173 // -----------------------------------------------------------
       
   174 // CPhoneConferenceAndWaiting::HandleKeyEventL
       
   175 // -----------------------------------------------------------
       
   176 //
       
   177 void CPhoneConferenceAndWaiting::HandleKeyEventL(
       
   178     const TKeyEvent& aKeyEvent,
       
   179     TEventCode aEventCode )
       
   180     {
       
   181     if( EKeyDeviceF == aKeyEvent.iCode )
       
   182         {
       
   183         __PHONELOG( EBasic, EPhoneUIStates,
       
   184             "CPhoneConferenceAndWaiting::HandleKeyMessageL-deviceF" );
       
   185         HandleHoldSwitchL();
       
   186         }
       
   187     }
       
   188 
       
   189 // -----------------------------------------------------------
       
   190 // CPhoneConferenceAndWaiting::OpenMenuBarL
       
   191 // -----------------------------------------------------------
       
   192 //
       
   193 void CPhoneConferenceAndWaiting::OpenMenuBarL()
       
   194     {
       
   195     __LOGMETHODSTARTEND(EPhoneUIStates, 
       
   196         "CPhoneConferenceAndWaiting::OpenMenuBarL()");
       
   197         
       
   198     TInt resourceId( EPhoneConfAndCallWaitingMenubar );
       
   199     
       
   200     if( IsNumberEntryVisibleL() )
       
   201         {
       
   202         resourceId = EPhoneConfAndCallWaitingMenubarWithNumberEntry;
       
   203         }
       
   204     else if ( IsConferenceBubbleInSelectionMode() )
       
   205         {
       
   206         resourceId = EPhoneConfCallParticipantsMenubar;    
       
   207         }        
       
   208     
       
   209     TPhoneCmdParamInteger integerParam;
       
   210     integerParam.SetInteger( 
       
   211                 CPhoneMainResourceResolver::Instance()->
       
   212                 ResolveResourceID( resourceId ) );
       
   213                 
       
   214     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, 
       
   215         &integerParam );
       
   216     }
       
   217 
       
   218 // -----------------------------------------------------------
       
   219 // CPhoneConferenceAndWaiting::HandleConnectedL
       
   220 // -----------------------------------------------------------
       
   221 //
       
   222 void CPhoneConferenceAndWaiting::HandleConnectedL( TInt aCallId )
       
   223     {
       
   224     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConnectedL()");
       
   225     TPhoneCmdParamCallStateData callStateData;
       
   226     
       
   227     if ( iRingingCallId == KErrNotFound )
       
   228         {
       
   229         // Fetch ringing call's id from view
       
   230         TPhoneCmdParamCallStateData callStateData;
       
   231         callStateData.SetCallState( EPEStateRinging );
       
   232         iViewCommandHandle->HandleCommandL(
       
   233             EPhoneViewGetCallIdByState, &callStateData );
       
   234         iRingingCallId = callStateData.CallId();   
       
   235         }
       
   236     
       
   237     if ( iRingingCallId == aCallId )
       
   238         {
       
   239         // not a member of conference call            
       
   240         MakeStateTransitionToConferenceAndSingleL( aCallId );
       
   241         }   
       
   242     else
       
   243         {
       
   244         // member of conference call which is on hold
       
   245         TPhoneCmdParamCallHeaderData callHeaderParam;
       
   246         callHeaderParam.SetCallState( EPEStateConnected );
       
   247         iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
       
   248             &callHeaderParam );
       
   249         }   
       
   250     }
       
   251 
       
   252 // -----------------------------------------------------------
       
   253 // CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL
       
   254 // -----------------------------------------------------------
       
   255 //
       
   256 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId )
       
   257     {
       
   258     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
       
   259     
       
   260     if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
       
   261         && iStateMachine->PhoneStorage()->IsScreenLocked() )
       
   262         {
       
   263         EnableCallUIL();
       
   264         }
       
   265     
       
   266     // Reset blocked keys list
       
   267     iStateMachine->PhoneStorage()->ResetBlockedKeysList();
       
   268     
       
   269     // Effect is shown when dialer exist.
       
   270     TBool effectStarted ( EFalse );
       
   271     if ( !NeedToSendToBackgroundL() )
       
   272         {
       
   273         BeginTransEffectLC( ENumberEntryOpen );
       
   274         effectStarted = ETrue; 
       
   275         }
       
   276         
       
   277     BeginUiUpdateLC();    
       
   278          
       
   279     UpdateRemoteInfoDataL ( aCallId );
       
   280     
       
   281     if ( IsConferenceBubbleInSelectionMode() )
       
   282         {
       
   283         CloseSelectionListL();                
       
   284         }
       
   285     
       
   286     // Show bubble
       
   287     TPhoneCmdParamCallHeaderData callHeaderParam;
       
   288     callHeaderParam.SetCallState( EPEStateConnected );
       
   289     iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, 
       
   290         &callHeaderParam );
       
   291     
       
   292     
       
   293     if ( IsNumberEntryUsedL() )
       
   294         {
       
   295         if ( NeedToSendToBackgroundL() )
       
   296             {
       
   297             // Return phone to the background if send to background is needed.
       
   298             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   299             
       
   300             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
       
   301             
       
   302             UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   303             }
       
   304         else
       
   305             {
       
   306             // Show the number entry if it exists.
       
   307             SetNumberEntryVisibilityL(ETrue);
       
   308             }
       
   309         }
       
   310     else
       
   311         {
       
   312         UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
       
   313         // If numberentry is not open just check NeedToSendToBackgroundL and 
       
   314         // sendbackround if needed.
       
   315         if ( NeedToSendToBackgroundL() )
       
   316             {
       
   317             // Return phone to the background if send to background is needed.
       
   318             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   319             }
       
   320         }
       
   321     SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
       
   322     SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
       
   323     
       
   324     EndUiUpdate();
       
   325     if( effectStarted )
       
   326         {
       
   327         EndTransEffect();    
       
   328         }
       
   329     // CBA updates in above if-else conditions
       
   330     iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );                     
       
   331     }
       
   332 
       
   333 // -----------------------------------------------------------
       
   334 // CPhoneConferenceAndWaiting::HandleIdleL
       
   335 // -----------------------------------------------------------
       
   336 //
       
   337 void CPhoneConferenceAndWaiting::HandleIdleL( TInt aCallId )
       
   338     {
       
   339     __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleIdleL()");
       
   340     
       
   341     if ( iRingingCallId == KErrNotFound )
       
   342         {
       
   343         // Fetch ringing call's id from view
       
   344         TPhoneCmdParamCallStateData callStateData;
       
   345         callStateData.SetCallState( EPEStateRinging );
       
   346         iViewCommandHandle->HandleCommandL(
       
   347             EPhoneViewGetCallIdByState, &callStateData );
       
   348         iRingingCallId = callStateData.CallId();   
       
   349         }
       
   350     
       
   351     if( iRingingCallId == aCallId )
       
   352         {
       
   353         // Effect is shown when dialer exist.
       
   354         TBool effectStarted ( EFalse );
       
   355         if ( !NeedToSendToBackgroundL() )
       
   356             {
       
   357             BeginTransEffectLC( ENumberEntryOpen );
       
   358             effectStarted = ETrue;
       
   359             }
       
   360         
       
   361         BeginUiUpdateLC();    
       
   362  
       
   363         // Idle message came for waiting call            
       
   364         // Close menu bar, if it is displayed
       
   365         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   366 
       
   367         // Remove call 
       
   368         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
       
   369             
       
   370         if ( IsNumberEntryUsedL() )
       
   371             {
       
   372             if ( NeedToSendToBackgroundL() )
       
   373                 {
       
   374                 // Return phone to the background if send to background is needed.
       
   375                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   376  
       
   377                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
       
   378                 
       
   379                 UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   380                 }
       
   381             else
       
   382                 {
       
   383                 // Show the number entry if it exists.
       
   384                 SetNumberEntryVisibilityL(ETrue);
       
   385                 }
       
   386             }
       
   387         else
       
   388             {
       
   389             UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
   390             // If numberentry is not open just check NeedToSendToBackgroundL and 
       
   391             // sendbackround if needed.
       
   392             if ( NeedToSendToBackgroundL() )
       
   393                 {
       
   394                 // Return phone to the background if send to background is needed.
       
   395                 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
       
   396                 }
       
   397             }
       
   398         
       
   399         if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke ) 
       
   400             && iStateMachine->PhoneStorage()->IsScreenLocked() )
       
   401             {
       
   402             EnableCallUIL();
       
   403             }
       
   404         
       
   405         // Reset blocked keys list
       
   406         iStateMachine->PhoneStorage()->ResetBlockedKeysList();
       
   407 
       
   408         if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode ) 
       
   409                 == EPhoneViewResponseSuccess )
       
   410             {
       
   411             SetTouchPaneButtons( EPhoneParticipantListButtons );
       
   412             }
       
   413         else
       
   414             {
       
   415             SetTouchPaneButtons( EPhoneConferenceButtons );    
       
   416             }
       
   417         EndUiUpdate();
       
   418         if ( effectStarted )
       
   419             {
       
   420             EndTransEffect();    
       
   421             }
       
   422          
       
   423         // Go to conference state
       
   424         // CBA updates in above if-else conditions
       
   425         iStateMachine->ChangeState( EPhoneStateConference );                    
       
   426         }
       
   427     else
       
   428         {
       
   429         // Idle message came for conference member
       
   430         CPhoneConference::HandleIdleL( aCallId );           
       
   431         
       
   432         TPhoneCmdParamBoolean conferenceBubbleExists;
       
   433         iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference,
       
   434                                              &conferenceBubbleExists );                            
       
   435                 
       
   436         if( !conferenceBubbleExists.Boolean() )
       
   437             {
       
   438             HandleConferenceIdleL();
       
   439             }     
       
   440         }
       
   441     }
       
   442 
       
   443 // -----------------------------------------------------------
       
   444 // CPhoneConferenceAndWaiting::HandleConferenceIdleL
       
   445 // -----------------------------------------------------------
       
   446 //
       
   447 void CPhoneConferenceAndWaiting::HandleConferenceIdleL()
       
   448     {
       
   449     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()");
       
   450  
       
   451     BeginTransEffectLC( ENumberEntryOpen );
       
   452     BeginUiUpdateLC();
       
   453     
       
   454     iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
       
   455     
       
   456     TPhoneCmdParamInteger activeCallCount;
       
   457     iViewCommandHandle->ExecuteCommandL(
       
   458         EPhoneViewGetCountOfActiveCalls, &activeCallCount );
       
   459         
       
   460      // Close menu bar, if it is displayed
       
   461     iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
       
   462         
       
   463     switch( activeCallCount.Integer() )
       
   464         {
       
   465         case ENoActiveCalls:
       
   466             // Go to incoming state
       
   467             {
       
   468             // Display ringing bubble
       
   469             TPhoneCmdParamCallHeaderData callHeaderParam;
       
   470             callHeaderParam.SetCallState( EPEStateRinging );
       
   471             
       
   472             // Set Hold flag to view
       
   473             TPhoneCmdParamBoolean holdFlag;
       
   474             holdFlag.SetBoolean( EFalse );
       
   475             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag );
       
   476               
       
   477             // Bring up callhandling view
       
   478             BringIncomingToForegroundL(); 
       
   479            
       
   480             SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam );
       
   481           
       
   482             iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, 
       
   483                 iRingingCallId ,&callHeaderParam );
       
   484             iCbaManager->UpdateIncomingCbaL( iRingingCallId );
       
   485             UpdateSilenceButtonDimming();
       
   486             
       
   487             // Hide number entry if visible
       
   488             if ( IsNumberEntryVisibleL() )
       
   489                 {
       
   490                 SetNumberEntryVisibilityL(EFalse);   
       
   491                 }
       
   492             
       
   493             // Check if HW Keys or Call UI should be disabled
       
   494             CheckDisableHWKeysAndCallUIL();
       
   495             
       
   496             SetTouchPaneButtons( EPhoneIncomingCallButtons );
       
   497             SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent );
       
   498             SetRingingTonePlaybackL( iRingingCallId );          
       
   499             SetToolbarDimming( ETrue );
       
   500             iStateMachine->ChangeState( EPhoneStateIncoming );
       
   501             break;   
       
   502             }   
       
   503             
       
   504         case EOneActiveCall:
       
   505             if ( IsNumberEntryUsedL() )
       
   506                 {
       
   507                 // Show the number entry if it exists
       
   508                 SetNumberEntryVisibilityL(ETrue);
       
   509                 }
       
   510             // Go to waiting in single state
       
   511             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
       
   512             
       
   513             // Check if HW Keys or Call UI should be disabled
       
   514             CheckDisableHWKeysAndCallUIL();
       
   515             
       
   516             SetTouchPaneButtons( EPhoneWaitingCallButtons );             
       
   517             iStateMachine->ChangeState( EPhoneStateWaitingInSingle );
       
   518             break;
       
   519             
       
   520         case ETwoActiveCalls:
       
   521             if ( IsNumberEntryUsedL() )
       
   522                 {
       
   523                 // Show the number entry if it exists
       
   524                 SetNumberEntryVisibilityL(ETrue);
       
   525                 }
       
   526             // Go to two singles and waiting state
       
   527             UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
       
   528             
       
   529             // Check if HW Keys or Call UI should be disabled
       
   530             CheckDisableHWKeysAndCallUIL();
       
   531             
       
   532             SetTouchPaneButtons( EPhoneWaitingCallButtons );               
       
   533 
       
   534             iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
       
   535             break; 
       
   536         default:
       
   537           // Too many active calls to handle reliable state change now.
       
   538           // Waiting for all conference member idles
       
   539           // This case may happen when 'End all calls' because conferenceIdle may 
       
   540           // come earlier than idle for conference member
       
   541            break;            
       
   542         }
       
   543     EndUiUpdate();
       
   544     EndTransEffect();  
       
   545     }
       
   546 
       
   547 // -----------------------------------------------------------
       
   548 // CPhoneConferenceAndWaiting::UpdateInCallCbaL
       
   549 // -----------------------------------------------------------
       
   550 //
       
   551 void CPhoneConferenceAndWaiting::UpdateInCallCbaL()
       
   552     {
       
   553     __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateInCallCbaL() ");
       
   554     UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA );
       
   555     }
       
   556 
       
   557 // -----------------------------------------------------------
       
   558 // CPhoneConferenceAndWaiting::HandleDiallingL
       
   559 // -----------------------------------------------------------
       
   560 //
       
   561 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId )
       
   562     {
       
   563     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   564         "CPhoneConferenceAndWaiting::HandleDiallingL()");
       
   565     
       
   566     BeginTransEffectLC( ENumberEntryClose );
       
   567     BeginUiUpdateLC();
       
   568     // Hide number entry if it exists
       
   569     SetNumberEntryVisibilityL(EFalse);        
       
   570 
       
   571     // Display call setup 
       
   572     DisplayCallSetupL( aCallId );
       
   573 
       
   574     SetTouchPaneButtons( EPhoneCallSetupButtons ); 
       
   575 
       
   576     EndUiUpdate();
       
   577     EndTransEffect();
       
   578     
       
   579     // Update conference and waiting and call setup softkeys
       
   580     UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
       
   581     
       
   582     // Go to conference and waiting and call setup state
       
   583     iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup );
       
   584     }
       
   585 
       
   586 // -----------------------------------------------------------
       
   587 // CPhoneConferenceAndWaiting::HandleWentOneToOneL
       
   588 // -----------------------------------------------------------
       
   589 //
       
   590 void CPhoneConferenceAndWaiting::HandleWentOneToOneL( TInt aCallId )
       
   591     {
       
   592     __LOGMETHODSTARTEND( EPhoneUIStates, 
       
   593         "CPhoneConferenceAndWaiting::HandleWentOneToOneL()");
       
   594 
       
   595     BeginUiUpdateLC();
       
   596     
       
   597     // Update conference bubble
       
   598     iViewCommandHandle->ExecuteCommandL(
       
   599         EPhoneViewPrivateFromConference, aCallId );
       
   600     
       
   601     if ( iRingingCallId == KErrNotFound )
       
   602         {
       
   603         // Fetch ringing call's id from view
       
   604         TPhoneCmdParamCallStateData callStateData;
       
   605         callStateData.SetCallState( EPEStateRinging );
       
   606         iViewCommandHandle->HandleCommandL(
       
   607             EPhoneViewGetCallIdByState, &callStateData );
       
   608         iRingingCallId = callStateData.CallId();   
       
   609         }
       
   610         
       
   611     TPhoneCmdParamBoolean conferenceBubbleExists;
       
   612     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, 
       
   613         &conferenceBubbleExists );                            
       
   614     if( conferenceBubbleExists.Boolean() && 
       
   615         ( iRingingCallId != KErrNotFound ) )
       
   616         {
       
   617         // Set touch controls
       
   618         SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
       
   619         SetTouchPaneButtons( EPhoneWaitingCallButtons );
       
   620         UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
       
   621         // Go to Conference And Single And Waiting state
       
   622         iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );  
       
   623         }
       
   624 
       
   625     EndUiUpdate();
       
   626     }
       
   627 
       
   628 // End of File