phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp
changeset 50 377c906a8701
parent 46 bc5a64e5bc3c
child 65 2a5d4ab426d3
--- a/phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp	Tue Jul 06 14:15:47 2010 +0300
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandsingle.cpp	Fri Jul 09 15:40:55 2010 +0300
@@ -57,14 +57,6 @@
 //
 CPhoneConferenceAndSingle::~CPhoneConferenceAndSingle()
     {
-    // Reset flag 
-    if ( iViewCommandHandle )
-        {
-        TPhoneCmdParamBoolean dtmfSendFlag;
-        dtmfSendFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommand( EPhoneViewSetDtmfOptionsFlag, 
-            &dtmfSendFlag );
-        }
     }
 
 // -----------------------------------------------------------
@@ -76,7 +68,6 @@
 void CPhoneConferenceAndSingle::ConstructL()
     {
     CPhoneConference::ConstructL();
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
     }
 
 // -----------------------------------------------------------
@@ -164,7 +155,6 @@
                     
         case EAknSoftkeyCancel:
             commandStatus = CPhoneConference::HandleCommandL( aCommand );
-            iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
             SetTouchPaneButtons( EPhoneConferenceAndHeldSingleButtons );
             break;
             
@@ -174,8 +164,6 @@
             break;
         
         case EPhoneInCallCmdParticipants:
-            commandStatus = CPhoneConference::HandleCommandL( aCommand );
-            SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
             break;
         
         default:
@@ -187,116 +175,6 @@
     }
 
 // -----------------------------------------------------------
-// CPhoneConferenceAndSingle::OpenMenuBarL
-// -----------------------------------------------------------
-//
-void CPhoneConferenceAndSingle::OpenMenuBarL()
-    {
-    __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::OpenMenuBarL");
-    
-    // Set Conference And Single specific flag to view
-    TPhoneCmdParamBoolean conferenceAndSingleFlag;
-    conferenceAndSingleFlag.SetBoolean( ETrue );
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
-        &conferenceAndSingleFlag );
-    
-    // Set specific flag to view so that DTMF menu item available
-    TPhoneCmdParamBoolean dtmfSendFlag;
-    dtmfSendFlag.SetBoolean( ETrue );
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, 
-        &dtmfSendFlag );        
-    
-    TPhoneViewResponseId response;
-    TPhoneCmdParamCallStateData callStateData;
-    TPhoneCmdParamBoolean booleaParam;
-    TInt heldCallId( KErrNotFound );
-    TInt connectedCallId( KErrNotFound );
-    
-    // Fetch active call's id from view
-    callStateData.SetCallState( EPEStateConnected );
-    response = iViewCommandHandle->HandleCommandL(
-        EPhoneViewGetCallIdByState, &callStateData );
-    if( response != EPhoneViewResponseSuccess )
-        {
-        // Unsuccesfull fetch - do nothing
-        return;            
-        }
-    connectedCallId = callStateData.CallId();
-    
-    // Fetch held call's id from view
-    callStateData.SetCallState( EPEStateHeld );
-    response = iViewCommandHandle->HandleCommandL(
-        EPhoneViewGetCallIdByState, &callStateData );
-    if( response != EPhoneViewResponseSuccess )
-        {
-        // Unsuccesfull fetch - do nothing
-        return;            
-        }
-    heldCallId = callStateData.CallId();
-
-    // Open the correct menubar according which call is active
-    TInt resourceId;
-    if( connectedCallId == KConferenceCallId )
-        {
-        if ( IsNumberEntryVisibleL() )
-            {
-            resourceId = EPhoneConfAndHeldCallMenubarWithNumberEntry;
-            }
-        else if ( IsConferenceBubbleInSelectionMode() )
-            {
-            resourceId = EPhoneConfCallParticipantsDropMenubar;    
-            }
-        else
-            {
-            resourceId = EPhoneConfAndHeldCallMenubar;
-            }
-        }
-    else
-        {
-        if ( IsNumberEntryVisibleL() )
-            {
-            resourceId = EPhoneActiveAndHeldConfMenubarWithNumberEntry;
-            }
-        else if ( IsConferenceBubbleInSelectionMode() )
-            {
-            resourceId = EPhoneConfCallParticipantsDropMenubar;    
-            }            
-        else
-            {
-            resourceId = EPhoneActiveAndHeldConfMenubar;
-            }            
-        }
-        
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
-    
-    // Check that calls are the same type (f.ex. both are CS calls)
-    booleaParam.SetBoolean( 
-        heldCallId != KErrNotFound && connectedCallId != KErrNotFound &&
-        iStateMachine->PhoneEngineInfo()->CallType( heldCallId ) != 
-        iStateMachine->PhoneEngineInfo()->CallType( connectedCallId ));
-
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConfrenceOptionsFlag, 
-        &booleaParam );
-
-    if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
-        {
-        resourceId = EPhoneDtmfDialerMenubar;
-        }
-    else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
-        {  
-        resourceId = CustomizedDialerMenuResourceIdL();         
-        }
-            
-    TPhoneCmdParamInteger integerParam;
-    integerParam.SetInteger( 
-                CPhoneMainResourceResolver::Instance()->
-                ResolveResourceID( resourceId ) );
-    
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, 
-        &integerParam );
-    }
-
-// -----------------------------------------------------------
 // CPhoneConferenceAndSingle::HandleConnectedConferenceL
 // -----------------------------------------------------------
 //
@@ -354,8 +232,6 @@
         callLabelId, 
         CCoeEnv::Static() );        
     callHeaderParam.SetLabelText( labelText );
-         
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
 
     BeginUiUpdateLC();
      
@@ -427,15 +303,9 @@
     UpdateConferenceSecurityStatusL( aCallId );
 
     SetTouchPaneButtons( EPhoneConferenceButtons );
-    SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );
     
     EndUiUpdate();
 
-    TPhoneCmdParamBoolean conferenceAndSingleFlag;
-    conferenceAndSingleFlag.SetBoolean( EFalse );
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
-        &conferenceAndSingleFlag );
-
     UpdateCbaL( EPhoneCallHandlingInCallCBA );
     iStateMachine->ChangeState( EPhoneStateConference );        
     }
@@ -468,12 +338,6 @@
     // Get allow waiting call header param value.
     AllowShowingOfWaitingCallHeaderL( dialerParam );
     
-    // Close conference list
-    TPhoneCmdParamBoolean booleanParam;
-    booleanParam.SetBoolean( EFalse );
-    iViewCommandHandle->ExecuteCommandL( 
-        EPhoneViewOpenConferenceList, &booleanParam );
-
     iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW );
     
     // Check if HW Keys or Call UI should be disabled
@@ -483,15 +347,9 @@
     DisplayIncomingCallL( aCallId, dialerParam  );
 
     // Set touch controls
-    SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
     SetTouchPaneButtons( EPhoneWaitingCallButtons );
     
     EndUiUpdate();
-
-    TPhoneCmdParamBoolean conferenceAndSingleFlag;
-    conferenceAndSingleFlag.SetBoolean( EFalse );
-    iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
-        &conferenceAndSingleFlag );
     
     // Go to Conference And Single And Waiting state
     UpdateCbaL( EPhoneCallHandlingIncomingRejectCBA );
@@ -507,12 +365,6 @@
     __LOGMETHODSTARTEND( EPhoneUIStates, 
         "CPhoneConferenceAndSingle::HandleIdleL");
     
-    // If dialler is not open then close menu bar.
-    if ( !IsNumberEntryUsedL() )
-        {
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
-        }
-    
     TPhoneCmdParamBoolean conferenceExistsForCallId;
     iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCallExistsInConference,
         aCallId, &conferenceExistsForCallId );
@@ -522,8 +374,6 @@
         // Remove conference member from conference bubble
         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveFromConference, 
             aCallId );                    
-
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateMaxConfMemberFlag );
         }
     else
         {       
@@ -531,24 +381,9 @@
         BeginUiUpdateLC(); 
         iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
 
-        TPhoneCmdParamBoolean conferenceAndSingleFlag;
-        conferenceAndSingleFlag.SetBoolean( EFalse );
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, 
-            &conferenceAndSingleFlag );
-        
-        TPhoneCmdParamBoolean participantsVisibleFlag;
-        iViewCommandHandle->ExecuteCommandL( EPhoneViewGetConferenceListVisibleFlag,
-                &participantsVisibleFlag );
+        SetTouchPaneButtons( EPhoneConferenceButtons );
         
-        // if participants list is visible - do not change buttons or cba
-        if( !participantsVisibleFlag.Boolean() )
-            {
-            // Go to Conference state
-            SetTouchPaneButtons( EPhoneConferenceButtons );
-            SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate );  
-            
-            UpdateCbaL( EPhoneCallHandlingInCallCBA );
-            }
+        UpdateCbaL( EPhoneCallHandlingInCallCBA );
       
 
         EndUiUpdate();