diff -r 92ab7f8d0eab -r 6bb1b21d2484 phoneapp/phoneuistates/src/cphonecallsetupandwaiting.cpp --- a/phoneapp/phoneuistates/src/cphonecallsetupandwaiting.cpp Fri Mar 19 09:28:42 2010 +0200 +++ b/phoneapp/phoneuistates/src/cphonecallsetupandwaiting.cpp Fri Apr 16 14:58:25 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -20,9 +20,6 @@ #include #include #include -// <-- QT PHONE START --> -//#include -// <-- QT PHONE END --> #include "cphonecallsetupandwaiting.h" #include "tphonecmdparamboolean.h" @@ -46,10 +43,10 @@ // C++ default constructor can NOT contain any code, that // might leave. // -CPhoneCallSetupAndWaiting::CPhoneCallSetupAndWaiting( - MPhoneStateMachine* aStateMachine, +CPhoneCallSetupAndWaiting::CPhoneCallSetupAndWaiting( + MPhoneStateMachine* aStateMachine, MPhoneViewCommandHandle* aViewCommandHandle, - MPhoneCustomization* aPhoneCustomization ) : + MPhoneCustomization* aPhoneCustomization ) : CPhoneGsmInCall( aStateMachine, aViewCommandHandle, aPhoneCustomization ) { } @@ -81,18 +78,18 @@ // (other items were commented in a header). // ----------------------------------------------------------- // -CPhoneCallSetupAndWaiting* CPhoneCallSetupAndWaiting::NewL( - MPhoneStateMachine* aStateMachine, +CPhoneCallSetupAndWaiting* CPhoneCallSetupAndWaiting::NewL( + MPhoneStateMachine* aStateMachine, MPhoneViewCommandHandle* aViewCommandHandle, MPhoneCustomization* aPhoneCustomization ) { - CPhoneCallSetupAndWaiting* self = new( ELeave ) CPhoneCallSetupAndWaiting( + CPhoneCallSetupAndWaiting* self = new( ELeave ) CPhoneCallSetupAndWaiting( aStateMachine, aViewCommandHandle, aPhoneCustomization ); - + CleanupStack::PushL( self ); self->ConstructL(); CleanupStack::Pop( self ); - + return self; } @@ -100,11 +97,11 @@ // CPhoneCallSetupAndWaiting::HandlePhoneEngineMessageL // ----------------------------------------------------------- // -void CPhoneCallSetupAndWaiting::HandlePhoneEngineMessageL( - const TInt aMessage, +void CPhoneCallSetupAndWaiting::HandlePhoneEngineMessageL( + const TInt aMessage, TInt aCallId ) { - __LOGMETHODSTARTEND( EPhoneUIStates, + __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetupAndWaiting::HandlePhoneEngineMessageL()"); switch ( aMessage ) { @@ -115,7 +112,7 @@ case MEngineMonitor::EPEMessageConnected: HandleConnectedL( aCallId ); break; - + default: CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); break; @@ -128,7 +125,7 @@ // void CPhoneCallSetupAndWaiting::OpenMenuBarL() { - __LOGMETHODSTARTEND( EPhoneUIStates, + __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetupAndWaiting::OpenMenuBarL()"); TInt resourceId; @@ -146,10 +143,10 @@ } TPhoneCmdParamInteger integerParam; - integerParam.SetInteger( + integerParam.SetInteger( CPhoneMainResourceResolver::Instance()-> ResolveResourceID( resourceId ) ); - iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, + iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, &integerParam ); } @@ -159,12 +156,12 @@ // void CPhoneCallSetupAndWaiting::HandleIdleL( TInt aCallId ) { - __LOGMETHODSTARTEND( EPhoneUIStates, + __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneCallSetupAndWaiting::HandleIdleL()"); - + BeginUiUpdateLC(); - - // Remove call + + // Remove call iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); // Close menu bar, if it is displayed @@ -173,9 +170,9 @@ // Find out do we have waiting or outgoing call left TPhoneCmdParamCallStateData callStateData; callStateData.SetCallState( EPEStateRinging ); - iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, + iViewCommandHandle->HandleCommandL( EPhoneViewGetCallIdByState, &callStateData ); - + if( callStateData.CallId() > KErrNotFound ) { // Idle message came for callSetup @@ -184,52 +181,53 @@ { CloseDTMFEditorL(); } - + // Display ringing bubble TPhoneCmdParamCallHeaderData callHeaderParam; callHeaderParam.SetCallState( EPEStateRinging ); - + SetCallHeaderTextsForCallComingInL( callStateData.CallId(), EFalse, &callHeaderParam ); - - iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, - callStateData.CallId(), + + iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, + callStateData.CallId(), &callHeaderParam ); - + // Show incoming call buttons - SetTouchPaneButtons( EPhoneIncomingCallButtons ); + SetTouchPaneButtons( EPhoneIncomingCallButtons ); SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); - - // Bring up callhandling view - BringIncomingToForegroundL(); - + + // Bring up callhandling view + BringIncomingToForegroundL(); + // state changes to Incoming iCbaManager->UpdateIncomingCbaL( callStateData.CallId() ); UpdateSilenceButtonDimming(); SetRingingTonePlaybackL( callStateData.CallId() ); - iStateMachine->ChangeState( EPhoneStateIncoming ); - } - + SetBackButtonActive(EFalse); + iStateMachine->ChangeState( EPhoneStateIncoming ); + } + else { // Show call setup buttons CPhoneState::SetTouchPaneButtons( EPhoneCallSetupButtons ); // Waiting call was terminated UpdateCbaL( EPhoneCallHandlingInCallCBA ); - iStateMachine->ChangeState( EPhoneStateAlerting ); + iStateMachine->ChangeState( EPhoneStateAlerting ); } - - EndUiUpdate(); + + EndUiUpdate(); } - + // ----------------------------------------------------------- // CPhoneCallSetupAndWaiting::UpdateInCallCbaL // ----------------------------------------------------------- // void CPhoneCallSetupAndWaiting::UpdateInCallCbaL() { - __LOGMETHODSTARTEND( EPhoneControl, + __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallSetupAndWaiting::UpdateInCallCbaL() "); - + UpdateCbaL( EPhoneCallHandlingIncomingRejectCBA ); } @@ -243,21 +241,21 @@ // Close menu bar, if it is displayed iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); - + CPhoneState::BeginUiUpdateLC(); // Update bubble TPhoneCmdParamCallHeaderData callHeaderParam; callHeaderParam.SetCallState( EPEStateConnected ); - iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, + iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); - - // Update Touch buttons + + // Update Touch buttons CPhoneState::SetTouchPaneButtons( EPhoneWaitingCallButtons ); SetToolbarDimming( EFalse ); - + CPhoneState::EndUiUpdate(); - + if ( CPhoneState::IsNumberEntryUsedL() ) { // Show number entry @@ -265,10 +263,10 @@ booleanParam.SetBoolean( ETrue ); iViewCommandHandle->ExecuteCommandL( EPhoneViewSetNumberEntryVisible, &booleanParam ); } - - // Go to Single And Waiting state - UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); - iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); + + // Go to Single And Waiting state + UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); + iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); } - + // End of File