--- a/phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneapp/phoneuistates/src/cphoneconferenceandwaiting.cpp Wed Sep 01 12:30:10 2010 +0100
@@ -19,8 +19,6 @@
// INCLUDES
#include <StringLoader.h>
#include <cpephonemodelif.h>
-#include <featmgr.h>
-#include <telephonyvariant.hrh>
#include "cphoneconferenceandwaiting.h"
#include "mphonestatemachine.h"
#include "phoneviewcommanddefinitions.h"
@@ -34,8 +32,6 @@
#include "phonerssbase.h"
#include "tphonecmdparamglobalnote.h"
#include "phoneui.hrh"
-#include "cphonecenrepproxy.h"
-#include "mphonestorage.h"
// ================= MEMBER FUNCTIONS =======================
@@ -119,7 +115,7 @@
break;
case MEngineMonitor::EPEMessageDialing:
- HandleDiallingL( aCallId );
+ HandleDialingL( aCallId );
break;
case MEngineMonitor::EPEMessageConferenceIdle:
@@ -130,23 +126,6 @@
HandleWentOneToOneL( aCallId );
break;
- case MEngineMonitor::EPEMessageHeldConference:
- case MEngineMonitor::EPEMessageConnectedConference:
- {
- TPhoneCmdParamInteger callIdParam;
- iViewCommandHandle->ExecuteCommandL(
- EPhoneViewGetExpandedBubbleCallId, &callIdParam );
-
- CPhoneConference::HandlePhoneEngineMessageL( aMessage,
- aCallId );
-
- if ( KConferenceCallId == callIdParam.Integer() )
- {
- iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded);
- }
- }
- break;
-
default:
CPhoneConference::HandlePhoneEngineMessageL( aMessage,
aCallId );
@@ -188,19 +167,61 @@
}
// -----------------------------------------------------------
-// CPhoneConferenceAndWaiting::HandleKeyEventL
+// CPhoneConferenceAndWaiting::HandleErrorL
+// -----------------------------------------------------------
+//
+EXPORT_C void CPhoneConferenceAndWaiting::HandleErrorL(
+ const TPEErrorInfo& aErrorInfo )
+ {
+ __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleErrorL()");
+
+ if( aErrorInfo.iErrorCode == ECCPErrorCCUserAlertingNoAnswer )
+ {
+ // Should not shown "No Answer" note
+ __PHONELOG1( EBasic, EPhoneUIStates,
+ "PhoneUIStates: CPhoneConferenceAndWaiting::HandleErrorL - aErrorInfo.iErrorCode =%d ",
+ aErrorInfo.iErrorCode);
+ }
+ else
+ {
+ CPhoneState::HandleErrorL( aErrorInfo );
+ }
+ }
+
+// -----------------------------------------------------------
+// CPhoneConferenceAndWaiting::OpenMenuBarL
// -----------------------------------------------------------
//
-void CPhoneConferenceAndWaiting::HandleKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode /*aEventCode*/ )
+void CPhoneConferenceAndWaiting::OpenMenuBarL()
{
- if( EKeyDeviceF == aKeyEvent.iCode )
+ __LOGMETHODSTARTEND(EPhoneUIStates,
+ "CPhoneConferenceAndWaiting::OpenMenuBarL()");
+
+ TInt resourceId( EPhoneConfAndCallWaitingMenubar );
+
+ if( IsNumberEntryVisibleL() )
+ {
+ resourceId = EPhoneConfAndCallWaitingMenubarWithNumberEntry;
+ }
+ else if ( IsConferenceBubbleInSelectionMode() )
{
- __PHONELOG( EBasic, EPhoneUIStates,
- "CPhoneConferenceAndWaiting::HandleKeyMessageL-deviceF" );
- HandleHoldSwitchL();
- }
+ resourceId = EPhoneConfCallParticipantsMenubar;
+ }
+
+ TPhoneCmdParamBoolean booleanParam;
+ const TBool videoWaiting = IsVideoCallRingingL();
+ booleanParam.SetBoolean( videoWaiting );
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndWaitingVideo,
+ &booleanParam );
+
+
+ TPhoneCmdParamInteger integerParam;
+ integerParam.SetInteger(
+ CPhoneMainResourceResolver::Instance()->
+ ResolveResourceID( resourceId ) );
+
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen,
+ &integerParam );
}
// -----------------------------------------------------------
@@ -244,51 +265,35 @@
void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId )
{
__LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()");
-
- if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && iStateMachine->PhoneStorage()->IsScreenLocked() )
- {
- EnableCallUIL();
- }
+ BeginUiUpdateLC();
- // Reset blocked keys list
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
-
- BeginUiUpdateLC();
-
UpdateRemoteInfoDataL ( aCallId );
-
- // Show bubble
+ if ( IsConferenceBubbleInSelectionMode() )
+ {
+ CloseSelectionListL();
+ }
TPhoneCmdParamCallHeaderData callHeaderParam;
callHeaderParam.SetCallState( EPEStateConnected );
- iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId,
- &callHeaderParam );
-
-
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble,
+ aCallId, &callHeaderParam );
if ( IsNumberEntryUsedL() )
{
- if ( NeedToSendToBackgroundL() )
- {
+ if ( NeedToReturnToForegroundAppL() )
+ {
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
UpdateCbaL( EPhoneCallHandlingInCallCBA );
}
- else
- {
- // Show the number entry if it exists.
- SetNumberEntryVisibilityL(ETrue);
- }
}
else
{
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA );
- // If numberentry is not open just check NeedToSendToBackgroundL and
- // sendbackround if needed.
}
SetTouchPaneButtons( EPhoneConferenceAndSingleButtons );
+ SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate );
EndUiUpdate();
-
// CBA updates in above if-else conditions
- iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );
+ iStateMachine->ChangeState( EPhoneStateConferenceAndSingle );
}
// -----------------------------------------------------------
@@ -311,65 +316,52 @@
if( iRingingCallId == aCallId )
{
-
- BeginUiUpdateLC();
-
- // Remove call
+ BeginUiUpdateLC();
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId );
if ( IsNumberEntryUsedL() )
{
- if ( NeedToSendToBackgroundL() )
+ if ( NeedToReturnToForegroundAppL() )
{
- // Return phone to the background if send to background is needed.
+ // Return phone to the background if menu application is needed to foreground.
iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
-
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
UpdateCbaL( EPhoneCallHandlingInCallCBA );
}
- else
- {
- // Show the number entry if it exists.
- SetNumberEntryVisibilityL(ETrue);
- }
}
else
{
UpdateCbaL( EPhoneCallHandlingInCallCBA );
- // If numberentry is not open just check NeedToSendToBackgroundL and
+ // If numberentry is not open just check NeedToReturnToForegroundAppL and
// sendbackround if needed.
- if ( NeedToSendToBackgroundL() )
+ if ( NeedToReturnToForegroundAppL() )
{
// Return phone to the background if send to background is needed.
iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
}
}
- if( FeatureManager::FeatureSupported( KFeatureIdFfTouchUnlockStroke )
- && iStateMachine->PhoneStorage()->IsScreenLocked() )
+ if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode )
+ == EPhoneViewResponseSuccess )
{
- EnableCallUIL();
+ SetTouchPaneButtons( EPhoneParticipantListButtons );
}
-
- // Reset blocked keys list
- iStateMachine->PhoneStorage()->ResetBlockedKeysList();
-
- SetTouchPaneButtons( EPhoneConferenceButtons );
-
+ else
+ {
+ SetTouchPaneButtons( EPhoneConferenceButtons );
+ }
EndUiUpdate();
-
- // Go to conference state
// CBA updates in above if-else conditions
- iStateMachine->ChangeState( EPhoneStateConference );
+ iStateMachine->ChangeState( EPhoneStateConference );
}
else
{
// Idle message came for conference member
- CPhoneConference::HandleIdleL( aCallId );
-
+ CPhoneConference::HandleIdleL( aCallId );
TPhoneCmdParamBoolean conferenceBubbleExists;
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference,
- &conferenceBubbleExists );
-
+ &conferenceBubbleExists );
if( !conferenceBubbleExists.Boolean() )
{
HandleConferenceIdleL();
@@ -384,15 +376,12 @@
void CPhoneConferenceAndWaiting::HandleConferenceIdleL()
{
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()");
-
BeginUiUpdateLC();
-
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble );
-
+ iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
TPhoneCmdParamInteger activeCallCount;
iViewCommandHandle->ExecuteCommandL(
- EPhoneViewGetCountOfActiveCalls, &activeCallCount );
-
+ EPhoneViewGetCountOfActiveCalls, &activeCallCount );
switch( activeCallCount.Integer() )
{
case ENoActiveCalls:
@@ -411,26 +400,24 @@
BringIncomingToForegroundL();
SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam );
-
+
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble,
iRingingCallId ,&callHeaderParam );
iCbaManager->UpdateIncomingCbaL( iRingingCallId );
+ UpdateSilenceButtonDimming();
// Hide number entry if visible
if ( IsNumberEntryVisibleL() )
{
- SetNumberEntryVisibilityL(EFalse);
+ SetNumberEntryVisibilityL(EFalse);
}
-
- // Check if HW Keys or Call UI should be disabled
- CheckDisableHWKeysAndCallUIL();
-
SetTouchPaneButtons( EPhoneIncomingCallButtons );
- SetRingingTonePlaybackL( iRingingCallId );
- SetBackButtonActive(EFalse);
+ SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent );
+ SetRingingTonePlaybackL( iRingingCallId );
+ SetToolbarDimming( ETrue );
iStateMachine->ChangeState( EPhoneStateIncoming );
- break;
- }
+ }
+ break;
case EOneActiveCall:
if ( IsNumberEntryUsedL() )
@@ -440,11 +427,7 @@
}
// Go to waiting in single state
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
-
- // Check if HW Keys or Call UI should be disabled
- CheckDisableHWKeysAndCallUIL();
-
- SetTouchPaneButtons( EPhoneWaitingCallButtons );
+ SetTouchPaneButtons( EPhoneWaitingCallButtons );
iStateMachine->ChangeState( EPhoneStateWaitingInSingle );
break;
@@ -456,12 +439,7 @@
}
// Go to two singles and waiting state
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
-
- // Check if HW Keys or Call UI should be disabled
- CheckDisableHWKeysAndCallUIL();
-
- SetTouchPaneButtons( EPhoneWaitingCallButtons );
-
+ SetTouchPaneButtons( EPhoneWaitingCallButtons );
iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting );
break;
default:
@@ -469,7 +447,7 @@
// Waiting for all conference member idles
// This case may happen when 'End all calls' because conferenceIdle may
// come earlier than idle for conference member
- break;
+ break;
}
EndUiUpdate();
}
@@ -485,33 +463,29 @@
}
// -----------------------------------------------------------
-// CPhoneConferenceAndWaiting::HandleDiallingL
+// CPhoneConferenceAndWaiting::HandleDialingL
// -----------------------------------------------------------
//
-void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId )
+void CPhoneConferenceAndWaiting::HandleDialingL( TInt aCallId )
{
__LOGMETHODSTARTEND( EPhoneUIStates,
- "CPhoneConferenceAndWaiting::HandleDiallingL()");
-
- BeginUiUpdateLC();
- // Hide number entry if it exists
- SetNumberEntryVisibilityL(EFalse);
-
+ "CPhoneConferenceAndWaiting::HandleDialingL()");
// Display call setup
DisplayCallSetupL( aCallId );
-
- SetTouchPaneButtons( EPhoneCallSetupButtons );
-
- EndUiUpdate();
-
- // Update conference and waiting and call setup softkeys
- UpdateCbaL( EPhoneCallHandlingCallSetupCBA );
-
// Go to conference and waiting and call setup state
iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup );
}
// -----------------------------------------------------------
+// CPhoneConferenceAndWaiting::DoStateSpecificCallSetUpDefinitionsL
+// -----------------------------------------------------------
+//
+EXPORT_C void CPhoneConferenceAndWaiting::DoStateSpecificCallSetUpDefinitionsL()
+ {
+ SetTouchPaneButtons( EPhoneCallSetupButtons );
+ }
+
+// -----------------------------------------------------------
// CPhoneConferenceAndWaiting::HandleWentOneToOneL
// -----------------------------------------------------------
//
@@ -542,48 +516,14 @@
if( conferenceBubbleExists.Boolean() &&
( iRingingCallId != KErrNotFound ) )
{
+ // Set touch controls
+ SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer );
SetTouchPaneButtons( EPhoneWaitingCallButtons );
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA );
// Go to Conference And Single And Waiting state
iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting );
}
-
EndUiUpdate();
}
-// -----------------------------------------------------------
-// CPhoneConferenceAndWaiting::HandleCommandL
-// -----------------------------------------------------------
-//
-TBool CPhoneConferenceAndWaiting::HandleCommandL( TInt aCommand )
- {
- __LOGMETHODSTARTEND( EPhoneUIStates,
- "CPhoneConferenceAndWaiting::HandleCommandL() ");
- TBool commandStatus = ETrue;
-
- switch( aCommand )
- {
- case EPhoneCmdUpdateUiControls:
- UpdateUiControlsL();
- break;
-
- default:
- commandStatus = CPhoneConference::HandleCommandL( aCommand );
- break;
- }
-
- return commandStatus;
- }
-
-// -----------------------------------------------------------
-// CPhoneConferenceAndWaiting::UpdateUiControlsL
-// -----------------------------------------------------------
-//
-void CPhoneConferenceAndWaiting::UpdateUiControlsL()
- {
- __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateUiControlsL( ) ");
- iViewCommandHandle->ExecuteCommand(EPhoneSetConferenceExpanded);
- UpdateCbaL( EPhoneCallHandlingInCallCBA );
- }
-
// End of File