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