author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 18:12:20 +0300 | |
changeset 45 | 6b911d05207e |
parent 37 | ba76fc04e6c2 |
child 50 | 377c906a8701 |
child 51 | f39ed5e045e0 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2006 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 CPhoneIdle class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include "cphoneidle.h" |
|
21 |
#include "phonerssbase.h" |
|
22 |
#include "phonelogger.h" |
|
23 |
#include "cphonegeneralgsmmessageshandler.h" |
|
24 |
#include "tphonecmdparamboolean.h" |
|
25 |
||
26 |
// ================= MEMBER FUNCTIONS ======================= |
|
27 |
||
28 |
// C++ default constructor can NOT contain any code, that |
|
29 |
// might leave. |
|
30 |
// |
|
31 |
EXPORT_C CPhoneIdle::CPhoneIdle( |
|
32 |
MPhoneStateMachine* aStateMachine, |
|
33 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
34 |
MPhoneCustomization* aPhoneCustomization ) : |
|
35 |
CPhoneStateIdle( aStateMachine, aViewCommandHandle, aPhoneCustomization ) |
|
36 |
{ |
|
37 |
} |
|
38 |
||
39 |
// ----------------------------------------------------------- |
|
40 |
// CPhoneIdle::~CPhoneIdle() |
|
41 |
// Destructor |
|
42 |
// (other items were commented in a header). |
|
43 |
// ----------------------------------------------------------- |
|
44 |
||
45 |
EXPORT_C CPhoneIdle::~CPhoneIdle() |
|
46 |
{ |
|
47 |
} |
|
48 |
||
49 |
// ----------------------------------------------------------- |
|
50 |
// CPhoneIdle::ConstructL() |
|
51 |
// Constructor |
|
52 |
// (other items were commented in a header). |
|
53 |
// ----------------------------------------------------------- |
|
54 |
// |
|
55 |
EXPORT_C void CPhoneIdle::ConstructL() |
|
56 |
{ |
|
57 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::ConstructL()"); |
|
58 |
CPhoneStateIdle::ConstructL(); |
|
59 |
} |
|
60 |
||
61 |
// ----------------------------------------------------------- |
|
62 |
// CPhoneIdle::NewL() |
|
63 |
// Constructor |
|
64 |
// (other items were commented in a header). |
|
65 |
// ----------------------------------------------------------- |
|
66 |
// |
|
67 |
CPhoneIdle* CPhoneIdle::NewL( |
|
68 |
MPhoneStateMachine* aStateMachine, |
|
69 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
70 |
MPhoneCustomization* aPhoneCustomization ) |
|
71 |
{ |
|
72 |
CPhoneIdle* self = new (ELeave) |
|
73 |
CPhoneIdle( aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
74 |
||
75 |
CleanupStack::PushL( self ); |
|
76 |
self->ConstructL(); |
|
77 |
CleanupStack::Pop( self ); |
|
78 |
||
79 |
return self; |
|
80 |
} |
|
81 |
||
82 |
// ----------------------------------------------------------- |
|
83 |
// CPhoneIdle::HandlePhoneEngineMessageL |
|
84 |
// ----------------------------------------------------------- |
|
85 |
// |
|
86 |
EXPORT_C void CPhoneIdle::HandlePhoneEngineMessageL( |
|
87 |
const TInt aMessage, |
|
88 |
TInt aCallId ) |
|
89 |
{ |
|
90 |
__LOGMETHODSTARTEND(EPhoneUIStates, |
|
91 |
"CPhoneIdle::HandlePhoneEngineMessageL() "); |
|
92 |
switch ( aMessage ) |
|
93 |
{ |
|
94 |
case MEngineMonitor::EPEMessageRemoteHeld: |
|
95 |
CPhoneState::SendGlobalInfoNoteL( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
96 |
EPhoneInformationRemotePutOnHoldNote, ETrue ); |
37 | 97 |
break; |
98 |
||
99 |
case MEngineMonitor::EPEMessageRemoteResumed: |
|
100 |
CPhoneState::SendGlobalInfoNoteL( |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
101 |
EPhoneInformationConnectedNote, ETrue ); |
37 | 102 |
break; |
103 |
||
104 |
case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
105 |
HandleAudioOutputChangedL(); |
|
106 |
break; |
|
107 |
||
108 |
case MEngineMonitor::EPEMessageIssuedSSRequest: // fall through |
|
109 |
// Note that after the sending of SS |
|
110 |
// strings the view stays in Dialer. |
|
111 |
if ( !iOnScreenDialer ) |
|
112 |
{ |
|
113 |
SetupIdleScreenInBackgroundL(); |
|
114 |
} |
|
115 |
case MEngineMonitor::EPEMessageIssuingSSRequest: // fall through |
|
116 |
case MEngineMonitor::EPEMessageCallBarred: // fall through |
|
117 |
case MEngineMonitor::EPEMessageTempClirActivationUnsuccessful: |
|
118 |
case MEngineMonitor::EPEMessageIncCallIsForw: // fall through |
|
119 |
case MEngineMonitor::EPEMessageIncCallForwToC: // fall through |
|
120 |
case MEngineMonitor::EPEMessageOutCallForwToC: // fall through |
|
121 |
case MEngineMonitor::EPEMessageForwardUnconditionalModeActive: // fall through |
|
122 |
case MEngineMonitor::EPEMessageForwardConditionallyModeActive: |
|
123 |
{ |
|
124 |
CPhoneGeneralGsmMessagesHandler* gsmMsgHandler = |
|
125 |
CPhoneGeneralGsmMessagesHandler::NewL( *iStateMachine, |
|
126 |
*iViewCommandHandle, |
|
127 |
*this ); |
|
128 |
CleanupStack::PushL( gsmMsgHandler ); |
|
129 |
gsmMsgHandler->HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
130 |
CleanupStack::PopAndDestroy( gsmMsgHandler ); |
|
131 |
} |
|
132 |
break; |
|
133 |
||
134 |
default: |
|
135 |
CPhoneStateIdle::HandlePhoneEngineMessageL( |
|
136 |
aMessage, aCallId ); |
|
137 |
break; |
|
138 |
} |
|
139 |
} |
|
140 |
||
141 |
// ----------------------------------------------------------- |
|
142 |
// CPhoneIdle::HandleErrorL |
|
143 |
// ----------------------------------------------------------- |
|
144 |
// |
|
145 |
EXPORT_C void CPhoneIdle::HandleErrorL( const TPEErrorInfo& aErrorInfo ) |
|
146 |
{ |
|
147 |
__LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneIdle::HandleErrorL() "); |
|
148 |
||
149 |
TPhoneCmdParamBoolean blockingDialogStatus; |
|
150 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetBlockingDialogStatus, |
|
151 |
&blockingDialogStatus ); |
|
152 |
||
153 |
if( blockingDialogStatus.Boolean() ) |
|
154 |
{ |
|
155 |
blockingDialogStatus.SetBoolean( EFalse ); |
|
156 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetBlockingDialogStatus, |
|
157 |
&blockingDialogStatus ); |
|
158 |
} |
|
159 |
||
160 |
CPhoneState::HandleErrorL( aErrorInfo ); |
|
161 |
} |
|
162 |
||
163 |
// End of File |