author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 00:16:48 +0300 | |
changeset 77 | 2be0b271d017 |
parent 72 | c76a0b1755b9 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005-2009 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 CPhoneState class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDE FILES |
|
20 |
#include <avkon.rsg> |
|
21 |
#include <bautils.h> |
|
22 |
#include <eikenv.h> |
|
23 |
#include <StringLoader.h> |
|
24 |
#include <pevirtualengine.h> |
|
25 |
#include <mpeclientinformation.h> |
|
26 |
#include <mpeengineinfo.h> |
|
27 |
#include <cpephonemodelif.h> |
|
28 |
#include <featmgr.h> |
|
29 |
#include <rconnmon.h> |
|
30 |
#include <Profile.hrh> |
|
31 |
#include <PUAcodes.hrh> |
|
32 |
#include <telephonyvariant.hrh> |
|
33 |
#include <aknsoundsystem.h> |
|
34 |
#include <wlaninternalpskeys.h> |
|
35 |
#include <btengdomainpskeys.h> |
|
36 |
#include <btengdomaincrkeys.h> |
|
37 |
#include <settingsinternalcrkeys.h> |
|
38 |
#include <starterclient.h> |
|
39 |
#include <rsssettings.h> |
|
40 |
#include <telephonydomainpstypes.h> |
|
41 |
#include <telinformationpskeys.h> |
|
42 |
#include <coreapplicationuisdomainpskeys.h> |
|
43 |
#include <mccecall.h> |
|
44 |
#include <ccpdefs.h> |
|
45 |
#include <LogsDomainCRKeys.h> |
|
46 |
#include <spsettings.h> |
|
47 |
#include <startupdomainpskeys.h> |
|
48 |
#include <MediatorDomainUIDs.h> |
|
49 |
#include <videotelcontrolmediatorapi.h> |
|
50 |
#include <textresolver.h> |
|
51 |
#include <phoneappvoipcommands.hrh> |
|
52 |
#include <hwrmdomainpskeys.h> |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
53 |
#include <hal.h> |
37 | 54 |
|
55 |
#include "phoneui.pan" |
|
56 |
#include "cphonestate.h" |
|
57 |
#include "mphonestatemachine.h" |
|
58 |
#include "mphoneviewcommandhandle.h" |
|
59 |
#include "tphonecmdparamboolean.h" |
|
60 |
#include "tphonecmdparaminteger.h" |
|
61 |
#include "tphonecmdparamkeyevent.h" |
|
62 |
#include "tphonecmdparamdynmenu.h" |
|
63 |
#include "tphonecmdparamcallheaderdata.h" |
|
64 |
#include "tphonecmdparamincallindicatordata.h" |
|
65 |
#include "tphonecmdparamnote.h" |
|
66 |
#include "tphonecmdparamkeycapture.h" |
|
67 |
#include "tphonecmdparamglobalnote.h" |
|
68 |
#include "tphonecmdparamquery.h" |
|
69 |
#include "tphonecmdparamstring.h" |
|
70 |
#include "tphonecmdparamcallstatedata.h" |
|
71 |
#include "tphonecmdparambitmap.h" |
|
72 |
#include "tphonecmdparamaudiooutput.h" |
|
73 |
#include "tphonecmdparamaudioavailability.h" |
|
74 |
#include "tphonecmdparamappinfo.h" |
|
75 |
#include "tphonecmdparamtranseffect.h" |
|
76 |
#include "tphonecmdparamringtone.h" |
|
77 |
#include "tphonecmdparamcustomdialer.h" |
|
78 |
#include "cphonekeys.h" |
|
79 |
#include "phoneui.hrh" |
|
80 |
#include "phonerssbase.h" |
|
81 |
#include "cphonebtaadisconnecthandler.h" |
|
82 |
#include "cphonemainresourceresolver.h" |
|
83 |
#include "cphonecenrepproxy.h" |
|
84 |
#include "cphonepubsubproxy.h" |
|
85 |
#include "phoneviewcommanddefinitions.h" |
|
86 |
#include "phonelogger.h" |
|
87 |
#include "phonestatedefinitions.h" |
|
88 |
#include "cphonetimer.h" |
|
89 |
#include "mphoneerrormessageshandler.h" |
|
90 |
#include "cphoneclearblacklist.h" |
|
91 |
#include "mphonecustomization.h" |
|
92 |
#include "cphonemainerrormessageshandler.h" |
|
93 |
#include "cphoneaccessorybthandler.h" |
|
94 |
#include "cphonemediatorfactory.h" |
|
95 |
#include "mphonemediatormessage.h" |
|
96 |
#include "cphonemediatorsender.h" |
|
97 |
#include "cphonereleasecommand.h" |
|
98 |
#include "cphonecontinueemergencycallcommand.h" |
|
99 |
#include "tphonecmdparamsfidata.h" |
|
100 |
#include "mphonestorage.h" |
|
101 |
#include "phoneconstants.h" |
|
102 |
#include "cphoneclearblacklist.h" |
|
103 |
||
104 |
// ================= MEMBER FUNCTIONS ======================= |
|
105 |
||
106 |
EXPORT_C CPhoneState::CPhoneState( |
|
107 |
MPhoneStateMachine* aStateMachine, |
|
108 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
109 |
MPhoneCustomization* aCustomization) : |
|
110 |
iStateMachine( aStateMachine ), |
|
111 |
iViewCommandHandle( aViewCommandHandle ), |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
112 |
iCustomization( aCustomization ) |
37 | 113 |
{ |
114 |
// Need to get current SimState for inherited classis |
|
115 |
iPreviousSimState = SimState(); |
|
116 |
__ASSERT_ALWAYS( |
|
117 |
aStateMachine && aViewCommandHandle, |
|
118 |
Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
119 |
} |
|
120 |
||
121 |
EXPORT_C void CPhoneState::BaseConstructL() |
|
122 |
{ |
|
123 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::BaseConstructL() "); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
124 |
if ( !iUiCommandManager ) |
37 | 125 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
126 |
iUiCommandManager = CPhoneUiCommandManager::NewL( |
37 | 127 |
this, |
128 |
*iViewCommandHandle, |
|
129 |
*iStateMachine ); |
|
130 |
} |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
131 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
132 |
if ( !iNumberEntryManager ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
133 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
134 |
iNumberEntryManager = CPhoneNumberEntryManager::NewL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
135 |
this, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
136 |
*iViewCommandHandle, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
137 |
*iStateMachine, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
138 |
iCustomization, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
139 |
*iUiCommandManager ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
140 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
141 |
|
37 | 142 |
} |
143 |
||
144 |
EXPORT_C CPhoneState::~CPhoneState() |
|
145 |
{ |
|
146 |
delete iNumberEntryManager; |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
147 |
delete iUiCommandManager; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
148 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
149 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
150 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
151 |
// CPhoneState::EikonEnv |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
152 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
153 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
154 |
EXPORT_C CEikonEnv* CPhoneState::EikonEnv() const |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
155 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
156 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::EikonEnv( ) "); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
157 |
return iEnv; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
158 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
159 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
160 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
161 |
// CPhoneState::SetEikonEnv |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
162 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
163 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
164 |
EXPORT_C void CPhoneState::SetEikonEnv( CEikonEnv* aEnv ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
165 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
166 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetEikonEnv( ) "); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
167 |
iEnv = aEnv; |
37 | 168 |
} |
169 |
||
170 |
// <-------------------------- PHONE ENGINE EVENTS ---------------------------> |
|
171 |
// ----------------------------------------------------------- |
|
172 |
// CPhoneState::HandlePhoneEngineMessageL |
|
173 |
// Default handling for Phone Engine messages |
|
174 |
// (other items were commented in a header). |
|
175 |
// ----------------------------------------------------------- |
|
176 |
// |
|
177 |
EXPORT_C void CPhoneState::HandlePhoneEngineMessageL( |
|
178 |
const TInt aMessage, |
|
179 |
TInt aCallId ) |
|
180 |
{ |
|
181 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneEngineMessageL() "); |
|
182 |
CPhoneAccessoryBTHandler* accessoryBtHandler; |
|
183 |
switch ( aMessage ) |
|
184 |
{ |
|
185 |
case MEngineMonitor::EPEMessageNetworkRegistrationStatusChange: |
|
186 |
{ |
|
187 |
__PHONELOG1( EBasic, EPhoneControl, |
|
188 |
"PHONEUI_ERROR: EPEMessageNetworkRegistrationStatusChange - RegistrationStatus =%d ", |
|
189 |
iStateMachine->PhoneEngineInfo()->NetworkRegistrationStatus()); |
|
190 |
} |
|
191 |
break; |
|
192 |
||
193 |
case MEngineMonitor::EPEMessageAudioMuteChanged: |
|
194 |
HandleAudioMuteChangedL(); |
|
195 |
break; |
|
196 |
||
197 |
case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
198 |
HandleAudioOutputChangedL(); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
199 |
UpdateUiCommands(); |
37 | 200 |
break; |
201 |
||
202 |
case MEngineMonitor::EPEMessageAvailableAudioOutputsChanged: |
|
203 |
HandleAudioAvailableOutputChangedL(); |
|
204 |
if ( iStateMachine->PhoneEngineInfo()->AudioOutput() != EPENotActive ) |
|
205 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
206 |
UpdateUiCommands(); |
37 | 207 |
} |
208 |
break; |
|
209 |
||
210 |
case MEngineMonitor::EPEMessageChangedCallDuration: |
|
211 |
HandleChangedCallDurationL( aCallId ); |
|
212 |
break; |
|
213 |
||
214 |
case MEngineMonitor::EPEMessageRemoteBusy: |
|
215 |
HandleRemoteBusyL( aCallId ); |
|
216 |
break; |
|
217 |
||
218 |
case MEngineMonitor::EPEMessageCallWaiting: |
|
219 |
case MEngineMonitor::EPEMessageProfileChanged: |
|
220 |
break; |
|
221 |
||
222 |
case MEngineMonitor::EPEMessageRemoteTerminated: |
|
223 |
/* Flow through */ |
|
224 |
case MEngineMonitor::EPEMessageDisconnecting: |
|
225 |
HandleDisconnectingL( aCallId ); |
|
226 |
break; |
|
227 |
||
228 |
case MEngineMonitor::EPEMessageTransferDone: |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
229 |
SendGlobalInfoNoteL( EPhoneInCallTransferred, ETrue ); |
37 | 230 |
break; |
231 |
||
232 |
case MEngineMonitor::EPEMessageInitiatedEmergencyCall: |
|
233 |
HandleInitiatedEmergencyCallL( aCallId ); |
|
234 |
break; |
|
235 |
||
236 |
case MEngineMonitor::EPEMessageInitiatedEmergencyWhileActiveVideo: |
|
237 |
HandleInitiatedEmergencyWhileActiveVideoL(); |
|
238 |
break; |
|
239 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
240 |
case MEngineMonitor::EPEMessageCallSecureStatusChanged: |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
241 |
HandleCallSecureStatusChangeL( aCallId ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
242 |
if ( iCustomization ) |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
243 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
244 |
iCustomization->HandlePhoneEngineMessageL( aMessage, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
245 |
aCallId ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
246 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
247 |
break; |
37 | 248 |
|
249 |
case MEngineMonitor::EPEMessageIssuingUSSDRequest: |
|
250 |
{ |
|
251 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
252 |
globalNotifierParam.SetBoolean( EFalse ); |
|
253 |
iViewCommandHandle->ExecuteCommandL( |
|
254 |
EPhoneViewSetGlobalNotifiersDisabled, |
|
255 |
&globalNotifierParam ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
256 |
iNumberEntryManager->NumberEntryClearL(); |
37 | 257 |
} |
258 |
break; |
|
259 |
||
260 |
case MEngineMonitor::EPEMessageIssuedUSSDRequest: |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
261 |
UpdateUiCommands(); |
37 | 262 |
break; |
263 |
||
264 |
// *#9990# |
|
265 |
case MEngineMonitor::EPEMessageShowBTLoopback: |
|
266 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
267 |
accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC( |
|
268 |
iViewCommandHandle, iStateMachine, this ); |
|
269 |
accessoryBtHandler->ShowBTLoopbackL(); |
|
270 |
CleanupStack::PopAndDestroy( accessoryBtHandler ); |
|
271 |
break; |
|
272 |
||
273 |
// *#2820# |
|
274 |
case MEngineMonitor::EPEMessageShowBTDeviceAddress: |
|
275 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
276 |
accessoryBtHandler = CPhoneAccessoryBTHandler::NewLC( |
|
277 |
iViewCommandHandle, iStateMachine, this ); |
|
278 |
accessoryBtHandler->ShowBTAddressL(); |
|
279 |
CleanupStack::PopAndDestroy( accessoryBtHandler ); |
|
280 |
break; |
|
281 |
||
282 |
// *#7370# |
|
283 |
case MEngineMonitor::EPEMessageActivateRfsDeep: |
|
284 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
285 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchRfsDeep ); |
|
286 |
break; |
|
287 |
||
288 |
// *#7780# |
|
289 |
case MEngineMonitor::EPEMessageActivateRfsNormal: |
|
290 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
291 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchRfsNormal ); |
|
292 |
break; |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
293 |
|
37 | 294 |
// *#62209526# |
295 |
case MEngineMonitor::EPEMessageShowWlanMacAddress: |
|
296 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageEndDTMF ); |
|
297 |
ShowWlanMacAddressL(); |
|
298 |
break; |
|
299 |
||
300 |
case MEngineMonitor::EPEMessageThumbnailLoadingCompleted: |
|
301 |
UpdateRemoteInfoDataL( aCallId ); |
|
302 |
break; |
|
303 |
||
304 |
case MEngineMonitor::EPEMessageRemotePartyInfoChanged: |
|
305 |
UpdateRemoteInfoDataL ( aCallId ); |
|
306 |
break; |
|
307 |
||
308 |
case MEngineMonitor::EPEMessageSIMStateChanged: |
|
309 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::HandlePhoneEngineMessageL - simStateChanged =%d", SimState() ); |
|
310 |
HandleSimStateChangedL(); |
|
311 |
break; |
|
312 |
||
313 |
case MEngineMonitor::EPEMessageShowIncCallGroupIndex: |
|
314 |
HandleCugInUseNoteL(); |
|
315 |
break; |
|
316 |
||
317 |
default: |
|
318 |
TBool handled( EFalse ); |
|
319 |
if ( iCustomization ) |
|
320 |
{ |
|
321 |
handled = iCustomization->HandlePhoneEngineMessageL( |
|
322 |
aMessage, aCallId ); |
|
323 |
} |
|
324 |
if ( EFalse == handled ) |
|
325 |
{ |
|
326 |
MPhoneMediatorMessage* mediatorMessage = CPhoneMediatorFactory::Instance()->MediatorMessage( aMessage, aCallId ); |
|
327 |
if( mediatorMessage ) |
|
328 |
{ |
|
329 |
CleanupDeletePushL( mediatorMessage ); |
|
330 |
mediatorMessage->ExecuteL(); |
|
331 |
CleanupStack::PopAndDestroy( mediatorMessage ); |
|
332 |
mediatorMessage = NULL; |
|
333 |
} |
|
334 |
} |
|
335 |
break; |
|
336 |
} |
|
337 |
} |
|
338 |
||
339 |
// ----------------------------------------------------------- |
|
340 |
// CPhoneState::HandleAudioMuteChangedL |
|
341 |
// Default handling for EPEMessageAudioMuteChanged message |
|
342 |
// (other items were commented in a header). |
|
343 |
// ----------------------------------------------------------- |
|
344 |
// |
|
345 |
EXPORT_C void CPhoneState::HandleAudioMuteChangedL() |
|
346 |
{ |
|
347 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioMuteChangedL() "); |
|
348 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
349 |
Panic( EPhoneCtrlInvariant ) ); |
|
350 |
TPhoneCmdParamBoolean booleanParam; |
|
351 |
const TBool audioMute = iStateMachine->PhoneEngineInfo()->AudioMute(); |
|
352 |
booleanParam.SetBoolean( audioMute ); |
|
353 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateMuteUIChanges, |
|
354 |
&booleanParam ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
355 |
UpdateUiCommands(); |
37 | 356 |
} |
357 |
||
358 |
// ----------------------------------------------------------- |
|
359 |
// CPhoneState::HandleAudioOutputChangedL |
|
360 |
// Default handling for EPEMessageAudioOutputChanged message |
|
361 |
// (other items were commented in a header). |
|
362 |
// ----------------------------------------------------------- |
|
363 |
// |
|
364 |
EXPORT_C void CPhoneState::HandleAudioOutputChangedL() |
|
365 |
{ |
|
366 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioOutputChangedL() "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
367 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
37 | 368 |
TPhoneCmdParamAudioOutput outputParam; |
369 |
const TPEAudioOutput audioOutput = |
|
370 |
iStateMachine->PhoneEngineInfo()->AudioOutput(); |
|
371 |
outputParam.SetAudioOutput( audioOutput ); |
|
372 |
||
373 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewActivateAudioPathUIChanges, |
|
374 |
&outputParam ); |
|
375 |
||
376 |
// Previous Output |
|
377 |
TPEPhoneAudioRouteParameters RouteParameters = iStateMachine-> |
|
378 |
PhoneEngineInfo()->RouteParameters(); |
|
379 |
const TPEAudioOutput previousOutput = |
|
380 |
RouteParameters.iPreviousOutput; |
|
381 |
||
382 |
TBool btAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable( |
|
383 |
EPEBTAudioAccessory ); |
|
384 |
// Show note or BT disconnect handler |
|
385 |
if ( audioOutput != EPENotActive && |
|
386 |
previousOutput == EPEBTAudioAccessory && |
|
387 |
!btAvailable ) |
|
388 |
{ |
|
389 |
CPhoneBtaaDisconnectHandler::InstanceL()->HandleConnectionLostL(); |
|
390 |
} |
|
391 |
else if ( audioOutput == EPEBTAudioAccessory && |
|
392 |
previousOutput != EPEBTAudioAccessory && |
|
393 |
btAvailable ) |
|
394 |
{ |
|
395 |
CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC( |
|
396 |
iViewCommandHandle, iStateMachine, this ); |
|
397 |
bt->ShowBTActivatedL(); |
|
398 |
CleanupStack::PopAndDestroy( bt ); |
|
399 |
} |
|
400 |
else if ( audioOutput == EPENotActive && |
|
401 |
CPhoneBtaaDisconnectHandler::InstanceL()->IsQuery() ) |
|
402 |
{ |
|
403 |
CPhoneBtaaDisconnectHandler::InstanceL()->Cancel(); |
|
404 |
} |
|
405 |
else if ( RouteParameters.iShowNote && audioOutput == EPELoudspeaker ) |
|
406 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
407 |
// Avkon removal |
37 | 408 |
} |
409 |
} |
|
410 |
||
411 |
// ----------------------------------------------------------- |
|
412 |
// CPhoneState::HandleSimStateChangedL |
|
413 |
// Handles changes in the SIM card state. |
|
414 |
// ----------------------------------------------------------- |
|
415 |
// |
|
416 |
void CPhoneState::HandleSimStateChangedL() |
|
417 |
{ |
|
418 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::HandleSimStateChangedL()" ); |
|
419 |
CPhoneMainResourceResolver& resolver = *CPhoneMainResourceResolver::Instance(); |
|
420 |
TPESimState simState = SimState(); |
|
421 |
__PHONELOG2( EBasic, EPhoneControl, "SIM state was changed from %d to %d", iPreviousSimState, simState ); |
|
422 |
switch ( simState ) |
|
423 |
{ |
|
424 |
case EPESimUsable: // Falls through. |
|
425 |
case EPESimReadable: // Falls through. |
|
426 |
case EPESimNotReady: |
|
427 |
{ |
|
428 |
if ( iPreviousSimState == EPESimNotPresent ) |
|
429 |
{ |
|
430 |
__PHONELOG( EBasic, EPhoneControl, "SIM card was inserted, rebooting the phone" ); |
|
431 |
RStarterSession starterSession; |
|
432 |
User::LeaveIfError( starterSession.Connect() ); |
|
433 |
CleanupClosePushL( starterSession ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
434 |
|
37 | 435 |
HBufC* queryText = StringLoader::LoadLC( resolver.ResolveResourceID( EPhoneRebootRequired ) ); |
436 |
TPhoneCmdParamQuery queryParams; |
|
437 |
queryParams.SetCommandParamId( TPhoneCommandParam::EPhoneParamRebootQuery ); |
|
438 |
queryParams.SetQueryPrompt( *queryText ); |
|
439 |
queryParams.SetDefaultCba( R_AVKON_SOFTKEYS_OK_EMPTY ); |
|
440 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, &queryParams ); |
|
441 |
starterSession.Reset( RStarterSession::ESIMStatusChangeReset ); |
|
442 |
CleanupStack::PopAndDestroy( 2, &starterSession ); // queryText |
|
443 |
} |
|
444 |
break; |
|
445 |
} |
|
446 |
case EPESimNotPresent: |
|
447 |
{ |
|
448 |
if ( iPreviousSimState == EPESimUsable || |
|
449 |
iPreviousSimState == EPESimReadable || |
|
450 |
iPreviousSimState == EPESimNotReady ) |
|
451 |
{ |
|
452 |
__PHONELOG( EBasic, EPhoneControl, "SIM card was removed" ); |
|
453 |
TPhoneCmdParamGlobalNote globalNoteParam; |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
454 |
globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
37 | 455 |
globalNoteParam.SetTextResourceId( |
456 |
CPhoneMainResourceResolver::Instance()-> |
|
457 |
ResolveResourceID( EPhoneSimRemoved ) ); |
|
458 |
iViewCommandHandle->ExecuteCommandL( |
|
459 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
|
460 |
} |
|
461 |
// Show security note, if SIM not present and KFeatureIdFfSimlessOfflineSupport is disabled. |
|
462 |
else if ( !FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) && |
|
463 |
( iPreviousSimState != EPESimNotSupported ) ) |
|
464 |
{ |
|
465 |
StartShowSecurityNoteL(); |
|
466 |
} |
|
467 |
break; |
|
468 |
} |
|
469 |
default: |
|
470 |
break; |
|
471 |
} |
|
472 |
iPreviousSimState = simState; |
|
473 |
} |
|
474 |
||
475 |
// ----------------------------------------------------------------------------- |
|
476 |
// CPhoneState::SendDtmfKeyEventL |
|
477 |
// send dtmf event when, |
|
478 |
// -touch dtmf dialer is NOT visible |
|
479 |
// -query is not active |
|
480 |
// -menubar is not open |
|
481 |
// ----------------------------------------------------------------------------- |
|
482 |
// |
|
483 |
void CPhoneState::SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
|
484 |
TEventCode aEventCode ) |
|
485 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
486 |
// Send the key event to the phone engine. |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
487 |
SendKeyEventL( aKeyEvent, aEventCode ); |
37 | 488 |
} |
489 |
||
490 |
// ----------------------------------------------------------- |
|
491 |
// CPhoneState::HandleErrorL |
|
492 |
// Default handling for HandleError message |
|
493 |
// (other items were commented in a header). |
|
494 |
// ----------------------------------------------------------- |
|
495 |
// |
|
496 |
EXPORT_C void CPhoneState::HandleErrorL( const TPEErrorInfo& aErrorInfo ) |
|
497 |
{ |
|
498 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleErrorL()"); |
|
499 |
__PHONELOG1( EBasic, EPhoneControl, |
|
500 |
"PhoneUIControl: CPhoneState::HandleErrorL - aErrorInfo.iErrorCode =%d ", |
|
501 |
aErrorInfo.iErrorCode ); |
|
502 |
__PHONELOG1( EBasic, EPhoneControl, |
|
503 |
"PhoneUIControl: CPhoneState::HandleErrorL - aErrorInfo.iCallId =%d ", |
|
504 |
aErrorInfo.iCallId ); |
|
505 |
// Do the common error handling (display proper notes etc) |
|
506 |
CPhoneMainErrorMessagesHandler::Instance()->ShowErrorSpecificNoteL( aErrorInfo ); |
|
507 |
switch( aErrorInfo.iErrorCode ) |
|
508 |
{ |
|
509 |
||
510 |
case ECCPErrorNoService: |
|
511 |
// No network -> hide volume popup |
|
512 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume ); |
|
513 |
break; |
|
514 |
||
515 |
case ECCPErrorSatControl: |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
516 |
iNumberEntryManager->NumberEntryClearL(); |
37 | 517 |
break; |
518 |
||
519 |
default: |
|
520 |
break; |
|
521 |
} |
|
522 |
// clear call blacklist if call failure occurs |
|
523 |
CPhoneClearBlacklist::Instance()->ClearBlackListOnNextKey(); |
|
524 |
} |
|
525 |
||
526 |
// ----------------------------------------------------------- |
|
527 |
// CPhoneState::HandleChangedCallDurationL |
|
528 |
// Default handling for EPEMessageChangedCallDuration message |
|
529 |
// (other items were commented in a header). |
|
530 |
// ----------------------------------------------------------- |
|
531 |
void CPhoneState::HandleChangedCallDurationL( TInt aCallId ) |
|
532 |
{ |
|
533 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleChangedCallDurationL() "); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
534 |
TInt ret = KErrNone; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
535 |
TInt isDisplayOn; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
536 |
ret = HAL::Get( HALData::EDisplayState, isDisplayOn ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
537 |
// Update only if the display is on or if HAL::Get returns an error, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
538 |
// in which case display value cannot be trusted. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
539 |
if ( ret || isDisplayOn ) |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
540 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
541 |
// Get the call duration |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
542 |
TTimeIntervalSeconds seconds = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
543 |
iStateMachine->PhoneEngineInfo()->CallDuration( aCallId ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
544 |
TPhoneCmdParamInteger time; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
545 |
time.SetInteger(seconds.Int()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
546 |
iViewCommandHandle->ExecuteCommandL(EPhoneViewUpdateCallHeaderCallDuration, aCallId, &time); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
547 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
548 |
} |
37 | 549 |
|
550 |
// ----------------------------------------------------------------------------- |
|
551 |
// CPhoneState::HandleRemoteBusyL |
|
552 |
// ----------------------------------------------------------------------------- |
|
553 |
// |
|
554 |
void CPhoneState::HandleRemoteBusyL( TInt aCallId ) |
|
555 |
{ |
|
556 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleRemoteBusyL( ) "); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
557 |
TPEErrorInfo info; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
558 |
info.iCallId = aCallId; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
559 |
info.iErrorCode = ECCPErrorBusy; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
560 |
info.iErrorType = EPECcp; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
561 |
CPhoneMainErrorMessagesHandler::Instance()->ShowErrorSpecificNoteL( info ); |
37 | 562 |
} |
563 |
||
564 |
// ----------------------------------------------------------- |
|
565 |
// CPhoneState::HandleDisconnectingL |
|
566 |
// ----------------------------------------------------------- |
|
567 |
// |
|
568 |
EXPORT_C void CPhoneState::HandleDisconnectingL( TInt aCallId ) |
|
569 |
{ |
|
570 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleDisconnectingL( ) "); |
|
571 |
||
572 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
573 |
iViewCommandHandle->ExecuteCommandL( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
574 |
EPhoneViewUpdateBubble, |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
575 |
aCallId); |
37 | 576 |
|
577 |
CPhoneClearBlacklist::Instance()->ClearBlackListOnNextKey(); |
|
578 |
} |
|
579 |
||
580 |
// <------------------------------- KEY EVENTS -------------------------------> |
|
581 |
// ----------------------------------------------------------- |
|
582 |
// CPhoneState::HandleKeyMessageL( aMessage, aKeyCode ) |
|
583 |
// ----------------------------------------------------------- |
|
584 |
// |
|
585 |
EXPORT_C void CPhoneState::HandleKeyMessageL( |
|
586 |
TPhoneKeyEventMessages /*aMessage*/, |
|
587 |
TKeyCode /*aKeyCode*/ ) |
|
588 |
{ |
|
589 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyMessageL( ) "); |
|
590 |
} |
|
591 |
||
592 |
// ----------------------------------------------------------- |
|
593 |
// CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ) |
|
594 |
// ----------------------------------------------------------- |
|
595 |
// |
|
596 |
EXPORT_C void CPhoneState::HandleKeyEventL( |
|
597 |
const TKeyEvent& aKeyEvent, |
|
598 |
TEventCode aEventCode ) |
|
599 |
{ |
|
600 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleKeyEventL( ) "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
601 |
if ( aKeyEvent.iScanCode == EStdKeyUpArrow && |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
602 |
aEventCode == EEventKey ) |
37 | 603 |
{ |
604 |
// Increace audio volume |
|
605 |
IncreaseAudioVolumeL(); |
|
606 |
} |
|
607 |
else if ( aKeyEvent.iScanCode == EStdKeyDownArrow && |
|
608 |
aEventCode == EEventKey ) |
|
609 |
{ |
|
610 |
// Decreace audio volume |
|
611 |
DecreaseAudioVolumeL(); |
|
612 |
} |
|
613 |
} |
|
614 |
||
615 |
// ----------------------------------------------------------- |
|
616 |
// CPhoneState::OnlySideVolumeKeySupported |
|
617 |
// ----------------------------------------------------------- |
|
618 |
// |
|
619 |
TBool CPhoneState::OnlySideVolumeKeySupported() |
|
620 |
{ |
|
621 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::OnlySideVolumeKeySupported( ) "); |
|
622 |
TBool onlySideVolumeKeySupported(EFalse); |
|
623 |
if ( !CPhoneCenRepProxy::Instance()-> |
|
624 |
IsTelephonyFeatureSupported( KTelephonyLVFlagScrollVolumeKeys ) && |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
625 |
FeatureManager::FeatureSupported( KFeatureIdSideVolumeKeys ) ) |
37 | 626 |
{ |
627 |
onlySideVolumeKeySupported = ETrue; |
|
628 |
} |
|
629 |
__PHONELOG1( EBasic, EPhoneControl, |
|
630 |
"OnlySideVolumeKeySupported: %d", |
|
631 |
onlySideVolumeKeySupported ); |
|
632 |
return onlySideVolumeKeySupported; |
|
633 |
} |
|
634 |
||
635 |
// ----------------------------------------------------------- |
|
636 |
// CPhoneState::SendKeyEventL |
|
637 |
// ----------------------------------------------------------- |
|
638 |
// |
|
639 |
void CPhoneState::SendKeyEventL( |
|
640 |
const TKeyEvent& aKeyEvent, |
|
641 |
TEventCode aEventCode ) |
|
642 |
{ |
|
643 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendKeyEventL( ) "); |
|
644 |
switch( aEventCode ) |
|
645 |
{ |
|
646 |
case EEventKey: |
|
647 |
// Send the key press to the phone engine, if applicable |
|
648 |
SendKeyPressL( aKeyEvent, aEventCode ); |
|
649 |
break; |
|
650 |
||
651 |
case EEventKeyUp: |
|
652 |
// Send a key up event for the last key code sent to |
|
653 |
// the phone engine |
|
654 |
iStateMachine->SendPhoneEngineMessage( |
|
655 |
MPEPhoneModel::EPEMessageEndDTMF ); |
|
656 |
break; |
|
657 |
||
658 |
default: |
|
659 |
break; |
|
660 |
} |
|
661 |
} |
|
662 |
||
663 |
// ----------------------------------------------------------- |
|
664 |
// CPhoneState::SendKeyPressL |
|
665 |
// ----------------------------------------------------------- |
|
666 |
// |
|
667 |
void CPhoneState::SendKeyPressL( |
|
668 |
const TKeyEvent& aKeyEvent, |
|
669 |
TEventCode aEventCode ) |
|
670 |
{ |
|
671 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendKeyPressL( ) "); |
|
672 |
const TBool dtmfToneKeyEntered = |
|
673 |
CPhoneKeys::IsDtmfTone( aKeyEvent, aEventCode ); |
|
674 |
||
675 |
if ( dtmfToneKeyEntered || |
|
676 |
aKeyEvent.iCode == EKeyBackspace ) |
|
677 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
678 |
// Get the number entry contents and store, if it exists |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
679 |
if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
37 | 680 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
681 |
HBufC* phoneNumber = iNumberEntryManager->PhoneNumberFromEntryLC(); |
37 | 682 |
__PHONELOG1( EBasic, EPhoneControl, "SetPhoneNumber: %S ", phoneNumber ); |
683 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( *phoneNumber ); |
|
684 |
||
685 |
// Convert key code to western. |
|
686 |
TBuf<1> buffer; // one character |
|
687 |
buffer.Append( aKeyEvent.iCode ); |
|
688 |
__PHONELOG1( EBasic, EPhoneControl, |
|
689 |
"CPhoneState::SendKeyPressL(%S)", |
|
690 |
&buffer ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
691 |
|
37 | 692 |
// Save the key code |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
693 |
TLex code( buffer ); |
37 | 694 |
iStateMachine->PhoneEngineInfo()->SetKeyCode( code.Peek() ); |
695 |
||
696 |
// Plays a DTMF tone if active call |
|
697 |
iStateMachine->SendPhoneEngineMessage( |
|
698 |
MPEPhoneModel::EPEMessagePlayDTMF ); |
|
699 |
CleanupStack::PopAndDestroy( phoneNumber ); |
|
700 |
} |
|
701 |
} |
|
702 |
} |
|
703 |
||
704 |
// <------------------------------ SYSTEM EVENTS -----------------------------> |
|
705 |
||
706 |
// ----------------------------------------------------------- |
|
707 |
// CPhoneState::HandlePhoneStartupL |
|
708 |
// ----------------------------------------------------------- |
|
709 |
// |
|
710 |
EXPORT_C void CPhoneState::HandlePhoneStartupL() |
|
711 |
{ |
|
712 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePhoneStartupL( ) "); |
|
713 |
// Empty implementation |
|
714 |
} |
|
715 |
||
716 |
// ----------------------------------------------------------- |
|
717 |
// CPhoneState::HandlePropertyChangedL |
|
718 |
// ----------------------------------------------------------- |
|
719 |
// |
|
720 |
EXPORT_C void CPhoneState::HandlePropertyChangedL( |
|
721 |
const TUid& aCategory, |
|
722 |
const TUint aKey, |
|
723 |
const TInt aValue ) |
|
724 |
{ |
|
725 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandlePropertyChangedL( ) "); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
726 |
if ( ( aCategory == KPSUidStartup ) && |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
727 |
( aKey == KStartupSimSecurityStatus ) && |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
728 |
( aValue == ESimRejected || aValue == ESimUnaccepted ) ) |
37 | 729 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
730 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
731 |
__PHONELOG3( EBasic, EPhoneControl, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
732 |
"CPhoneState::HandlePropertyChangedL -aCategory= %d, aKey= %d, aValue= %d", |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
733 |
aCategory, aKey, aValue ); |
37 | 734 |
// Show security note, SIM is not valid. |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
735 |
StartShowSecurityNoteL(); |
37 | 736 |
} |
737 |
} |
|
738 |
||
739 |
// <---------------------------- MENU AND CBA EVENTS -------------------------> |
|
740 |
EXPORT_C TBool CPhoneState::HandleCommandL( TInt aCommand ) |
|
741 |
{ |
|
742 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCommandL( ) "); |
|
743 |
TBool commandStatus = ETrue; |
|
744 |
switch( aCommand ) |
|
745 |
{ |
|
746 |
case EPhoneEmergencyCmdExit: |
|
747 |
case EPhoneDialerCallHandling: |
|
748 |
case EPhoneCmdBack: |
|
749 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
750 |
// Do state-specific behaviour if number entry is cleared |
|
751 |
HandleNumberEntryClearedL(); |
|
752 |
break; |
|
753 |
||
754 |
case EPhoneDialerCmdTouchInput: |
|
755 |
case EPhoneNumberAcqCmdSave: |
|
756 |
case EPhoneNumberAcqCmdAddToName: |
|
757 |
break; |
|
758 |
||
759 |
case EPhoneNumberAcqCmdAddToContacts: |
|
760 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
761 |
TPhoneCmdParamQuery queryDialogParam; |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
762 |
queryDialogParam.SetQueryType( EPhoneContactsListQuery ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
763 |
queryDialogParam.SetQueryResourceId( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
764 |
CPhoneMainResourceResolver::Instance()-> |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
765 |
ResolveResourceID( EPhoneAddtoContactsListQuery ) ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
766 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
767 |
&queryDialogParam ); |
37 | 768 |
} |
769 |
break; |
|
770 |
||
771 |
case EPhoneCmdWaitNoteOk: |
|
772 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
773 |
break; |
|
774 |
||
775 |
case EPhoneInCallCmdEndThisOutgoingCall: |
|
776 |
DisconnectCallL(); |
|
777 |
break; |
|
778 |
||
779 |
case EPhoneCmdYesBtDisconnectQuery: |
|
780 |
case EPhoneCmdNoBtDisconnectQuery: |
|
781 |
CPhoneBtaaDisconnectHandler::InstanceL()->HandleQueryDismissL( aCommand ); |
|
782 |
// Make sure that query is removed |
|
783 |
// if there has been also another ( by Cover UI ). |
|
784 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
|
785 |
break; |
|
786 |
||
787 |
case EPhoneInCallCmdDeactivateIhf: // fall through |
|
788 |
case EPhoneInCallCmdActivateIhf: |
|
789 |
SetHandsfreeModeL( aCommand == EPhoneInCallCmdActivateIhf ); |
|
790 |
break; |
|
791 |
||
792 |
case EPhoneInCallCmdHandset: // fall through |
|
793 |
case EPhoneInCallCmdBtHandsfree: |
|
794 |
CPhoneState::SetBTHandsfreeModeL( |
|
795 |
aCommand == EPhoneInCallCmdBtHandsfree ); |
|
796 |
break; |
|
797 |
||
798 |
case EPhoneInCallCmdActivatEPhonebook: |
|
799 |
case EPhoneNumberAcqSecurityDialer: |
|
800 |
case EPhoneDialerCmdContacts: |
|
801 |
case EPhoneNumberAcqCmdToggleNeAlphaMode: |
|
802 |
case EPhoneNumberAcqCmdToggleNeNumericMode: |
|
803 |
break; |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
804 |
|
37 | 805 |
case EPhoneInCallCmdSetVolumeLevel: |
806 |
{ |
|
807 |
// This command comes from ui control, no need to update |
|
808 |
// value to control (second parameter set false). |
|
809 |
ChangeAudioVolumeL( GetVolumeLevel(), EFalse ); |
|
810 |
} |
|
811 |
break; |
|
812 |
||
813 |
case EPhoneCmdVideoCallOutOfMemory: |
|
814 |
ShowVideoCallOutOfMemoryNoteL(); |
|
815 |
DisconnectCallL(); |
|
816 |
break; |
|
817 |
||
818 |
case EPhoneCallComingCmdSoftReject: |
|
819 |
OpenSoftRejectMessageEditorL(); |
|
820 |
break; |
|
821 |
||
822 |
case EPhoneInCallCmdContacts: |
|
823 |
iViewCommandHandle->ExecuteCommand( EPhoneViewOpenContacts ); |
|
824 |
break; |
|
825 |
||
826 |
default: |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
827 |
{ |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
828 |
commandStatus = EFalse; |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
829 |
} |
37 | 830 |
break; |
831 |
} |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
832 |
|
37 | 833 |
if( !commandStatus && iCustomization ) |
834 |
{ |
|
835 |
commandStatus = iCustomization->HandleCommandL( aCommand ); |
|
836 |
} |
|
837 |
return commandStatus; |
|
838 |
} |
|
839 |
||
840 |
// ----------------------------------------------------------------------------- |
|
841 |
// CPhoneState::ProcessCommandL |
|
842 |
// ----------------------------------------------------------------------------- |
|
843 |
// |
|
844 |
EXPORT_C TBool CPhoneState::ProcessCommandL( TInt /*aCommand*/ ) |
|
845 |
{ |
|
846 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateIdle::ProcessCommandL() "); |
|
847 |
// no implementation. |
|
848 |
return EFalse; |
|
849 |
} |
|
850 |
||
851 |
// <-------------------------- REMOTE CONTROL EVENTS -------------------------> |
|
852 |
||
853 |
// ----------------------------------------------------------------------------- |
|
854 |
// CPhoneState::HandleRemConCommandL |
|
855 |
// ----------------------------------------------------------------------------- |
|
856 |
// |
|
857 |
EXPORT_C TBool CPhoneState::HandleRemConCommandL( |
|
858 |
TRemConCoreApiOperationId aOperationId, |
|
859 |
TRemConCoreApiButtonAction /*aButtonAct*/ ) |
|
860 |
{ |
|
861 |
TBool handled = EFalse; |
|
862 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::MrccatoCommand() "); |
|
863 |
switch ( aOperationId ) |
|
864 |
{ |
|
865 |
case ERemConCoreApiVolumeUp: |
|
866 |
__PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiVolumeUp" ); |
|
867 |
IncreaseAudioVolumeL(); |
|
868 |
handled = ETrue; |
|
869 |
break; |
|
870 |
||
871 |
case ERemConCoreApiVolumeDown: |
|
872 |
__PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiVolumeDown" ); |
|
873 |
DecreaseAudioVolumeL(); |
|
874 |
handled = ETrue; |
|
875 |
break; |
|
876 |
case ERemConCoreApiMute: |
|
877 |
{ |
|
878 |
__PHONELOG( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand ERemConCoreApiMute" ); |
|
879 |
iStateMachine->PhoneEngineInfo()->AudioMute() ? |
|
880 |
iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( EFalse ): |
|
881 |
iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( ETrue ); |
|
882 |
iStateMachine->SendPhoneEngineMessage( |
|
883 |
MPEPhoneModel::EPEMessageSetAudioMute ); |
|
884 |
handled = ETrue; |
|
885 |
break; |
|
886 |
} |
|
887 |
||
888 |
default: |
|
889 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::MrccatoCommand MrccatoCmd.Other(%d)", aOperationId ); |
|
890 |
// Other commands ignored. |
|
891 |
break; |
|
892 |
} |
|
893 |
return handled; |
|
894 |
} |
|
895 |
||
896 |
// ----------------------------------------------------------- |
|
897 |
// CPhoneState::DecreaseAudioVolume() |
|
898 |
// ----------------------------------------------------------- |
|
899 |
// |
|
900 |
EXPORT_C void CPhoneState::DecreaseAudioVolumeL() |
|
901 |
{ |
|
902 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DecreaceAudioVolumeL( ) "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
903 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
37 | 904 |
TPEAudioOutput output( iStateMachine->PhoneEngineInfo()->AudioOutput() ); |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
905 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::DecreaseAudioVolumeL - audio output =%d", output ); |
37 | 906 |
if( output == EPETTY ) |
907 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
908 |
SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl, ETrue ); |
37 | 909 |
} |
910 |
else |
|
911 |
{ |
|
912 |
TInt audioVolume( iStateMachine->PhoneEngineInfo()->AudioVolume() ); |
|
913 |
audioVolume--; |
|
914 |
ChangeAudioVolumeL( audioVolume, ETrue ); |
|
915 |
} |
|
916 |
} |
|
917 |
||
918 |
// ----------------------------------------------------------- |
|
919 |
// CPhoneState::IncreaceAudioVolume() |
|
920 |
// ----------------------------------------------------------- |
|
921 |
// |
|
922 |
EXPORT_C void CPhoneState::IncreaseAudioVolumeL() |
|
923 |
{ |
|
924 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IncreaceAudioVolumeL( ) "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
925 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
37 | 926 |
TPEAudioOutput output( iStateMachine->PhoneEngineInfo()->AudioOutput() ); |
927 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IncreaseAudioVolumeL - audio output =%d", output ); |
|
928 |
if( output == EPETTY ) |
|
929 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
930 |
SendGlobalInfoNoteL( EPhoneNoteTTYNoAudioControl, ETrue ); |
37 | 931 |
} |
932 |
else |
|
933 |
{ |
|
934 |
TInt audioVolume( iStateMachine->PhoneEngineInfo()->AudioVolume() ); |
|
935 |
audioVolume++; |
|
936 |
ChangeAudioVolumeL( audioVolume, ETrue ); |
|
937 |
} |
|
938 |
} |
|
939 |
||
940 |
// ----------------------------------------------------------- |
|
941 |
// CPhoneState::ChangeAudioVolumeL() |
|
942 |
// ----------------------------------------------------------- |
|
943 |
// |
|
944 |
void CPhoneState::ChangeAudioVolumeL( TInt aLevel, TBool aUpdateControl ) |
|
945 |
{ |
|
946 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ChangeAudioVolumeL( ) "); |
|
947 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::ChangeAudioVolumeL - set volume =%d", aLevel ); |
|
948 |
TInt valueToControl = aLevel; |
|
949 |
// sets value between 1 -10 |
|
950 |
if ( aLevel>=KPhoneVolumeMinValue && aLevel<=KPhoneVolumeMaxValue ) |
|
951 |
{ |
|
952 |
iStateMachine->PhoneEngineInfo()->SetAudioVolumeCommand( aLevel ); |
|
953 |
// Syncronizes audio volume level between engine and ui |
|
954 |
// causes EPEMessageAudioVolumeChanged message to phoneUI |
|
955 |
iStateMachine->SendPhoneEngineMessage( |
|
956 |
MPEPhoneModel::EPEMessageSetAudioVolume ); |
|
957 |
} |
|
958 |
||
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
959 |
if ( aUpdateControl ) |
37 | 960 |
{ |
961 |
// Update the volume display. |
|
962 |
// Upper max (11) and under min (-1) |
|
963 |
// values are also updated to volume popup. |
|
964 |
TPhoneCmdParamInteger volumeParam; |
|
965 |
volumeParam.SetInteger( valueToControl ); |
|
966 |
iViewCommandHandle->ExecuteCommandL( |
|
967 |
EPhoneViewSetNaviPaneAudioVolume, |
|
968 |
&volumeParam ); |
|
969 |
} |
|
970 |
} |
|
971 |
||
972 |
// <-------------------------- COMMON STATE FUNCTIONS ------------------------> |
|
973 |
// ----------------------------------------------------------- |
|
974 |
// CPhoneState::DialMultimediaCallL |
|
975 |
// ----------------------------------------------------------- |
|
976 |
// |
|
977 |
EXPORT_C void CPhoneState::DialMultimediaCallL() |
|
978 |
{ |
|
979 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DialMultimediaCall() "); |
|
980 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
981 |
Panic( EPhoneCtrlInvariant ) ); |
|
982 |
iStateMachine->PhoneEngineInfo()->SetCallTypeCommand( EPECallTypeVideo ); |
|
983 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageDial ); |
|
984 |
} |
|
985 |
||
986 |
// ----------------------------------------------------------- |
|
987 |
// CPhoneState::DialVoiceCallL |
|
988 |
// ----------------------------------------------------------- |
|
989 |
// |
|
990 |
EXPORT_C void CPhoneState::DialVoiceCallL() |
|
991 |
{ |
|
992 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DialVoiceCallL() "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
993 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
37 | 994 |
TPhoneCmdParamBoolean globalNotifierParam; |
995 |
globalNotifierParam.SetBoolean( ETrue ); |
|
996 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
997 |
&globalNotifierParam ); |
|
998 |
iStateMachine->PhoneEngineInfo()->SetCallTypeCommand( EPECallTypeCSVoice ); |
|
999 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessageDial ); |
|
1000 |
} |
|
1001 |
||
1002 |
// ----------------------------------------------------------- |
|
1003 |
// CPhoneState::DisconnectCallL |
|
1004 |
// ----------------------------------------------------------- |
|
1005 |
// |
|
1006 |
EXPORT_C TBool CPhoneState::DisconnectCallL() |
|
1007 |
{ |
|
1008 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisconnectCallL( ) "); |
|
1009 |
TPhoneCmdParamInteger callIdParam; |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1010 |
iViewCommandHandle->ExecuteCommand( |
37 | 1011 |
EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
1012 |
TBool ret = EFalse; |
|
1013 |
if( callIdParam.Integer() > KErrNotFound ) |
|
1014 |
{ |
|
1015 |
iStateMachine->SetCallId( callIdParam.Integer() ); |
|
1016 |
if( IsVideoCall( callIdParam.Integer() ) ) |
|
1017 |
{ |
|
1018 |
// Video call can be released only after we get response to VT Shutdown Command |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1019 |
CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1020 |
KMediatorVideoTelephonyDomain, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1021 |
KCatPhoneToVideotelCommands, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1022 |
EVtCmdReleaseDataport, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1023 |
TVersion( KPhoneToVideotelCmdVersionMajor, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1024 |
KPhoneToVideotelCmdVersionMinor, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1025 |
KPhoneToVideotelCmdVersionBuild ), |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1026 |
KNullDesC8, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1027 |
CPhoneReleaseCommand::NewL( *iStateMachine ) ); |
37 | 1028 |
} |
1029 |
else |
|
1030 |
{ |
|
1031 |
iStateMachine->SendPhoneEngineMessage( |
|
1032 |
MPEPhoneModel::EPEMessageRelease ); |
|
1033 |
} |
|
1034 |
ret = ETrue; |
|
1035 |
} |
|
1036 |
else |
|
1037 |
{ |
|
1038 |
__PHONELOG( EOnlyFatal, EPhoneControl, |
|
1039 |
"CPhoneState::DisconnectCallL has negative call id!" ); |
|
1040 |
} |
|
1041 |
return ret; |
|
1042 |
} |
|
1043 |
||
1044 |
// ----------------------------------------------------------- |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1045 |
// CPhoneState::RemoveDialogsAndSendPhoneToBackgroundL() |
37 | 1046 |
// ----------------------------------------------------------- |
1047 |
// |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1048 |
EXPORT_C void CPhoneState::RemoveDialogsAndSendPhoneToBackgroundL() |
37 | 1049 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1050 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::RemoveDialogsAndSendPhoneToBackgroundL( ) "); |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1051 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
37 | 1052 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1053 |
UpdateUiCommands(); |
37 | 1054 |
} |
1055 |
||
1056 |
// ----------------------------------------------------------- |
|
1057 |
// CPhoneState::UpdateSingleActiveCallL |
|
1058 |
// ----------------------------------------------------------- |
|
1059 |
// |
|
1060 |
EXPORT_C void CPhoneState::UpdateSingleActiveCallL( TInt aCallId ) |
|
1061 |
{ |
|
1062 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::UpdateSingleActiveCallL( ) "); |
|
1063 |
BeginUiUpdateLC(); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1064 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1065 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId); |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1066 |
|
37 | 1067 |
UpdateRemoteInfoDataL( aCallId ); |
1068 |
||
1069 |
// Create call duration label if enabled |
|
1070 |
// This key will be moved to some other area, but since key |
|
1071 |
// is supported we can still use it. |
|
1072 |
TBool callDuration( EFalse ); |
|
1073 |
CPhoneCenRepProxy::Instance()->GetInt( |
|
1074 |
KCRUidLogs, KLogsShowCallDuration, callDuration ); |
|
1075 |
||
1076 |
if ( callDuration ) |
|
1077 |
{ |
|
1078 |
HandleChangedCallDurationL( aCallId ); |
|
1079 |
} |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1080 |
UpdateUiCommands(); |
37 | 1081 |
EndUiUpdate(); |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1082 |
|
37 | 1083 |
// If there is no need to send back ground and number entry is used then |
1084 |
// we must show number entry. |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1085 |
if ( iNumberEntryManager->IsNumberEntryUsedL() && !IsAutoLockOn() ) |
37 | 1086 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1087 |
iNumberEntryManager->SetNumberEntryVisibilityL(ETrue); |
37 | 1088 |
} |
1089 |
} |
|
1090 |
||
1091 |
// ----------------------------------------------------------- |
|
1092 |
// CPhoneState::IsWaitingCallL |
|
1093 |
// ----------------------------------------------------------- |
|
1094 |
// |
|
1095 |
TBool CPhoneState::IsWaitingCallL( const TInt aCallId ) |
|
1096 |
{ |
|
1097 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsWaitingCallL( ) "); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1098 |
TBool waiting( EFalse ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1099 |
if ( aCallId >= 0 && |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1100 |
iStateMachine->PhoneEngineInfo()->CallState( aCallId ) == EPEStateRinging ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1101 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1102 |
TPhoneCmdParamInteger activeCallCount; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1103 |
iViewCommandHandle->ExecuteCommandL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1104 |
EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1105 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1106 |
if( activeCallCount.Integer() > 0 ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1107 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1108 |
waiting = ETrue; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1109 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1110 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1111 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1112 |
return waiting; |
37 | 1113 |
} |
1114 |
||
1115 |
// ----------------------------------------------------------- |
|
1116 |
// CPhoneState::UpdateRemoteInfoDataL |
|
1117 |
// ----------------------------------------------------------- |
|
1118 |
// |
|
1119 |
EXPORT_C void CPhoneState::UpdateRemoteInfoDataL( TInt aCallId ) |
|
1120 |
{ |
|
1121 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::UpdateRemoteInfoDataL() "); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1122 |
/*TPhoneCmdParamCallHeaderData callHeaderParam = UpdateCallHeaderInfoL( aCallId ); |
37 | 1123 |
if( iCustomization ) |
1124 |
{ |
|
1125 |
TBuf<KCntMaxTextFieldLength> inCallNumberText( KNullDesC ); |
|
1126 |
// to check if we have VoIP call in question and fix |
|
1127 |
// parameters if needed |
|
1128 |
iCustomization->ModifyCallHeaderTexts( aCallId, &callHeaderParam, |
|
1129 |
inCallNumberText ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1130 |
}*/ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1131 |
//TODO |
37 | 1132 |
// Update the remote info data in the call header |
1133 |
iViewCommandHandle->ExecuteCommandL( |
|
1134 |
EPhoneViewUpdateCallHeaderRemoteInfoData, |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1135 |
aCallId ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1136 |
|
37 | 1137 |
} |
1138 |
||
1139 |
// <-------------------------- CONTEXT MENU -------------------------> |
|
1140 |
||
1141 |
// ----------------------------------------------------------- |
|
1142 |
// CPhoneState::ShowNoteL |
|
1143 |
// ----------------------------------------------------------- |
|
1144 |
// |
|
1145 |
EXPORT_C void CPhoneState::ShowNoteL( TInt aResourceId ) |
|
1146 |
{ |
|
1147 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowNoteL( ) "); |
|
1148 |
__ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1149 |
TPhoneCmdParamNote noteParam; |
|
1150 |
noteParam.SetType( EPhoneNotePermanent ); |
|
1151 |
noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
|
1152 |
ResolveResourceID( aResourceId ) ); |
|
1153 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
|
1154 |
} |
|
1155 |
||
1156 |
// ----------------------------------------------------------- |
|
1157 |
// CPhoneState::ShowQueryL |
|
1158 |
// ----------------------------------------------------------- |
|
1159 |
// |
|
1160 |
EXPORT_C void CPhoneState::ShowQueryL( TInt aResourceId ) |
|
1161 |
{ |
|
1162 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowQueryL( ) "); |
|
1163 |
__ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1164 |
TPhoneCmdParamQuery queryParam; |
|
1165 |
queryParam.SetQueryType( EPhoneQueryDialog ); |
|
1166 |
queryParam.SetQueryResourceId( CPhoneMainResourceResolver::Instance()-> |
|
1167 |
ResolveResourceID( aResourceId ) ); |
|
1168 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, &queryParam ); |
|
1169 |
} |
|
1170 |
||
1171 |
// ----------------------------------------------------------- |
|
1172 |
// CPhoneState::ShowTextQueryL |
|
1173 |
// ----------------------------------------------------------- |
|
1174 |
// |
|
1175 |
EXPORT_C void CPhoneState::ShowTextQueryL( |
|
1176 |
TInt aDialogResourceId, |
|
1177 |
TInt aDefaultCbaResourceId, |
|
1178 |
TInt aContentCbaResourceId, |
|
1179 |
TDes* aDataText, |
|
1180 |
TBool aSendKeyEnabled ) |
|
1181 |
{ |
|
1182 |
__ASSERT_DEBUG( aDialogResourceId && |
|
1183 |
aDefaultCbaResourceId && |
|
1184 |
aContentCbaResourceId && |
|
1185 |
aDataText, |
|
1186 |
Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
1187 |
TPhoneCmdParamQuery queryDialogParam; |
|
1188 |
queryDialogParam.SetQueryType( EPhoneTextQueryDialog ); |
|
1189 |
queryDialogParam.SetQueryResourceId( aDialogResourceId ); |
|
1190 |
queryDialogParam.SetDefaultCba( aDefaultCbaResourceId ); |
|
1191 |
queryDialogParam.SetContentCba( aContentCbaResourceId ); |
|
1192 |
queryDialogParam.SetDataText( aDataText ); |
|
1193 |
queryDialogParam.SetSendKeyEnabled( aSendKeyEnabled ); |
|
1194 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery, |
|
1195 |
&queryDialogParam ); |
|
1196 |
} |
|
1197 |
||
1198 |
// ----------------------------------------------------------- |
|
1199 |
// CPhoneState::DisplayCallTerminationNoteL |
|
1200 |
// ----------------------------------------------------------- |
|
1201 |
// |
|
1202 |
EXPORT_C void CPhoneState::DisplayCallTerminationNoteL() |
|
1203 |
{ |
|
1204 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::DisplayCallTerminationNoteL( ) "); |
|
1205 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
1206 |
Panic( EPhoneCtrlInvariant ) ); |
|
1207 |
if ( CheckIfShowCallTerminationNote() ) |
|
1208 |
{ |
|
1209 |
TBuf<KPhoneMaxCharsInNote> noteText; |
|
1210 |
TBuf<KPhoneMaxCharsInNote> postCallLineText; |
|
1211 |
||
1212 |
// Post call Line 1: Call Summary |
|
1213 |
LoadResource( postCallLineText, EPhoneNoteTextCallSummary ); |
|
1214 |
noteText.Append( postCallLineText ); |
|
1215 |
noteText.Append( KPhoneLineFeed ); |
|
1216 |
||
1217 |
// Post call Line 2: Duration |
|
1218 |
LoadResource( postCallLineText, EPhoneNoteTextCallDuration ); |
|
1219 |
noteText.Append( postCallLineText ); |
|
1220 |
noteText.Append( KPhoneLineFeed ); |
|
1221 |
||
1222 |
// Post call Line 3: Time, get the format for last call time. |
|
1223 |
LoadResource( postCallLineText, EPhoneCallDurationFormatString ); |
|
1224 |
TPtrC durationFormat( postCallLineText ); |
|
1225 |
||
1226 |
// Get the last call duration |
|
1227 |
TTime time( 0 ); |
|
1228 |
TTimeIntervalSeconds timeInterval = |
|
1229 |
iStateMachine->PhoneEngineInfo()->CallDuration(); |
|
1230 |
time += timeInterval; |
|
1231 |
||
1232 |
// Format the time |
|
1233 |
TBuf<KPhoneMaxTimeDisplayTextLength> timeString( KNullDesC ); |
|
1234 |
time.FormatL( timeString, durationFormat ); |
|
1235 |
||
1236 |
noteText.Append( timeString ); |
|
1237 |
||
1238 |
TPhoneCmdParamGlobalNote globalNoteParam; |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1239 |
globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
37 | 1240 |
globalNoteParam.SetText( noteText ); |
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1241 |
|
37 | 1242 |
iViewCommandHandle->ExecuteCommandL( |
1243 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
|
1244 |
} |
|
1245 |
} |
|
1246 |
||
1247 |
// --------------------------------------------------------- |
|
1248 |
// CPhoneState::SendGlobalInfoNoteL |
|
1249 |
// --------------------------------------------------------- |
|
1250 |
// |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1251 |
EXPORT_C void CPhoneState::SendGlobalInfoNoteL( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1252 |
TInt aResourceId, TBool aNotificationDialog ) |
37 | 1253 |
{ |
1254 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalInfoNoteL( ) "); |
|
1255 |
__ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1256 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1257 |
// Avkon removal |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1258 |
TPhoneCmdParamBoolean globalNotifierParam; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1259 |
globalNotifierParam.SetBoolean( EFalse ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1260 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1261 |
&globalNotifierParam ); |
37 | 1262 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1263 |
TPhoneCmdParamGlobalNote globalNoteParam; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1264 |
PhoneNotificationType type = aNotificationDialog ? |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1265 |
EPhoneNotificationDialog : EPhoneMessageBoxInformation; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1266 |
globalNoteParam.SetType( type ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1267 |
globalNoteParam.SetTextResourceId( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1268 |
CPhoneMainResourceResolver::Instance()-> |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1269 |
ResolveResourceID( aResourceId ) ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1270 |
globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1271 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1272 |
iViewCommandHandle->ExecuteCommandL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1273 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1274 |
|
37 | 1275 |
} |
1276 |
||
1277 |
// --------------------------------------------------------- |
|
1278 |
// CPhoneUIController::SendGlobalWarningNoteL |
|
1279 |
// --------------------------------------------------------- |
|
1280 |
// |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1281 |
EXPORT_C void CPhoneState::SendGlobalWarningNoteL( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1282 |
TInt aResourceId, TBool aNotificationDialog ) |
37 | 1283 |
{ |
1284 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalWarningNoteL( ) "); |
|
1285 |
__ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1286 |
if ( SimState() == EPESimReadable ) |
37 | 1287 |
{ |
1288 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
1289 |
globalNotifierParam.SetBoolean( EFalse ); |
|
1290 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
1291 |
&globalNotifierParam ); |
|
1292 |
||
1293 |
TPhoneCmdParamGlobalNote globalNoteParam; |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1294 |
PhoneNotificationType type = aNotificationDialog ? |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1295 |
EPhoneNotificationDialog : EPhoneMessageBoxWarning; |
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1296 |
globalNoteParam.SetType( type ); |
37 | 1297 |
globalNoteParam.SetTextResourceId( |
1298 |
CPhoneMainResourceResolver::Instance()-> |
|
1299 |
ResolveResourceID( aResourceId ) ); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1300 |
globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1301 |
|
37 | 1302 |
iViewCommandHandle->ExecuteCommandL( |
1303 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
|
1304 |
} |
|
1305 |
} |
|
1306 |
||
1307 |
// --------------------------------------------------------- |
|
1308 |
// CPhoneUIController::SendGlobalErrorNoteL |
|
1309 |
// --------------------------------------------------------- |
|
1310 |
// |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1311 |
EXPORT_C void CPhoneState::SendGlobalErrorNoteL( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1312 |
TInt aResourceId, TBool aNotificationDialog ) |
37 | 1313 |
{ |
1314 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SendGlobalErrorNoteL( ) "); |
|
1315 |
__ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1316 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1317 |
TPhoneCmdParamBoolean globalNotifierParam; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1318 |
globalNotifierParam.SetBoolean( EFalse ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1319 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1320 |
&globalNotifierParam ); |
37 | 1321 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1322 |
TPhoneCmdParamGlobalNote globalNoteParam; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1323 |
PhoneNotificationType type = aNotificationDialog ? |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1324 |
EPhoneNotificationDialog : EPhoneMessageBoxInformation; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1325 |
globalNoteParam.SetType( type ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1326 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1327 |
globalNoteParam.SetTextResourceId( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1328 |
CPhoneMainResourceResolver::Instance()-> |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1329 |
ResolveResourceID( aResourceId ) ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1330 |
globalNoteParam.SetNotificationDialog( aNotificationDialog ); |
37 | 1331 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1332 |
iViewCommandHandle->ExecuteCommandL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1333 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1334 |
|
37 | 1335 |
} |
1336 |
||
1337 |
// --------------------------------------------------------- |
|
1338 |
// CPhoneState::SetHandsfreeModeL |
|
1339 |
// --------------------------------------------------------- |
|
1340 |
// |
|
1341 |
EXPORT_C void CPhoneState::SetHandsfreeModeL( TBool aHandsfreeMode ) |
|
1342 |
{ |
|
1343 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetHandsfreeModeL( ) "); |
|
1344 |
CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC( |
|
1345 |
iViewCommandHandle, iStateMachine, this ); |
|
1346 |
if ( !bt->SetHandsfreeModeL( aHandsfreeMode )) |
|
1347 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1348 |
SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
37 | 1349 |
} |
1350 |
CleanupStack::PopAndDestroy( bt ); |
|
1351 |
} |
|
1352 |
||
1353 |
// --------------------------------------------------------- |
|
1354 |
// CPhoneState::SetBTHandsfreeModeL |
|
1355 |
// --------------------------------------------------------- |
|
1356 |
// |
|
1357 |
EXPORT_C void CPhoneState::SetBTHandsfreeModeL( TBool aHandsfreeMode ) |
|
1358 |
{ |
|
1359 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetBTHandsfreeModeL( ) "); |
|
1360 |
CPhoneAccessoryBTHandler* bt = CPhoneAccessoryBTHandler::NewLC( |
|
1361 |
iViewCommandHandle, iStateMachine, this ); |
|
1362 |
if ( !bt->SetBTHandsfreeModeL( aHandsfreeMode )) |
|
1363 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1364 |
SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
37 | 1365 |
} |
1366 |
CleanupStack::PopAndDestroy( bt ); |
|
1367 |
} |
|
1368 |
||
1369 |
// <-------------------------- INTERNAL FUNCTIONS ------------------------> |
|
1370 |
// ----------------------------------------------------------- |
|
1371 |
// CPhoneState::HandleInitiatedEmergencyCallL |
|
1372 |
// Default handling for EPEMessageInitiatedEmergencyCallL message |
|
1373 |
// (other items were commented in a header). |
|
1374 |
// ----------------------------------------------------------- |
|
1375 |
// |
|
1376 |
void CPhoneState::HandleInitiatedEmergencyCallL( TInt /*aCallId*/ ) |
|
1377 |
{ |
|
1378 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleInitiatedEmergencyCallL( ) "); |
|
1379 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
1380 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewStopRingTone ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1381 |
|
37 | 1382 |
iStateMachine->ChangeState( EPhoneStateEmergency ); |
1383 |
} |
|
1384 |
||
1385 |
// ----------------------------------------------------------- |
|
1386 |
// CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL |
|
1387 |
// ----------------------------------------------------------- |
|
1388 |
// |
|
1389 |
void CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL() |
|
1390 |
{ |
|
1391 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleInitiatedEmergencyWhileActiveVideoL( ) "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1392 |
// We have existing video call so need to release dataport before continuings |
37 | 1393 |
// emergency call. Otherwise we will face problems with dataport use later. |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1394 |
CPhoneMediatorFactory::Instance()->Sender()->IssueCommand( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1395 |
KMediatorVideoTelephonyDomain, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1396 |
KCatPhoneToVideotelCommands, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1397 |
EVtCmdReleaseDataport, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1398 |
TVersion( KPhoneToVideotelCmdVersionMajor, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1399 |
KPhoneToVideotelCmdVersionMinor, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1400 |
KPhoneToVideotelCmdVersionBuild ), |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1401 |
KNullDesC8, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1402 |
CPhoneContinueEmergencyCallCommand::NewL( *iStateMachine ) ); |
37 | 1403 |
} |
1404 |
||
1405 |
// ----------------------------------------------------------- |
|
1406 |
// CPhoneState::HandleCallSecureStatusChangeL |
|
1407 |
// ----------------------------------------------------------- |
|
1408 |
// |
|
1409 |
void CPhoneState::HandleCallSecureStatusChangeL( TInt aCallId ) |
|
1410 |
{ |
|
1411 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCallSecureStatusChangeL( ) "); |
|
1412 |
iViewCommandHandle->ExecuteCommandL( |
|
1413 |
EPhoneViewCipheringInfoChange, |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1414 |
aCallId); |
37 | 1415 |
} |
1416 |
||
1417 |
// --------------------------------------------------------- |
|
1418 |
// CPhoneState::IsVideoCall |
|
1419 |
// --------------------------------------------------------- |
|
1420 |
// |
|
1421 |
EXPORT_C TBool CPhoneState::IsVideoCall( const TInt aCallId ) |
|
1422 |
{ |
|
1423 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsVideoCall( ) "); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1424 |
if ( aCallId < 0 ) |
37 | 1425 |
{ |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1426 |
return EFalse; |
37 | 1427 |
} |
1428 |
||
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1429 |
return EPECallTypeVideo == iStateMachine->PhoneEngineInfo()->CallType( aCallId ); |
37 | 1430 |
} |
1431 |
||
1432 |
// --------------------------------------------------------- |
|
1433 |
// CPhoneState::GetActiveCallIdL() |
|
1434 |
// --------------------------------------------------------- |
|
1435 |
// |
|
1436 |
TInt CPhoneState::GetActiveCallIdL() |
|
1437 |
{ |
|
1438 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::GetActiveCallId()( ) "); |
|
1439 |
// Fetch active call's id from view |
|
1440 |
TPhoneViewResponseId response; |
|
1441 |
TPhoneCmdParamCallStateData callStateData; |
|
1442 |
callStateData.SetCallState( EPEStateConnected ); |
|
1443 |
response = iViewCommandHandle->HandleCommandL( |
|
1444 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
1445 |
||
1446 |
if ( response == EPhoneViewResponseSuccess && |
|
1447 |
callStateData.CallId() < 0 ) // no connected calls |
|
1448 |
{ |
|
1449 |
// check for held call |
|
1450 |
callStateData.SetCallState( EPEStateHeld ); |
|
1451 |
response = iViewCommandHandle->HandleCommandL( |
|
1452 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
1453 |
} |
|
1454 |
return callStateData.CallId(); |
|
1455 |
} |
|
1456 |
||
1457 |
// --------------------------------------------------------- |
|
1458 |
// CPhoneState::SimState() |
|
1459 |
// --------------------------------------------------------- |
|
1460 |
// |
|
1461 |
EXPORT_C TPESimState CPhoneState::SimState() const |
|
1462 |
{ |
|
1463 |
/* |
|
1464 |
SIM states: |
|
1465 |
EPESimStatusUninitialized = KPEStartupEnumerationFirstValue =100, |
|
1466 |
EPESimUsable, // The Sim card is fully usable. |
|
1467 |
EPESimReadable, // The SIM card is not fully usable, but the emergency number can be read. |
|
1468 |
EPESimNotReady, // The Sim card is present but not ready or usable. |
|
1469 |
EPESimNotPresent, // The Sim card is not present. |
|
1470 |
EPESimNotSupported // SIM/RUIM is not supported. Some CDMA phones do not support a SIM/RUIM at all. |
|
1471 |
*/ |
|
1472 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimState()"); |
|
1473 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
1474 |
Panic( EPhoneCtrlInvariant ) ); |
|
1475 |
TPESimState simState = iStateMachine->PhoneEngineInfo()->SimState(); |
|
1476 |
__PHONELOG1( EBasic, EPhoneControl, |
|
1477 |
"CPhoneState::SimState - value= %d", simState ); |
|
1478 |
return simState; |
|
1479 |
} |
|
1480 |
||
1481 |
// --------------------------------------------------------- |
|
1482 |
// CPhoneState::IsSimOk() |
|
1483 |
// --------------------------------------------------------- |
|
1484 |
// |
|
1485 |
EXPORT_C TBool CPhoneState::IsSimOk() |
|
1486 |
{ |
|
1487 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsSimOk()"); |
|
1488 |
// Phone is interested on Sim state and sim security statuses |
|
1489 |
// Check first Sim state status: |
|
1490 |
TBool retVal( ETrue ); |
|
1491 |
switch ( SimState() ) |
|
1492 |
{ |
|
1493 |
case EPESimNotSupported: |
|
1494 |
retVal = EFalse; |
|
1495 |
break; |
|
1496 |
||
1497 |
case EPESimNotPresent: |
|
1498 |
{ |
|
1499 |
if ( !FeatureManager::FeatureSupported( KFeatureIdOfflineMode ) || |
|
1500 |
!FeatureManager::FeatureSupported( KFeatureIdFfSimlessOfflineSupport ) ) |
|
1501 |
{ |
|
1502 |
retVal = EFalse; |
|
1503 |
} |
|
1504 |
break; |
|
1505 |
} |
|
1506 |
||
1507 |
default: |
|
1508 |
break; |
|
1509 |
} |
|
1510 |
if ( retVal != EFalse ) |
|
1511 |
{ |
|
1512 |
// Sim state is valid, check also Sim security status |
|
1513 |
switch ( SimSecurityStatus() ) |
|
1514 |
{ |
|
1515 |
case ESimRejected: |
|
1516 |
case ESimUnaccepted: |
|
1517 |
retVal = EFalse; |
|
1518 |
break; |
|
1519 |
||
1520 |
default: |
|
1521 |
break; |
|
1522 |
} |
|
1523 |
} |
|
1524 |
__PHONELOG1( EBasic, EPhoneControl, |
|
1525 |
"CPhoneState::IsSimOK - value= %d", retVal ); |
|
1526 |
return retVal; |
|
1527 |
} |
|
1528 |
||
1529 |
// ----------------------------------------------------------- |
|
1530 |
// CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled |
|
1531 |
// ----------------------------------------------------------- |
|
1532 |
// |
|
1533 |
EXPORT_C TBool CPhoneState::IsSimStateNotPresentWithSecurityModeEnabled() |
|
1534 |
{ |
|
1535 |
TPhoneCmdParamBoolean isSecurityMode; |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1536 |
TBool retValue(EFalse); |
37 | 1537 |
TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( EPhoneViewGetSecurityModeStatus, &isSecurityMode ) ); |
1538 |
if ( SimState() == EPESimNotPresent && isSecurityMode.Boolean() ) |
|
1539 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1540 |
retValue = ETrue; |
37 | 1541 |
} |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1542 |
return retValue; |
37 | 1543 |
} |
1544 |
||
1545 |
// ----------------------------------------------------------------------------- |
|
1546 |
// CPhoneState::StartShowSecurityNoteL |
|
1547 |
// ----------------------------------------------------------------------------- |
|
1548 |
// |
|
1549 |
EXPORT_C void CPhoneState::StartShowSecurityNoteL() |
|
1550 |
{ |
|
1551 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::StartShowSecurityNoteL "); |
|
1552 |
TPhoneCmdParamBoolean securityMode; |
|
1553 |
securityMode.SetBoolean( ETrue ); |
|
1554 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetSecurityMode, &securityMode ); |
|
1555 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1556 |
UpdateUiCommands(); |
37 | 1557 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1558 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringPhoneAppToForeground ); |
37 | 1559 |
TInt resourceId ( KErrNone ); |
1560 |
if ( SimSecurityStatus() == ESimRejected ) |
|
1561 |
{ |
|
1562 |
resourceId = CPhoneMainResourceResolver::Instance()-> |
|
1563 |
ResolveResourceID( EPhoneSimRejected ); |
|
1564 |
} |
|
1565 |
else if ( SimState() == EPESimNotPresent ) |
|
1566 |
{ |
|
1567 |
// insert sim card -note |
|
1568 |
resourceId = CPhoneMainResourceResolver::Instance()-> |
|
1569 |
ResolveResourceID( EPhoneSimRemoved ); |
|
1570 |
} |
|
1571 |
else if ( SimSecurityStatus() == ESimUnaccepted ) |
|
1572 |
{ |
|
1573 |
resourceId = CPhoneMainResourceResolver::Instance()-> |
|
1574 |
ResolveResourceID( EPhoneSimUnaccepted ); |
|
1575 |
} |
|
1576 |
||
1577 |
if ( resourceId != KErrNone ) |
|
1578 |
{ |
|
1579 |
// Add it to the resource string |
|
1580 |
HBufC* buf = StringLoader::LoadLC( resourceId ); |
|
1581 |
TPhoneCmdParamNote noteParam; |
|
1582 |
noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
|
1583 |
ResolveResourceID( EPhoneSecurityInformationNote ) ); |
|
1584 |
noteParam.SetText( *buf ); |
|
1585 |
noteParam.SetTone( CAknNoteDialog::EConfirmationTone ); |
|
1586 |
noteParam.SetType( EPhoneNoteSecurity ); |
|
1587 |
// Display note |
|
1588 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
|
1589 |
CleanupStack::PopAndDestroy( buf ); |
|
1590 |
// Capture the App key |
|
1591 |
TPhoneCmdParamKeyCapture appKeyCaptureParam; |
|
1592 |
appKeyCaptureParam.SetKey( EStdKeyApplication0 ); |
|
1593 |
appKeyCaptureParam.SetKeyCode( EKeyApplication0 ); |
|
1594 |
appKeyCaptureParam.SetCaptureType( EPhoneKeyAllEvents ); |
|
1595 |
iViewCommandHandle->ExecuteCommandL( |
|
1596 |
EPhoneViewStartCapturingKey, &appKeyCaptureParam ); |
|
1597 |
} |
|
1598 |
} |
|
1599 |
||
1600 |
// --------------------------------------------------------- |
|
1601 |
// CPhoneState::ShowWlanMacAddressL |
|
1602 |
// --------------------------------------------------------- |
|
1603 |
// |
|
1604 |
void CPhoneState::ShowWlanMacAddressL() |
|
1605 |
{ |
|
1606 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::ShowWlanMacAddressL()"); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1607 |
iNumberEntryManager->NumberEntryClearL(); |
37 | 1608 |
// Fetch WLAN MAC address |
1609 |
TBuf8<KPhoneWlanMacAddressLength> address; |
|
1610 |
RProperty::Get( |
|
1611 |
KPSUidWlan, |
|
1612 |
KPSWlanMacAddress, |
|
1613 |
address ); |
|
1614 |
// Format fetched address |
|
1615 |
TBuf<KPhoneWlanMacAddressLength> wlanMACAddress; |
|
1616 |
for ( TInt i( 0 ); i < address.Length(); i++ ) |
|
1617 |
{ |
|
1618 |
// Set separator |
|
1619 |
if( i > 0 ) |
|
1620 |
{ |
|
1621 |
wlanMACAddress.Append( KPhoneWlanSeparator ); |
|
1622 |
} |
|
1623 |
// Set data |
|
1624 |
TBuf<10> tmp; |
|
1625 |
tmp.Format( KWLanMACDataFormat, address[i] ); |
|
1626 |
wlanMACAddress.Append( tmp ); |
|
1627 |
} |
|
1628 |
||
1629 |
// Now we need the localised text |
|
1630 |
HBufC* wlanMacAddress = StringLoader::LoadLC( |
|
1631 |
CPhoneMainResourceResolver::Instance()-> |
|
1632 |
ResolveResourceID( EPhoneWlanMacAddress ), wlanMACAddress ); |
|
1633 |
TPhoneCmdParamNote noteParam; |
|
1634 |
noteParam.SetType( EPhoneNoteCustom ); |
|
1635 |
noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
|
1636 |
ResolveResourceID( EPhoneInformationWaitNote ) ); |
|
1637 |
noteParam.SetText( *wlanMacAddress ); |
|
1638 |
noteParam.SetTone( CAknNoteDialog::EConfirmationTone ); |
|
1639 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
|
1640 |
CleanupStack::PopAndDestroy( wlanMacAddress ); |
|
1641 |
} |
|
1642 |
||
1643 |
// ----------------------------------------------------------- |
|
1644 |
// CPhoneState::HandleAudioAvailableOutputChangedL |
|
1645 |
// Default handling for EPEMessageAvailableAudioOutputsChanged message |
|
1646 |
// (other items were commented in a header). |
|
1647 |
// ----------------------------------------------------------- |
|
1648 |
// |
|
1649 |
void CPhoneState::HandleAudioAvailableOutputChangedL() |
|
1650 |
{ |
|
1651 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleAudioAvailableOutputChangedL() "); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1652 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
37 | 1653 |
TPhoneCmdParamAudioAvailability outputParam; |
1654 |
// Output |
|
1655 |
const TPEAudioOutput audioOutput = |
|
1656 |
iStateMachine->PhoneEngineInfo()->AudioOutput(); |
|
1657 |
// BT availability |
|
1658 |
TBool btAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable( |
|
1659 |
EPEBTAudioAccessory ); |
|
1660 |
outputParam.SetBTAccAvailable( btAvailable ); |
|
1661 |
// Wired availability |
|
1662 |
TBool wiredAvailable = iStateMachine->PhoneEngineInfo()->AudioOutputAvailable( |
|
1663 |
EPEWiredAudioAccessory ); |
|
1664 |
outputParam.SetWiredAccAvailable( wiredAvailable ); |
|
1665 |
// BTA disconnect handler check |
|
1666 |
if( btAvailable ) |
|
1667 |
{ |
|
1668 |
CPhoneBtaaDisconnectHandler::InstanceL()->Cancel(); |
|
1669 |
} |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1670 |
iViewCommandHandle->ExecuteCommandL( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1671 |
EPhoneViewActivateAudioAvailabilityUIChanges, |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1672 |
&outputParam ); |
37 | 1673 |
} |
1674 |
||
1675 |
// --------------------------------------------------------- |
|
1676 |
// CPhoneState::ShowNumberBusyNoteL |
|
1677 |
// --------------------------------------------------------- |
|
1678 |
// |
|
1679 |
EXPORT_C void CPhoneState::ShowNumberBusyNoteL() |
|
1680 |
{ |
|
1681 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::ShowNumberBusyNoteL( ) "); |
|
1682 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
1683 |
globalNotifierParam.SetBoolean( EFalse ); |
|
1684 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
1685 |
&globalNotifierParam ); |
|
1686 |
||
1687 |
TInt resource( EPhoneNumberBusy ); |
|
1688 |
if( iCustomization ) |
|
1689 |
{ |
|
1690 |
// Get customized text resource for busy note |
|
1691 |
resource = iCustomization->CustomizeBusyNoteText(); |
|
1692 |
} |
|
1693 |
||
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1694 |
// Show number busy notification |
37 | 1695 |
TPhoneCmdParamGlobalNote globalNoteParam; |
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1696 |
globalNoteParam.SetType( EPhoneNotificationDialog ); |
37 | 1697 |
globalNoteParam.SetTextResourceId( |
1698 |
CPhoneMainResourceResolver::Instance()-> |
|
1699 |
ResolveResourceID( resource ) ); |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1700 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1701 |
globalNoteParam.SetNotificationDialog( ETrue ); |
37 | 1702 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowGlobalNote, |
1703 |
&globalNoteParam ); |
|
1704 |
} |
|
1705 |
||
1706 |
// --------------------------------------------------------- |
|
1707 |
// CPhoneState::IsAutoLockOn |
|
1708 |
// --------------------------------------------------------- |
|
1709 |
// |
|
1710 |
EXPORT_C TBool CPhoneState::IsAutoLockOn() const |
|
1711 |
{ |
|
1712 |
const TBool phoneIsLocked = |
|
1713 |
CPhonePubSubProxy::Instance()->Value( |
|
1714 |
KPSUidCoreApplicationUIs, |
|
1715 |
KCoreAppUIsAutolockStatus ) > EAutolockOff; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1716 |
__PHONELOG1( EBasic, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1717 |
EPhoneControl, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1718 |
"CPhoneState::IsAutoLockOn() Status: %d", |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1719 |
phoneIsLocked ); |
37 | 1720 |
return phoneIsLocked; |
1721 |
} |
|
1722 |
||
1723 |
// --------------------------------------------------------- |
|
1724 |
// CPhoneState::DeleteTouchPaneButtons |
|
1725 |
// --------------------------------------------------------- |
|
1726 |
// |
|
1727 |
EXPORT_C void CPhoneState::DeleteTouchPaneButtons() |
|
1728 |
{ |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1729 |
/*TPhoneCmdParamBoolean boolParam; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1730 |
TRAP_IGNORE( iViewCommandHandle->ExecuteCommand( |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1731 |
EPhoneViewSetTouchPaneButtons, |
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1732 |
&boolParam ) );*/ |
37 | 1733 |
} |
1734 |
||
1735 |
// ----------------------------------------------------------- |
|
1736 |
// CPhoneState::BeginUiUpdateLC |
|
1737 |
// ----------------------------------------------------------- |
|
1738 |
// |
|
1739 |
EXPORT_C void CPhoneState::BeginUiUpdateLC() |
|
1740 |
{ |
|
1741 |
iViewCommandHandle->ExecuteCommand( EPhoneViewBeginUpdate ); |
|
1742 |
TCleanupItem operation( UiUpdateCleanup, this ); |
|
1743 |
CleanupStack::PushL( operation ); |
|
1744 |
} |
|
1745 |
||
1746 |
// ----------------------------------------------------------- |
|
1747 |
// CPhoneState::EndUiUpdate |
|
1748 |
// ----------------------------------------------------------- |
|
1749 |
// |
|
1750 |
EXPORT_C void CPhoneState::EndUiUpdate() |
|
1751 |
{ |
|
1752 |
CleanupStack::PopAndDestroy(); // Call UiUpdateCleanup |
|
1753 |
} |
|
1754 |
||
1755 |
// ----------------------------------------------------------- |
|
1756 |
// CPhoneState::CheckIfShowTerminationNote |
|
1757 |
// This method is intended to be overridden in states |
|
1758 |
// that contain more info about decision. |
|
1759 |
// ----------------------------------------------------------- |
|
1760 |
// |
|
1761 |
EXPORT_C TBool CPhoneState::CheckIfShowCallTerminationNote( ) |
|
1762 |
{ |
|
1763 |
TBool show = EFalse; |
|
1764 |
TInt callSummaryActivated = 0; |
|
1765 |
const TInt err = CPhoneCenRepProxy::Instance()->GetInt( |
|
1766 |
KCRUidCommonTelephonySettings, |
|
1767 |
KSettingsSummaryAfterCall, |
|
1768 |
callSummaryActivated ); |
|
1769 |
if ( err == KErrNone && callSummaryActivated ) |
|
1770 |
{ |
|
1771 |
show = ETrue; |
|
1772 |
} |
|
1773 |
return show; |
|
1774 |
} |
|
1775 |
||
1776 |
// ----------------------------------------------------------------------------- |
|
1777 |
// CPhoneState::HandleDtmfKeyTone |
|
1778 |
// Called from KeyEventForwarder |
|
1779 |
// Allow only special characters to pass from |
|
1780 |
// keyEventForwarder to phoneEngine |
|
1781 |
// ----------------------------------------------------------------------------- |
|
1782 |
// |
|
1783 |
EXPORT_C void CPhoneState::HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent, |
|
1784 |
TEventCode aEventCode ) |
|
1785 |
{ |
|
1786 |
SendDtmfKeyEventL( aKeyEvent, aEventCode ); |
|
1787 |
} |
|
1788 |
||
1789 |
// ----------------------------------------------------------------------------- |
|
1790 |
// CPhoneState::UiUpdateCleanup |
|
1791 |
// ----------------------------------------------------------------------------- |
|
1792 |
// |
|
1793 |
void CPhoneState::UiUpdateCleanup(TAny* aThis ) |
|
1794 |
{ |
|
1795 |
static_cast<CPhoneState*>( aThis )->iViewCommandHandle->ExecuteCommand( |
|
1796 |
EPhoneViewEndUpdate ); |
|
1797 |
} |
|
1798 |
||
1799 |
// ----------------------------------------------------------- |
|
1800 |
// CPhoneState::SetDefaultFlagsL() |
|
1801 |
// ----------------------------------------------------------- |
|
1802 |
// |
|
1803 |
EXPORT_C void CPhoneState::SetDefaultFlagsL() |
|
1804 |
{ |
|
1805 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetDefaultFlagsL()"); |
|
1806 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1807 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateFSW ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1808 |
|
37 | 1809 |
TPhoneCmdParamBoolean globalNotifierParam; |
1810 |
globalNotifierParam.SetBoolean( EFalse ); |
|
1811 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
1812 |
&globalNotifierParam ); |
|
1813 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetEikonNotifiersDisabled, |
|
1814 |
&globalNotifierParam ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1815 |
|
37 | 1816 |
// Restore keylock if phone has been locked before call. |
1817 |
if ( iStateMachine->PhoneStorage()->NeedToEnableKeylock() ) |
|
1818 |
{ |
|
1819 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewEnableKeyLock ); |
|
1820 |
iStateMachine->PhoneStorage()->SetNeedToEnableKeylock( EFalse ); |
|
1821 |
} |
|
1822 |
} |
|
1823 |
||
1824 |
// ----------------------------------------------------------- |
|
1825 |
// CPhoneState::GetVolumeLevel |
|
1826 |
// ----------------------------------------------------------- |
|
1827 |
// |
|
1828 |
TInt CPhoneState::GetVolumeLevel() |
|
1829 |
{ |
|
1830 |
TPhoneCmdParamInteger integerParam; |
|
1831 |
iViewCommandHandle->ExecuteCommand( EPhoneViewGetAudioVolumeLevel, |
|
1832 |
&integerParam ); |
|
1833 |
return integerParam.Integer(); |
|
1834 |
} |
|
1835 |
||
1836 |
// ----------------------------------------------------------- |
|
1837 |
// CPhoneState::ShowVideoCallOutOfMemoryNoteL |
|
1838 |
// ----------------------------------------------------------- |
|
1839 |
// |
|
1840 |
void CPhoneState::ShowVideoCallOutOfMemoryNoteL() |
|
1841 |
{ |
|
1842 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
1843 |
"CPhoneState::ShowVideoCallOutOfMemoryNoteL()" ); |
|
1844 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
1845 |
globalNotifierParam.SetBoolean( EFalse ); |
|
1846 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
1847 |
&globalNotifierParam ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1848 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1849 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringPhoneAppToForeground ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
1850 |
|
37 | 1851 |
// Display error note |
1852 |
SExtendedError ext; |
|
1853 |
ext.iComponent = KUidPhoneApplication; |
|
1854 |
ext.iErrorNumber = KErrNoMemory; |
|
1855 |
ext.iInformation = EFalse; |
|
1856 |
TBuf<1> ignore; |
|
1857 |
iAvkonAppUi->HandleError( KErrNoMemory, ext, ignore, ignore ); |
|
1858 |
} |
|
1859 |
||
1860 |
// ----------------------------------------------------------------------------- |
|
1861 |
// CPhoneState::SimSecurityStatus |
|
1862 |
// ----------------------------------------------------------------------------- |
|
1863 |
// |
|
1864 |
TInt CPhoneState::SimSecurityStatus() const |
|
1865 |
{ |
|
1866 |
/* |
|
1867 |
Sim security statuses: |
|
1868 |
ESimSecurityStatusUninitialized = KStartupEnumerationFirstValue, |
|
1869 |
ESimRejected, // The PUK code has been entered incorrectly, so the card is rejected. |
|
1870 |
ESimUnaccepted // The SIM lock is on, so the card is unaccepted. |
|
1871 |
*/ |
|
1872 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SimSecurityStatus()" ); |
|
1873 |
return CPhonePubSubProxy::Instance()->Value( |
|
1874 |
KPSUidStartup, KStartupSimSecurityStatus ); |
|
1875 |
} |
|
1876 |
||
1877 |
// ---------------------------------------------------------------------------- |
|
1878 |
// CPhoneState::SetRingingTonePlaybackL() |
|
1879 |
// ---------------------------------------------------------------------------- |
|
1880 |
// |
|
1881 |
EXPORT_C void CPhoneState::SetRingingTonePlaybackL( TInt aCallId ) |
|
1882 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1883 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::SetRingingTonePlaybackL()" ); |
37 | 1884 |
TPhoneCmdParamRingTone ringToneParam; |
1885 |
ringToneParam.SetVolume( |
|
1886 |
iStateMachine->PhoneEngineInfo()->RingingVolume() ); |
|
1887 |
||
1888 |
TArray< TContactItemId > alertGroups = |
|
1889 |
iStateMachine->PhoneEngineInfo()->AlertForGroup(); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1890 |
|
37 | 1891 |
TInt alertGroupCount = alertGroups.Count(); |
1892 |
TInt contactGroupCount = |
|
1893 |
iStateMachine->PhoneEngineInfo()->ContactGroups( aCallId ).Count(); |
|
1894 |
TBool alertingGroupFound( EFalse ); |
|
1895 |
||
1896 |
// Check contents of both the alerting groups array and call contact group |
|
1897 |
// array, if any of the group ids match then allow playing. |
|
1898 |
if ( alertGroupCount > 0 ) |
|
1899 |
{ |
|
1900 |
for ( TInt i = 0 ; i < alertGroupCount ; i++ ) |
|
1901 |
{ |
|
1902 |
for ( TInt j = 0 ; j < contactGroupCount ; j++ ) |
|
1903 |
{ |
|
1904 |
if ( alertGroups[ i ] == |
|
1905 |
( iStateMachine->PhoneEngineInfo()->ContactGroups( |
|
1906 |
aCallId ) )[ j ] ) |
|
1907 |
{ |
|
1908 |
alertingGroupFound = ETrue; |
|
1909 |
} |
|
1910 |
} |
|
1911 |
} |
|
1912 |
if ( alertingGroupFound == EFalse ) |
|
1913 |
{ |
|
1914 |
ringToneParam.SetRingingType( EProfileRingingTypeSilent ); |
|
1915 |
} |
|
1916 |
else |
|
1917 |
{ |
|
1918 |
ringToneParam.SetRingingType( |
|
1919 |
iStateMachine->PhoneEngineInfo()->RingingType() ); |
|
1920 |
} |
|
1921 |
} |
|
1922 |
else // no alerting groups set |
|
1923 |
{ |
|
1924 |
ringToneParam.SetRingingType( |
|
1925 |
iStateMachine->PhoneEngineInfo()->RingingType() ); |
|
1926 |
} |
|
1927 |
||
1928 |
// Set ring tone |
|
1929 |
if ( iStateMachine->PhoneEngineInfo()->PersonalRingingTone( |
|
1930 |
aCallId ).Length() ) |
|
1931 |
{ |
|
1932 |
// Set the personal ring tone |
|
1933 |
ringToneParam.SetRingTone( |
|
1934 |
iStateMachine->PhoneEngineInfo()->PersonalRingingTone( aCallId ) ); |
|
1935 |
ringToneParam.SetType( EPhoneRingTonePersonal ); |
|
1936 |
} |
|
1937 |
else if ( iStateMachine->PhoneEngineInfo()->RingingTone( |
|
1938 |
aCallId ).Length() ) |
|
1939 |
{ |
|
1940 |
// Set the profile ring tone |
|
1941 |
ringToneParam.SetRingTone( |
|
1942 |
iStateMachine->PhoneEngineInfo()->RingingTone( aCallId ) ); |
|
1943 |
ringToneParam.SetType( EPhoneRingToneProfile ); |
|
1944 |
||
1945 |
if ( ( iStateMachine->PhoneEngineInfo()->CallerImage( aCallId ).Length() > 0 && |
|
1946 |
BaflUtils::FileExists( CCoeEnv::Static()->FsSession(), |
|
1947 |
iStateMachine->PhoneEngineInfo()->CallerImage( aCallId ) ) ) || |
|
1948 |
iStateMachine->PhoneEngineInfo()->HasCallerThumbnail( aCallId ) ) |
|
1949 |
{ |
|
1950 |
// Caller image set |
|
1951 |
ringToneParam.SetCallerImageStatus( ETrue ); |
|
1952 |
} |
|
1953 |
} |
|
1954 |
||
1955 |
// Set text to say, if enabled |
|
1956 |
if ( iStateMachine->PhoneEngineInfo()->TextToSpeech() ) |
|
1957 |
{ |
|
1958 |
ringToneParam.SetTextToSay( |
|
1959 |
iStateMachine->PhoneEngineInfo()->RemoteTextToSpeechText( |
|
1960 |
aCallId ) ); |
|
1961 |
} |
|
1962 |
||
1963 |
if ( iStateMachine->PhoneEngineInfo()->CallerText( aCallId ).Length() > 0 ) |
|
1964 |
{ |
|
1965 |
ringToneParam.SetCallerTextStatus( ETrue ); |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
1966 |
} |
37 | 1967 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewPlayRingTone, &ringToneParam ); |
1968 |
} |
|
1969 |
||
1970 |
// ----------------------------------------------------------- |
|
1971 |
// CPhoneState::HandleCugNoteL |
|
1972 |
// ----------------------------------------------------------- |
|
1973 |
// |
|
1974 |
void CPhoneState::HandleCugInUseNoteL() |
|
1975 |
{ |
|
1976 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleCugInUseNoteL() "); |
|
1977 |
TInt cugIndex( 0 ); |
|
1978 |
RSSSettings ssSettings; |
|
1979 |
TInt retValue = ssSettings.Open(); |
|
1980 |
if ( retValue == KErrNone ) |
|
1981 |
{ |
|
1982 |
ssSettings.Get( ESSSettingsCug, cugIndex ); |
|
1983 |
} |
|
1984 |
ssSettings.Close(); |
|
1985 |
if ( cugIndex ) |
|
1986 |
{ |
|
1987 |
// Add it to the resource string |
|
1988 |
HBufC* buf = StringLoader::LoadLC( |
|
1989 |
CPhoneMainResourceResolver::Instance()-> |
|
1990 |
ResolveResourceID( |
|
1991 |
EPhoneInfoCugInUse ), cugIndex ); |
|
1992 |
TPhoneCmdParamGlobalNote globalNoteParam; |
|
1993 |
globalNoteParam.SetText( *buf ); |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
1994 |
globalNoteParam.SetType( EPhoneMessageBoxInformation ); |
37 | 1995 |
iViewCommandHandle->ExecuteCommandL( |
1996 |
EPhoneViewShowGlobalNote, &globalNoteParam ); |
|
1997 |
CleanupStack::PopAndDestroy( buf ); |
|
1998 |
} |
|
1999 |
} |
|
2000 |
||
2001 |
// --------------------------------------------------------------------------- |
|
2002 |
// CPhoneState::LoadResource |
|
2003 |
// --------------------------------------------------------------------------- |
|
2004 |
// |
|
2005 |
void CPhoneState::LoadResource( TDes& aData, const TInt aResource ) const |
|
2006 |
{ |
|
2007 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::LoadResource() "); |
|
2008 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::LoadResource - aResource: %d", aResource ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2009 |
StringLoader::Load( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2010 |
aData, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2011 |
CPhoneMainResourceResolver::Instance()->ResolveResourceID( aResource ), |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2012 |
EikonEnv() ); |
37 | 2013 |
} |
2014 |
||
2015 |
// ----------------------------------------------------------- |
|
2016 |
// CPhoneState::IsAnyConnectedCalls |
|
2017 |
// ----------------------------------------------------------- |
|
2018 |
// |
|
2019 |
TBool CPhoneState::IsAnyConnectedCalls() |
|
2020 |
{ |
|
2021 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneState::IsAnyConnectedCalls() "); |
|
2022 |
TBool connectedCall(EFalse); |
|
2023 |
if ( iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnected ) || |
|
2024 |
iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnecting ) || |
|
2025 |
iStateMachine->PhoneEngineInfo()->CheckIfCallStateExists( EPEStateConnectedConference ) ) |
|
2026 |
{ |
|
2027 |
connectedCall = ETrue; |
|
2028 |
} |
|
2029 |
__PHONELOG1( EBasic, EPhoneControl, "CPhoneState::IsAnyConnectedCalls: (%d)", connectedCall ); |
|
2030 |
return connectedCall; |
|
2031 |
} |
|
2032 |
||
2033 |
// --------------------------------------------------------- |
|
2034 |
// CPhoneState::SetToolbarButtonLoudspeakerEnabled |
|
2035 |
// --------------------------------------------------------- |
|
2036 |
// |
|
2037 |
EXPORT_C void CPhoneState::SetToolbarButtonLoudspeakerEnabled() |
|
2038 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2039 |
TPhoneCmdParamInteger integerParam; |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2040 |
integerParam.SetInteger( EPhoneInCallCmdActivateIhf ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2041 |
TRAP_IGNORE( iViewCommandHandle->ExecuteCommandL( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2042 |
EPhoneViewEnableToolbarButton, &integerParam )); |
37 | 2043 |
} |
2044 |
||
2045 |
// --------------------------------------------------------- |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
46
diff
changeset
|
2046 |
// CPhoneState::SetBackButtonActive |
37 | 2047 |
// --------------------------------------------------------- |
2048 |
// |
|
2049 |
EXPORT_C void CPhoneState::SetBackButtonActive( TBool aActive ) |
|
2050 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2051 |
if( IsAutoLockOn() && aActive ) |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2052 |
{ |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
2053 |
// keep back button dimmed device lock case |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
2054 |
return; |
37 | 2055 |
} |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2056 |
TPhoneCmdParamBoolean booleanParam; |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2057 |
booleanParam.SetBoolean( aActive ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2058 |
iViewCommandHandle->ExecuteCommand( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2059 |
EPhoneViewBackButtonActive, &booleanParam ); |
37 | 2060 |
} |
2061 |
||
2062 |
// ----------------------------------------------------------- |
|
2063 |
// CPhoneState::OpenSoftRejectMessageEditorL |
|
2064 |
// ----------------------------------------------------------- |
|
2065 |
// |
|
2066 |
EXPORT_C void CPhoneState::OpenSoftRejectMessageEditorL() |
|
2067 |
{ |
|
2068 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
2069 |
"CPhoneState::OpenSoftRejectMessageEditorL ()" ); |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2070 |
iUiCommandManager->SetSoftRejectStatus( EFalse ); |
37 | 2071 |
TPhoneCmdParamCallStateData callStateData; |
2072 |
callStateData.SetCallState( EPEStateRinging ); |
|
2073 |
iViewCommandHandle->HandleCommandL( |
|
2074 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
2075 |
||
2076 |
TInt ringingCallId( KErrNotFound ); |
|
2077 |
// Do nothing if negative incoming call id |
|
2078 |
if( callStateData.CallId() > KErrNotFound ) |
|
2079 |
{ |
|
2080 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveQuery ); |
|
2081 |
ringingCallId = callStateData.CallId(); |
|
2082 |
} |
|
2083 |
||
2084 |
TPhoneCmdParamSfiData sfiDataParam; |
|
2085 |
if (KErrNotFound != ringingCallId) |
|
2086 |
{ |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2087 |
if ( iStateMachine->PhoneEngineInfo()-> |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2088 |
RemoteName( ringingCallId ).Length() ) |
37 | 2089 |
{ |
2090 |
// store both the name and the number |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2091 |
sfiDataParam.SetNumber( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2092 |
iStateMachine->PhoneEngineInfo()->RemotePhoneNumber( ringingCallId ) ); |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2093 |
sfiDataParam.SetName( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2094 |
iStateMachine->PhoneEngineInfo()->RemoteName( ringingCallId ) ); |
37 | 2095 |
} |
2096 |
else |
|
2097 |
{ |
|
2098 |
// store the number |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2099 |
sfiDataParam.SetNumber( |
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2100 |
iStateMachine->PhoneEngineInfo()->RemotePhoneNumber( ringingCallId ) ); |
37 | 2101 |
} |
2102 |
} |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2103 |
UpdateUiCommands(); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2104 |
iViewCommandHandle->ExecuteCommandL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2105 |
EPhoneViewOpenSoftRejectEditor, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2106 |
&sfiDataParam ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2107 |
} |
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
2108 |
|
77
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2109 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2110 |
// CPhoneState::DisplayCallHeaderL() |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2111 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2112 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2113 |
EXPORT_C void CPhoneState::DisplayCallHeaderL( |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2114 |
TInt aCallId, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2115 |
TNumberEntrySetRule aRule ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2116 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2117 |
__LOGMETHODSTARTEND(EPhoneControl, |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2118 |
"CPhoneState::BringIncomingCallHeaderToForegroundL( ) "); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2119 |
BeginUiUpdateLC(); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2120 |
switch ( aRule ) |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2121 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2122 |
case ESetNEVisibilityFalse: |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2123 |
iNumberEntryManager-> |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2124 |
SetNumberEntryVisibilityL( EFalse ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2125 |
break; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2126 |
case ECheckIfNEUsedBeforeSettingVisibilityFalse: |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2127 |
iNumberEntryManager-> |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2128 |
SetVisibilityIfNumberEntryUsedL(EFalse); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2129 |
break; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2130 |
default: // by default do nothing. |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2131 |
break; |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2132 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2133 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2134 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringPhoneAppToForeground ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2135 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateCallHeader, aCallId ); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2136 |
UpdateUiCommands(); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2137 |
EndUiUpdate(); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2138 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2139 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2140 |
// --------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2141 |
// CPhoneState::SetTouchPaneButtons |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2142 |
// --------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2143 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2144 |
EXPORT_C void CPhoneState::UpdateUiCommands() |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2145 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2146 |
iUiCommandManager->UpdateUiCommands(); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2147 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2148 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2149 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2150 |
// CPhoneState::HandleNumberEntryClearedL |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2151 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2152 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2153 |
EXPORT_C void CPhoneState::HandleNumberEntryClearedL() |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2154 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2155 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::HandleNumberEntryClearedL( ) "); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2156 |
} |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2157 |
|
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2158 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2159 |
// CPhoneState::IsCustomizedDialerVisibleL() |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2160 |
// ----------------------------------------------------------- |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2161 |
// |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2162 |
EXPORT_C TBool CPhoneState::IsCustomizedDialerVisibleL() const |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2163 |
{ |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2164 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneState::IsCustomizedDialerVisibleL( ) "); |
2be0b271d017
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
72
diff
changeset
|
2165 |
return iNumberEntryManager->IsCustomizedDialerVisibleL(); |
37 | 2166 |
} |
2167 |
||
2168 |
// End of File |