author | hgs |
Fri, 09 Jul 2010 15:40:55 +0300 | |
changeset 50 | 377c906a8701 |
parent 45 | 6b911d05207e |
child 65 | 2a5d4ab426d3 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005-2008 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: |
|
15 |
* A base class for an object implementing the state. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
||
20 |
#ifndef CPHONESTATE_H |
|
21 |
#define CPHONESTATE_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <w32std.h> |
|
25 |
#include <remconcoreapitargetobserver.h> |
|
26 |
#include <MProfileEngine.h> |
|
27 |
#include "mphonestate.h" |
|
28 |
#include "mphoneviewcommandhandle.h" |
|
29 |
#include "cphonecbamanager.h" |
|
30 |
||
31 |
// FORWARD DECLARATIONS |
|
32 |
class MPhoneState; |
|
33 |
class MPhoneStateMachine; |
|
34 |
class CPhoneCallHeaderManager; |
|
35 |
class CPhoneTimer; |
|
36 |
class TPhoneCmdParamCallHeaderData; |
|
37 |
class MPhoneCustomization; |
|
38 |
class CPhoneNumberEntryManager; |
|
39 |
||
40 |
enum TStateTransEffectType |
|
41 |
{ |
|
42 |
ENoneType, |
|
43 |
ENumberEntryOpen, |
|
44 |
ENumberEntryClose, |
|
45 |
ENumberEntryCreate |
|
46 |
}; |
|
47 |
||
48 |
// CLASS DECLARATION |
|
49 |
||
50 |
/** |
|
51 |
* An abstract class for an object implementing the state. |
|
52 |
* |
|
53 |
*/ |
|
54 |
class CPhoneState : |
|
55 |
public CBase, |
|
56 |
public MPhoneState |
|
57 |
{ |
|
58 |
public: |
|
59 |
||
60 |
/** |
|
61 |
* Constructor |
|
62 |
*/ |
|
63 |
IMPORT_C CPhoneState( |
|
64 |
MPhoneStateMachine* aStateMachine, |
|
65 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
66 |
MPhoneCustomization* aCustomization); |
|
67 |
||
68 |
/** |
|
69 |
* Creates CbaManager instance. |
|
70 |
*/ |
|
71 |
IMPORT_C void BaseConstructL(); |
|
72 |
||
73 |
/** |
|
74 |
* Destructor. |
|
75 |
*/ |
|
76 |
IMPORT_C virtual ~CPhoneState(); |
|
77 |
||
78 |
/** |
|
79 |
* A message handling function for Phone Engine messages |
|
80 |
* @param aMessage Message from Phone Engine |
|
81 |
* @param aCallId Call id the message concerns |
|
82 |
*/ |
|
83 |
IMPORT_C virtual void HandlePhoneEngineMessageL( |
|
84 |
const TInt aMessage, |
|
85 |
TInt aCallId ); |
|
86 |
||
87 |
/** |
|
88 |
* HandleError |
|
89 |
* Implements error handling framework |
|
90 |
* @param aErrorInfo: the error info |
|
91 |
*/ |
|
92 |
IMPORT_C virtual void HandleErrorL( |
|
93 |
const TPEErrorInfo& aErrorInfo ); |
|
94 |
||
95 |
/** |
|
96 |
* Handle processed (short, long) key messages from the key event |
|
97 |
* handler |
|
98 |
* @param aMessage a key message |
|
99 |
* @param aCode key event code |
|
100 |
*/ |
|
101 |
IMPORT_C virtual void HandleKeyMessageL( |
|
102 |
TPhoneKeyEventMessages aMessage, |
|
103 |
TKeyCode aCode ); |
|
104 |
||
105 |
/** |
|
106 |
* Handles raw key events from the key event handler |
|
107 |
* @param aKeyEvent a key event |
|
108 |
* @param aEventCode key event code |
|
109 |
*/ |
|
110 |
IMPORT_C virtual void HandleKeyEventL( |
|
111 |
const TKeyEvent& aKeyEvent, |
|
112 |
TEventCode aEventCode ); |
|
113 |
||
114 |
/** |
|
115 |
* Handles key press duration events from the key event handler |
|
116 |
* @param aCode key event code |
|
117 |
* @param aKeyPressDuration key press duration |
|
118 |
*/ |
|
119 |
IMPORT_C virtual void HandleKeyPressDurationL( |
|
120 |
TKeyCode aCode, |
|
121 |
TTimeIntervalMicroSeconds aKeyPressDuration ); |
|
122 |
||
123 |
/** |
|
124 |
* From CEikAppUi. For Idle indicator |
|
125 |
*/ |
|
126 |
IMPORT_C virtual void HandleSystemEventL( |
|
127 |
const TWsEvent& aEvent ); |
|
128 |
||
129 |
/** |
|
130 |
* From CAknAppUi, indicates when app ui is on the foreground. |
|
131 |
* @param aForeground It is true if app is on the foreground. |
|
132 |
*/ |
|
133 |
IMPORT_C virtual void HandleForegroundEventL( TBool aForeground ); |
|
134 |
||
135 |
/** |
|
136 |
* Indicates when the Phone app is in the foreground. |
|
137 |
*/ |
|
138 |
IMPORT_C virtual void HandlePhoneForegroundEventL(); |
|
139 |
||
140 |
/** |
|
141 |
* Indicates when the Phone app is losing focus. |
|
142 |
*/ |
|
143 |
IMPORT_C virtual void HandlePhoneFocusLostEventL(); |
|
144 |
||
145 |
/** |
|
146 |
* Indicates when the Idle app is in the foreground. |
|
147 |
*/ |
|
148 |
IMPORT_C virtual void HandleIdleForegroundEventL(); |
|
149 |
||
150 |
/** |
|
151 |
* Indicates when the keylock events |
|
152 |
*/ |
|
153 |
IMPORT_C virtual void HandleKeyLockEnabled( TBool aKeylockEnabled ); |
|
154 |
||
155 |
/** |
|
156 |
* Handle environment changes. |
|
157 |
* @param aChanges environment changes which may be reported by |
|
158 |
* a change notifier through the RChangeNotifier interface. |
|
159 |
*/ |
|
160 |
IMPORT_C void HandleEnvironmentChangeL( const TInt aChanges ); |
|
161 |
||
162 |
/** |
|
163 |
* Handles startup of the phone application |
|
164 |
*/ |
|
165 |
IMPORT_C virtual void HandlePhoneStartupL(); |
|
166 |
||
167 |
/** |
|
168 |
* This function is called when there is property value change. |
|
169 |
* @param aCategory Category of the property |
|
170 |
* @param aKey Property key that is changed |
|
171 |
* @param aValue New property value |
|
172 |
*/ |
|
173 |
IMPORT_C virtual void HandlePropertyChangedL( |
|
174 |
const TUid& aCategory, |
|
175 |
const TUint aKey, |
|
176 |
const TInt aValue ); |
|
177 |
||
178 |
/** |
|
179 |
* Handle the change of the setting from Central Repository |
|
180 |
* @param aUid identifing the central repository UID. |
|
181 |
* @param aId central repository ID. |
|
182 |
*/ |
|
183 |
IMPORT_C virtual void HandleCenRepChangeL( |
|
184 |
const TUid& aUid, |
|
185 |
const TUint aId ); |
|
186 |
||
187 |
/** |
|
188 |
* Handles commands. |
|
189 |
* @param aCommand It is the code of the command to be handled. |
|
190 |
* @returns boolean value was the command handled by the state |
|
191 |
* (ETrue) or not (EFalse) |
|
192 |
*/ |
|
193 |
IMPORT_C virtual TBool HandleCommandL( TInt aCommand ); |
|
194 |
||
195 |
/** |
|
196 |
* Processes command. |
|
197 |
* @param aCommand It is the code of the command to be handled. |
|
198 |
* @returns boolean value was the command handled by the state |
|
199 |
* (ETrue) or not (EFalse) |
|
200 |
*/ |
|
201 |
IMPORT_C virtual TBool ProcessCommandL( TInt aCommand ); |
|
202 |
||
203 |
/** |
|
204 |
* Handles commands from the Remote Control framework. |
|
205 |
* @param aOperationId The operation ID of the command. |
|
206 |
* @param aButtonAct The button action associated with the command. |
|
207 |
* @return ETrue if the event was handled, EFalse otherwise. |
|
208 |
*/ |
|
209 |
IMPORT_C virtual TBool HandleRemConCommandL( |
|
210 |
TRemConCoreApiOperationId aOperationId, |
|
211 |
TRemConCoreApiButtonAction aButtonAct); |
|
212 |
||
213 |
/** |
|
214 |
* Setter for divert indication showing in bubble. |
|
215 |
* @param aDivertIndication ETrue to show divert indication, |
|
216 |
* EFalse to not. Usually setting EFalse isn't necessary |
|
217 |
* as it's a default value in bubble creation. |
|
218 |
*/ |
|
219 |
IMPORT_C virtual void SetDivertIndication( |
|
220 |
const TBool aDivertIndication ); |
|
221 |
||
222 |
/** |
|
223 |
* Handles Long hash key press |
|
224 |
*/ |
|
225 |
IMPORT_C void HandleLongHashL(); |
|
226 |
||
227 |
/** |
|
228 |
* Checks whether customized dialer view is active, |
|
229 |
* @return ETrue if customized dialer is active |
|
230 |
*/ |
|
231 |
IMPORT_C TBool IsCustomizedDialerVisibleL() const; |
|
232 |
||
233 |
/** |
|
234 |
* Plays DTMF tone for key event |
|
235 |
* */ |
|
236 |
IMPORT_C void HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent, |
|
237 |
TEventCode aEventCode ); |
|
238 |
||
239 |
/** |
|
240 |
* Show global InfoNote |
|
241 |
* @param aResourceId resource id to be resolved |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
242 |
* @param aNotificationDialog True if notification |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
243 |
* dialog should be used. |
37 | 244 |
*/ |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
245 |
IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
246 |
TBool aNotificationDialog = EFalse ); |
37 | 247 |
|
248 |
/** |
|
249 |
* Show global ErrorNote |
|
250 |
* @param aResourceId resource id to be resolved |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
251 |
* @param aNotificationDialog True if notification |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
252 |
* dialog should be used. |
37 | 253 |
*/ |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
254 |
IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
255 |
TBool aNotificationDialog = EFalse ); |
37 | 256 |
|
257 |
/** |
|
258 |
* Get blocked key list |
|
259 |
* @returns RArray<TInt>& lsit of blocked keys |
|
260 |
*/ |
|
261 |
IMPORT_C const RArray<TInt>& GetBlockedKeyList() const; |
|
262 |
||
263 |
/** |
|
264 |
* Disable HW Keys if needed |
|
265 |
*/ |
|
266 |
IMPORT_C void DisableHWKeysL(); |
|
267 |
||
268 |
/** |
|
269 |
* Disable Call UI |
|
270 |
*/ |
|
271 |
IMPORT_C void DisableCallUIL(); |
|
272 |
||
273 |
/** |
|
274 |
* Enable Call UI |
|
275 |
*/ |
|
276 |
IMPORT_C void EnableCallUIL(); |
|
277 |
||
278 |
/** |
|
279 |
* Disable HW Keys and Call UI if needed |
|
280 |
*/ |
|
281 |
IMPORT_C void CheckDisableHWKeysAndCallUIL(); |
|
282 |
||
283 |
/** |
|
284 |
* Handle hold switch key event when there is an incoming or waiting call |
|
285 |
*/ |
|
286 |
IMPORT_C void HandleHoldSwitchL(); |
|
287 |
||
288 |
/** |
|
289 |
* Enable HW Keys and Call UI if needed |
|
290 |
*/ |
|
291 |
IMPORT_C void CheckEnableHWKeysAndCallUIL(); |
|
292 |
||
293 |
/** |
|
294 |
* Fetches autolock information - is it set on or not |
|
295 |
* @return is autolock set on (ETrue) or off (EFalse) |
|
296 |
*/ |
|
297 |
IMPORT_C TBool IsAutoLockOn() const; |
|
298 |
||
299 |
/** |
|
300 |
* Return is sim state ok |
|
301 |
* @return ETrue if is sim ok, otherwise EFalse |
|
302 |
**/ |
|
303 |
IMPORT_C TBool IsSimOk(); |
|
304 |
||
305 |
/** |
|
306 |
* Checks Svivel state. |
|
307 |
* @return ETrue if swivel is closed. |
|
308 |
*/ |
|
309 |
IMPORT_C TBool IsSwivelClosed() const; |
|
310 |
||
311 |
/** |
|
312 |
* Check if note, query or blockingDialog is visible |
|
313 |
* @return boolean value indicating that note, query or |
|
314 |
* blocking dialog is visible |
|
315 |
*/ |
|
316 |
IMPORT_C TBool IsAnyQueryActiveL(); |
|
317 |
||
318 |
/* |
|
319 |
* If KFeatureIdFfSimlessOfflineSupport is undefined and |
|
320 |
* UI shows note which will be closed by key event then |
|
321 |
* method return ETrue otherwise EFalse. |
|
322 |
*/ |
|
323 |
TBool IsNoteDismissableL(); |
|
324 |
||
325 |
IMPORT_C void RetainPreviousKeylockStateL(); |
|
326 |
||
327 |
public: // NumberEntry functions. |
|
328 |
||
329 |
/** |
|
330 |
* Check if number entry is used |
|
331 |
* @return boolean value indicating that number entry is used |
|
332 |
*/ |
|
333 |
IMPORT_C virtual TBool IsNumberEntryUsedL(); |
|
334 |
||
335 |
/** |
|
336 |
* Check if number entry is visible |
|
337 |
* @return boolean value indicating that number entry is visible |
|
338 |
*/ |
|
339 |
IMPORT_C TBool IsNumberEntryVisibleL(); |
|
340 |
||
341 |
protected: |
|
342 |
||
343 |
/** |
|
344 |
* Handle EPEMessageAudioMuteChanged |
|
345 |
*/ |
|
346 |
IMPORT_C void HandleAudioMuteChangedL(); |
|
347 |
||
348 |
/** |
|
349 |
* Handle EPEMessageAudioOutputChanged |
|
350 |
*/ |
|
351 |
IMPORT_C void HandleAudioOutputChangedL(); |
|
352 |
||
353 |
/** |
|
354 |
* Handle SideVolumeKeyInc |
|
355 |
*/ |
|
356 |
IMPORT_C void IncreaseAudioVolumeL(); |
|
357 |
||
358 |
/** |
|
359 |
* Handle SideVolumeKeyDec |
|
360 |
*/ |
|
361 |
IMPORT_C void DecreaseAudioVolumeL(); |
|
362 |
||
363 |
/** |
|
364 |
* Dial CS multimedia call |
|
365 |
*/ |
|
366 |
IMPORT_C void DialMultimediaCallL(); |
|
367 |
||
368 |
/** |
|
369 |
* Dial CS voice call |
|
370 |
*/ |
|
371 |
IMPORT_C void DialVoiceCallL(); |
|
372 |
||
373 |
/** |
|
374 |
* Disconnect call |
|
375 |
*/ |
|
376 |
IMPORT_C TBool DisconnectCallL(); |
|
377 |
||
378 |
/** |
|
379 |
* Display idle screen |
|
380 |
*/ |
|
381 |
IMPORT_C void DisplayIdleScreenL(); |
|
382 |
||
383 |
/** |
|
384 |
* Set up the Idle screen in the background for the cases |
|
385 |
* where the phone is no longer the top application (eg. end |
|
386 |
* call when an external app is being displayed) |
|
387 |
*/ |
|
388 |
IMPORT_C void SetupIdleScreenInBackgroundL(); |
|
389 |
||
390 |
/** |
|
391 |
* Display call header for call coming in ( the remote info data |
|
392 |
* and picture is displayed immediately ) |
|
393 |
* @param aCallid call id |
|
394 |
* @param aWaitingCall waiting call indication |
|
395 |
*/ |
|
396 |
IMPORT_C void DisplayHeaderForCallComingInL( |
|
397 |
TInt aCallId, |
|
398 |
TInt aWaitingCall ); |
|
399 |
||
400 |
/** |
|
401 |
* Sets call header texts for call coming in |
|
402 |
* @param aCallid call id |
|
403 |
* @param aWaitingCall waiting call indication |
|
404 |
* @param aCallHeaderData - Call header parameter into which the text |
|
405 |
* will be set. |
|
406 |
*/ |
|
407 |
IMPORT_C void SetCallHeaderTextsForCallComingInL( |
|
408 |
TInt aCallId, |
|
409 |
TBool aWaitingCall, |
|
410 |
TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
411 |
||
412 |
/** |
|
413 |
* Display call header for outgoing call (the phone number is initially |
|
414 |
* displayed) |
|
415 |
* @param aCallid call id |
|
416 |
*/ |
|
417 |
IMPORT_C void DisplayHeaderForOutgoingCallL( TInt aCallId ); |
|
418 |
||
419 |
/** |
|
420 |
* Update Single Active Call |
|
421 |
* @param aCallid call id |
|
422 |
*/ |
|
423 |
IMPORT_C void UpdateSingleActiveCallL( TInt aCallId ); |
|
424 |
||
425 |
/** |
|
426 |
* Update remote information data in the call header |
|
427 |
* @param aCallid call id |
|
428 |
*/ |
|
429 |
IMPORT_C void UpdateRemoteInfoDataL( TInt aCallId ); |
|
430 |
||
431 |
/** |
|
432 |
* Return remote info data |
|
433 |
* @param aCallid call id |
|
434 |
* @param aData the returned remote info data |
|
435 |
*/ |
|
436 |
IMPORT_C void GetRemoteInfoDataL( TInt aCallId, TDes& aData ); |
|
437 |
||
438 |
/** |
|
439 |
* Show note |
|
440 |
* @param aResourceId resource id to be resolved |
|
441 |
*/ |
|
442 |
IMPORT_C void ShowNoteL( TInt aResourceId ); |
|
443 |
||
444 |
/** |
|
445 |
* Show query |
|
446 |
* @param aResourceId resource id to be resolved |
|
447 |
*/ |
|
448 |
IMPORT_C void ShowQueryL( TInt aResourceId ); |
|
449 |
||
450 |
/** |
|
451 |
* Show text query |
|
452 |
* @param aDialogResourceId dialog's resource id |
|
453 |
* @param aDefaultCbaResourceId default CBA's resource id |
|
454 |
* @param aContentCbaResourceId content CBA's resource id |
|
455 |
* @param aDataText pointer to data text |
|
456 |
* @param aSendKeyEnabled send key enabled status for the query |
|
457 |
*/ |
|
458 |
IMPORT_C void ShowTextQueryL( |
|
459 |
TInt aDialogResourceId, |
|
460 |
TInt aDefaultCbaResourceId, |
|
461 |
TInt aContentCbaResourceId, |
|
462 |
TDes* aDataText, |
|
463 |
TBool aSendKeyEnabled = EFalse ); |
|
464 |
||
465 |
/** |
|
466 |
* Handle numeric key event |
|
467 |
*/ |
|
468 |
IMPORT_C virtual void HandleNumericKeyEventL( |
|
469 |
const TKeyEvent& aKeyEvent, |
|
470 |
TEventCode aEventCode ); |
|
471 |
||
472 |
/** |
|
473 |
* Check if the application needs to be sent to the background |
|
474 |
* @return boolean value indicating that application needs to be |
|
475 |
* sent to the background |
|
476 |
*/ |
|
477 |
IMPORT_C TBool NeedToSendToBackgroundL() const; |
|
478 |
||
479 |
/** |
|
480 |
* Check if the top application is currently displayed in the foreground |
|
481 |
* @return boolean value indicating that top app is displayed |
|
482 |
*/ |
|
483 |
IMPORT_C TBool TopAppIsDisplayedL() const; |
|
484 |
||
485 |
/** |
|
486 |
* Capture keys during call notifications (dialing, incoming, waiting) |
|
487 |
* @param aCaptured ETrue if keys are to be captured |
|
488 |
*/ |
|
489 |
IMPORT_C void CaptureKeysDuringCallNotificationL( TBool aCaptured ); |
|
490 |
||
491 |
/** |
|
492 |
* Displays the call termination note, if required |
|
493 |
*/ |
|
494 |
IMPORT_C void DisplayCallTerminationNoteL(); |
|
495 |
||
496 |
/** |
|
497 |
* Set the handsfree mode |
|
498 |
* @param aHandsfreeMode ETrue to activate IHF, EFalse to deactivate |
|
499 |
*/ |
|
500 |
IMPORT_C void SetHandsfreeModeL( TBool aHandsfreeMode ); |
|
501 |
||
502 |
/** |
|
503 |
* Set the BT handsfree mode |
|
504 |
* @param aHandsfreeMode ETrue to activate BT, EFalse to deactivate |
|
505 |
*/ |
|
506 |
IMPORT_C void SetBTHandsfreeModeL( TBool aHandsfreeMode ); |
|
507 |
||
508 |
/** |
|
509 |
* Show global WarningNote |
|
510 |
* @param aResourceId resource id to be resolved |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
511 |
* @param aNotificationDialog True if notification dialog |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
512 |
* should be used. |
37 | 513 |
*/ |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
514 |
IMPORT_C void SendGlobalWarningNoteL( TInt aResourceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
515 |
TBool aNotificationDialog = EFalse ); |
37 | 516 |
|
517 |
/** |
|
518 |
* Checks is the call id a video call. |
|
519 |
* @param aCallId - call id to be checked |
|
520 |
* @return ETrue if video call id, otherwise EFalse |
|
521 |
*/ |
|
522 |
IMPORT_C TBool IsVideoCall( const TInt aCallId ); |
|
523 |
||
524 |
/** |
|
525 |
* Return SimState. |
|
526 |
*/ |
|
527 |
IMPORT_C TPESimState SimState() const; |
|
528 |
||
529 |
/** |
|
530 |
* Starts ALS line change timer. |
|
531 |
* This should be called after receiving long keypress |
|
532 |
* which is 0.8 seconds. ALS line change timer ticks |
|
533 |
* 2.2 seconds before callback is called. |
|
534 |
*/ |
|
535 |
IMPORT_C void StartAlsLineChangeTimerL(); |
|
536 |
||
537 |
/** |
|
538 |
* Start show security note |
|
539 |
* This should be called in startup and idle state |
|
540 |
* if sim state not ok |
|
541 |
*/ |
|
542 |
IMPORT_C void StartShowSecurityNoteL(); |
|
543 |
||
544 |
/** |
|
545 |
* Check if the sim card state is EPESimNotPresent with |
|
546 |
* the security mode is enabled. |
|
547 |
* @return ETrue if the sim card state is EPESimNotPresent and |
|
548 |
* the security mode is enabled, otherwise EFalse |
|
549 |
**/ |
|
550 |
IMPORT_C TBool IsSimStateNotPresentWithSecurityModeEnabled(); |
|
551 |
||
552 |
/** |
|
553 |
* Handle audio output availability change |
|
554 |
*/ |
|
555 |
void HandleAudioAvailableOutputChangedL(); |
|
556 |
||
557 |
/** |
|
558 |
* Shows 'Number busy' note. |
|
559 |
*/ |
|
560 |
IMPORT_C void ShowNumberBusyNoteL(); |
|
561 |
||
562 |
/** |
|
563 |
* Fetches keylock information - is it set on or not |
|
564 |
* @return is keylock set on (ETrue) or off (EFalse) |
|
565 |
*/ |
|
566 |
IMPORT_C TBool IsKeyLockOn() const; |
|
567 |
||
568 |
/** |
|
569 |
* Informs Phone Engine Sat request completion |
|
570 |
* @param aCallId a call id |
|
571 |
*/ |
|
572 |
IMPORT_C void CompleteSatRequestL( const TInt aCallId ); |
|
573 |
||
574 |
/** |
|
575 |
* Sets the call header type used in the call bubble. |
|
576 |
*/ |
|
577 |
IMPORT_C void SetCallHeaderType( TInt aCallHeaderType ); |
|
578 |
||
579 |
/** |
|
580 |
* Handles situation when hash key has been kept down long |
|
581 |
* (long keypress) and the hash character is the only character |
|
582 |
* in number entry. |
|
583 |
*/ |
|
584 |
IMPORT_C virtual void OnlyHashInNumberEntryL(); |
|
585 |
||
586 |
/** |
|
587 |
* Informs view that UI is being updated (call bubble or number editor). |
|
588 |
* EndUiUpdate() must be called when update is done. |
|
589 |
*/ |
|
590 |
IMPORT_C void BeginUiUpdateLC(); |
|
591 |
||
592 |
/** |
|
593 |
* Informs view that UI update is completed. |
|
594 |
*/ |
|
595 |
IMPORT_C void EndUiUpdate(); |
|
596 |
||
597 |
/* |
|
598 |
* Checks if necessary to show call termination note |
|
599 |
* |
|
600 |
* @param aCallId call id |
|
601 |
* @return true if note should be shown |
|
602 |
*/ |
|
603 |
IMPORT_C virtual TBool CheckIfShowCallTerminationNote( ); |
|
604 |
||
605 |
/* |
|
606 |
* Sets used touchpane buttons. |
|
607 |
* |
|
608 |
* @param touchpane resource id. |
|
609 |
*/ |
|
610 |
IMPORT_C void SetTouchPaneButtons( TInt aResourceId ); |
|
611 |
||
612 |
/* |
|
613 |
* Destroys touchpane buttons. |
|
614 |
*/ |
|
615 |
IMPORT_C void DeleteTouchPaneButtons(); |
|
616 |
||
617 |
/** |
|
618 |
* Set default flags values. |
|
619 |
* No active call |
|
620 |
*/ |
|
621 |
IMPORT_C void SetDefaultFlagsL(); |
|
622 |
||
623 |
/** |
|
624 |
* Check if contact info available and |
|
625 |
* shown waiting note with or without caller name |
|
626 |
*/ |
|
627 |
IMPORT_C void CallWaitingNoteL( TInt aCallId ); |
|
628 |
||
629 |
/* |
|
630 |
* Sets ringtone playback. |
|
631 |
* @param aCallId call id |
|
632 |
*/ |
|
633 |
IMPORT_C void SetRingingTonePlaybackL( TInt aCallId ); |
|
634 |
||
635 |
/** |
|
636 |
* A message handling function for message EPEMessageDisconnecting |
|
637 |
* @param aCallId: the call id of the call |
|
638 |
*/ |
|
639 |
IMPORT_C void HandleDisconnectingL( TInt aCallId ); |
|
640 |
||
641 |
/** |
|
642 |
* Opens soft reject message editor. |
|
643 |
*/ |
|
644 |
IMPORT_C virtual void OpenSoftRejectMessageEditorL(); |
|
645 |
||
646 |
protected: // NumberEntry functions. |
|
647 |
||
648 |
/** |
|
649 |
* Set Number Entry visibility. |
|
650 |
* @param aVisible ETrue if numberentry is wanted to be shown |
|
651 |
* (Note ETrue will set NE CBA's) |
|
652 |
* EFalse if numberentry isnt wanted to be shown |
|
653 |
* (Note EFalse doesnt affact to CBA's) |
|
654 |
*/ |
|
655 |
IMPORT_C void SetNumberEntryVisibilityL( const TBool aVisible ); |
|
656 |
||
657 |
/** |
|
658 |
* Create call if in numberentry more that 2 number and Send key |
|
659 |
* Send manual control sequence |
|
660 |
* if 1-2 number in numberentry and Send key |
|
661 |
*/ |
|
662 |
IMPORT_C void CallFromNumberEntryL(); |
|
663 |
||
664 |
/** |
|
665 |
* Returns phone number from the phone number entry. |
|
666 |
* @return Phone number |
|
667 |
*/ |
|
668 |
IMPORT_C HBufC* PhoneNumberFromEntryLC(); |
|
669 |
||
670 |
/** |
|
671 |
* Check if number entry content is stored |
|
672 |
* @return boolean value indicating that number entry content is stored |
|
673 |
*/ |
|
674 |
IMPORT_C TBool IsNumberEntryContentStored(); |
|
675 |
||
676 |
/** |
|
677 |
* Stores the number entry content to the cache |
|
678 |
*/ |
|
679 |
IMPORT_C void StoreNumberEntryContentL(); |
|
680 |
||
681 |
/** |
|
682 |
* Clears the number entry content cache |
|
683 |
*/ |
|
684 |
IMPORT_C void ClearNumberEntryContentCache(); |
|
685 |
||
686 |
/** |
|
687 |
* Restores number entry content after dtmf dialer |
|
688 |
*/ |
|
689 |
IMPORT_C void CheckIfRestoreNEContentAfterDtmfDialer(); |
|
690 |
||
691 |
/** |
|
692 |
* Checks if on screen dialer feature is supported. |
|
693 |
*/ |
|
694 |
IMPORT_C TBool IsOnScreenDialerSupported() const; |
|
695 |
||
696 |
/** |
|
697 |
* Returns ETrue if alphanumeric characters are supported. |
|
698 |
* @param aKeyEvent Key event. |
|
699 |
* @return ETrue if alphanumeric chars are supported. |
|
700 |
*/ |
|
701 |
IMPORT_C TBool IsAlphanumericSupportedAndCharInput( |
|
702 |
const TKeyEvent& aKeyEvent ); |
|
703 |
||
704 |
/** |
|
705 |
* Handle state-specific behaviour when number entry is cleared |
|
706 |
*/ |
|
707 |
IMPORT_C virtual void HandleNumberEntryClearedL(); |
|
708 |
||
709 |
/** |
|
710 |
* Internal number entry handling methods. |
|
711 |
*/ |
|
712 |
void NumberEntryClearL(); |
|
713 |
||
714 |
/** |
|
715 |
* Sets toolbar loudspeaker button enabled. |
|
716 |
*/ |
|
717 |
IMPORT_C void SetToolbarButtonLoudspeakerEnabled(); |
|
718 |
||
719 |
/** |
|
720 |
* Sets state of TitleBar Back button |
|
721 |
*/ |
|
722 |
IMPORT_C void SetBackButtonActive( TBool aActive ); |
|
723 |
||
724 |
protected: |
|
725 |
||
726 |
/** |
|
727 |
* Returns updated remote information data. |
|
728 |
* NOTE: This metohed is used when state receives |
|
729 |
* EPEMessageRemotePartyInfoChanged from PhoneEngine. |
|
730 |
* @param aCallId - Call Id. |
|
731 |
*/ |
|
732 |
TPhoneCmdParamCallHeaderData UpdateCallHeaderInfoL( TInt aCallId ); |
|
733 |
||
734 |
/** |
|
735 |
* Checks if call is waiting, returns ETrue if call is waiting |
|
736 |
* otherwise EFalse. |
|
737 |
* @param aCallId, call id. |
|
738 |
*/ |
|
739 |
TBool IsWaitingCallL( const TInt aCallId ); |
|
740 |
||
741 |
/** |
|
742 |
* Checks status of KFeatureIdSideVolumeKeys and KTelephonyLVFlagScrollVolumeKeys |
|
743 |
* keys. If KTelephonyLVFlagScrollVolumeKeys is false and KFeatureIdSideVolumeKeys is true |
|
744 |
* then side volume keys are only supported and method returns true, otherwise false. |
|
745 |
*/ |
|
746 |
TBool OnlySideVolumeKeySupported(); |
|
747 |
||
748 |
/** |
|
749 |
* Checks if device has connected call ongoing. |
|
750 |
* List of connected call states: EPEStateConnected |
|
751 |
* EPEStateConnectedConference |
|
752 |
* EPEStateConnecting |
|
753 |
*/ |
|
754 |
TBool IsAnyConnectedCalls(); |
|
755 |
||
756 |
private: |
|
757 |
||
758 |
/** |
|
759 |
* Handle EPEMessageChangedCallDuration |
|
760 |
* @param aCallId call id of the message |
|
761 |
*/ |
|
762 |
void HandleChangedCallDurationL( TInt aCallId ); |
|
763 |
||
764 |
/** |
|
765 |
* Update profile display |
|
766 |
*/ |
|
767 |
void UpdateProfileDisplayL(); |
|
768 |
||
769 |
/** |
|
770 |
* Sends key down event to the phone engine |
|
771 |
* @param aKeyEvent a key event |
|
772 |
* @param aEventCode key event code |
|
773 |
*/ |
|
774 |
void SendKeyPressL( |
|
775 |
const TKeyEvent& aKeyEvent, |
|
776 |
TEventCode aEventCode ); |
|
777 |
||
778 |
/** |
|
779 |
* Sends key events to the phone engine |
|
780 |
* @param aKeyEvent a key event |
|
781 |
* @param aEventCode key event code |
|
782 |
*/ |
|
783 |
void SendKeyEventL( |
|
784 |
const TKeyEvent& aKeyEvent, |
|
785 |
TEventCode aEventCode ); |
|
786 |
||
787 |
/** |
|
788 |
* Change Audio volume level |
|
789 |
* @param aLevel New volume level. |
|
790 |
* @param aUpdateControl Set ETrue if volume ui control |
|
791 |
* needs to be updated. |
|
792 |
*/ |
|
793 |
void ChangeAudioVolumeL( TInt aLevel, |
|
794 |
TBool aUpdateControl = ETrue ); |
|
795 |
||
796 |
/** |
|
797 |
* Handles EPEMessageInitiatedEmergency call message from Phone Engine. |
|
798 |
* @param aCallId - Caller id. |
|
799 |
*/ |
|
800 |
void HandleInitiatedEmergencyCallL( TInt aCallId ); |
|
801 |
||
802 |
/** |
|
803 |
* Handles EPEMessageInitiatedEmergencyWhileActiveVideo message from |
|
804 |
* Phone Engine. |
|
805 |
*/ |
|
806 |
void HandleInitiatedEmergencyWhileActiveVideoL(); |
|
807 |
||
808 |
/** |
|
809 |
* Handles network ciphering info changes |
|
810 |
*/ |
|
811 |
void HandleCallSecureStatusChangeL( TInt aCallId ); |
|
812 |
||
813 |
/** |
|
814 |
* Handles change als line command |
|
815 |
*/ |
|
816 |
void ChangeAlsLineL(); |
|
817 |
||
818 |
/** |
|
819 |
* Active call id |
|
820 |
*/ |
|
821 |
TInt GetActiveCallIdL(); |
|
822 |
||
823 |
/** |
|
824 |
* Callback function for launching ALS line change dialog |
|
825 |
* This is called when Als line change timer timeout is |
|
826 |
* reached which means user has pushed the #-key long enough. |
|
827 |
* @param aAny - not used |
|
828 |
*/ |
|
829 |
static TInt AlsLineChangeTimerCallbackL( TAny* aAny ); |
|
830 |
||
831 |
/** |
|
832 |
* Shows WLAN MAC address note |
|
833 |
*/ |
|
834 |
void ShowWlanMacAddressL(); |
|
835 |
||
836 |
/** |
|
837 |
* Check if ALS line change is possible |
|
838 |
*/ |
|
839 |
TBool IsAlsLineChangePossible(); |
|
840 |
||
841 |
/** |
|
842 |
* A message handling function for message EPEMessageRemoteBusy |
|
843 |
* @param aCallId a call id |
|
844 |
*/ |
|
845 |
void HandleRemoteBusyL( const TInt aCallId ); |
|
846 |
||
847 |
/** |
|
848 |
* Creates caller information. Sets CNAP, phone number, thumbnail image |
|
849 |
* etc. into the call header parameter. |
|
850 |
* @param aCallId - Call Id. |
|
851 |
* @param aCallHeaderData - Call header parameter where modifications |
|
852 |
* are made. |
|
853 |
*/ |
|
854 |
void CreateCallerInfoL( const TInt aCallId, |
|
855 |
TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
856 |
||
857 |
/** |
|
858 |
* TCleanupOperation to call EndUiUpdate(), if leave occurs |
|
859 |
* after BeginUiUpdate(). |
|
860 |
*/ |
|
861 |
static void UiUpdateCleanup(TAny* aThis ); |
|
862 |
||
863 |
/** |
|
864 |
* Gets volume level from ui control. |
|
865 |
*/ |
|
866 |
TInt GetVolumeLevel(); |
|
867 |
||
868 |
/** |
|
869 |
* Shows video call specific out of memory note. |
|
870 |
*/ |
|
871 |
void ShowVideoCallOutOfMemoryNoteL(); |
|
872 |
||
873 |
/** |
|
874 |
* Returns sim security status: |
|
875 |
* Rejected or UnAccepted. |
|
876 |
*/ |
|
877 |
TInt SimSecurityStatus() const; |
|
878 |
||
879 |
/** |
|
880 |
* Show CUG in use note |
|
881 |
*/ |
|
882 |
void HandleCugInUseNoteL(); |
|
883 |
||
884 |
/** |
|
885 |
* Handles changes in the SIM card state. |
|
886 |
*/ |
|
887 |
void HandleSimStateChangedL(); |
|
888 |
||
889 |
/** |
|
890 |
* Checks if key events are allowed to be redirected for further handling |
|
891 |
*/ |
|
892 |
TBool IsKeyEventFurtherProcessedL( const TKeyEvent& aKeyEvent ) const; |
|
893 |
||
894 |
/* |
|
895 |
* Checks is given key contains numeric charaters or if customization is used |
|
896 |
* alphanumeir letters |
|
897 |
*/ |
|
898 |
TBool IsValidAlphaNumericKey( const TKeyEvent& aKeyEvent, |
|
899 |
TEventCode aEventCode ); |
|
900 |
||
901 |
/* |
|
902 |
* Updates CBA using either customization or resource resolver |
|
903 |
*/ |
|
904 |
void CustomizeCbaForPhoneNumberL(); |
|
905 |
||
906 |
/* |
|
907 |
* Checks if Touch dialer is on in DTMF mode. |
|
908 |
*/ |
|
909 |
TBool IsTouchDTmfDialerOn() const; |
|
910 |
||
911 |
/* |
|
912 |
* Checks if keyevent is from dtmf key and sends it to phone-engine |
|
913 |
*/ |
|
914 |
void SendDtmfKeyEventL( const TKeyEvent& aKeyEvent, |
|
915 |
TEventCode aEventCode ); |
|
916 |
||
917 |
/* |
|
918 |
* Creates call header manager if needed. |
|
919 |
*/ |
|
920 |
CPhoneCallHeaderManager* CallheaderManagerL(); |
|
921 |
||
922 |
/* |
|
923 |
* Creates number entry content if needed. |
|
924 |
*/ |
|
925 |
CPhoneNumberEntryManager* NumberEntryManagerL(); |
|
926 |
||
927 |
/* |
|
928 |
* Updated Cba when Swivel state changes. |
|
929 |
*/ |
|
930 |
void UpdateCbaSwivelStateChangedL(); |
|
931 |
||
932 |
/** |
|
933 |
* Loads data commonengine stringloader. |
|
934 |
* @param aData - The returned data including needed text. |
|
935 |
* @param aResourceId - Resource id for text. |
|
936 |
*/ |
|
937 |
void LoadResource( TDes& aData, const TInt aResource ) const; |
|
938 |
||
939 |
||
940 |
protected: // Data |
|
941 |
||
942 |
/** |
|
943 |
* Reference to State machine |
|
944 |
*/ |
|
945 |
MPhoneStateMachine* iStateMachine; |
|
946 |
||
947 |
/** |
|
948 |
* Reference to the Phone UI View command handle |
|
949 |
*/ |
|
950 |
MPhoneViewCommandHandle* iViewCommandHandle; |
|
951 |
||
952 |
protected: |
|
953 |
||
954 |
//Indicates whether onscreen dialer is defined |
|
955 |
TBool iOnScreenDialer; |
|
956 |
||
957 |
/** |
|
958 |
* Customization of functionality according to e.g. |
|
959 |
* call type specific needs. |
|
960 |
* Not own. |
|
961 |
*/ |
|
962 |
MPhoneCustomization* iCustomization; |
|
963 |
||
964 |
// CBA key manager. Own. |
|
965 |
CPhoneCbaManager* iCbaManager; |
|
966 |
||
967 |
private: |
|
968 |
||
969 |
/** |
|
970 |
* Previously handled SIM card state. |
|
971 |
*/ |
|
972 |
TPESimState iPreviousSimState; |
|
973 |
||
974 |
// Bitmap redraw counter |
|
975 |
TInt iBitmapRedrawCounter; |
|
976 |
||
977 |
/** |
|
978 |
* Timer for ALS line change. |
|
979 |
*/ |
|
980 |
CPhoneTimer* iAlsLineChangeKeyPressTimer; |
|
981 |
||
982 |
// Internal variable for EikonEnv to avoid |
|
983 |
// use of static system calls |
|
984 |
CEikonEnv& iEnv; |
|
985 |
||
986 |
// Call header manager. |
|
987 |
CPhoneCallHeaderManager* iCallHeaderManager; |
|
988 |
||
989 |
// Number entry manager |
|
990 |
CPhoneNumberEntryManager* iNumberEntryManager; |
|
991 |
||
992 |
// RingtoneSilenced flag. |
|
993 |
// This is used to determine if the ringtone |
|
994 |
// for incoming call is silenced. The information |
|
995 |
// is used while updating softkeys in method |
|
996 |
// UpdateIncomingCbaL only |
|
997 |
TBool iRingtoneSilenced; |
|
998 |
||
999 |
/** |
|
1000 |
* Handle to the Operator logo resource. |
|
1001 |
*/ |
|
1002 |
TInt iLogoHandle; |
|
1003 |
}; |
|
1004 |
||
1005 |
#endif // CPHONESTATE_H |
|
1006 |
||
1007 |
// End of File |