|
1 /* |
|
2 * Copyright (c) 2002-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: Defines CSatUiViewAppUi class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATUIVIEWAPPUI_H |
|
20 #define CSATUIVIEWAPPUI_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknViewAppUi.h> |
|
24 #include <mdaaudiotoneplayer.h> |
|
25 #include <mdaaudiosampleplayer.h> |
|
26 #include "MSatUiActionImplementer.h" |
|
27 #include "CSatUiActionPerformer.h" |
|
28 |
|
29 // CONSTANTS |
|
30 const TUid KSetUpMenuViewId={1}; |
|
31 const TUid KSelectItemViewId={2}; |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CSatUiView; |
|
35 class MSatUiAdapter; |
|
36 class CAknMessageQueryDialog; |
|
37 class CAknWaitDialog; |
|
38 class CSatUiTextQueryDialog; |
|
39 class CAknQueryDialog; |
|
40 class CSatUiInactivityMonitor; |
|
41 class CAknIconArray; |
|
42 class CAknPopupForm; |
|
43 class CAknGlobalNote; |
|
44 class CSatUiWaitDialog; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * Implements the UI and methods from the MSatUiActionImplementer. |
|
50 */ |
|
51 class CSatUiViewAppUi : public CAknViewAppUi, |
|
52 public MSatUiActionImplementer, |
|
53 public MMdaAudioToneObserver, |
|
54 public MMdaAudioPlayerCallback |
|
55 { |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * C++ default constructor. |
|
60 */ |
|
61 CSatUiViewAppUi(); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CSatUiViewAppUi(); |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 /** |
|
71 * Sets the pointer to adapter provided by SatCli. |
|
72 * @param aAdapter SAT Client part object. |
|
73 */ |
|
74 void SetAdapter( MSatUiAdapter* aAdapter ); |
|
75 |
|
76 public: // Functions from base classes |
|
77 |
|
78 /** |
|
79 * From CAknViewAppUi Called when view is brought to |
|
80 * foreground or put into background |
|
81 * @param aForeground A flag to indicate is SAT background or foreground |
|
82 */ |
|
83 void HandleForegroundEventL( TBool aForeground ); |
|
84 |
|
85 /** |
|
86 * From MMdaAudioToneObserver Called by the player object when |
|
87 * it has been initialised. |
|
88 * @param aError Error type. |
|
89 */ |
|
90 void MatoPrepareComplete( TInt aError ); |
|
91 |
|
92 /** |
|
93 * From MMdaAudioToneObserver Called by the player object when |
|
94 * the playback has been terminated. |
|
95 * @param aError Error type. |
|
96 */ |
|
97 void MatoPlayComplete( TInt aError ); |
|
98 |
|
99 /** |
|
100 * From MSatUiActionImplementer Shows the wait note. |
|
101 */ |
|
102 void ShowWaitNoteL(); |
|
103 |
|
104 /** |
|
105 * From MSatUiActionImplementer Shows the wait note without delay. |
|
106 */ |
|
107 void ShowWaitNoteWithoutDelayL(); |
|
108 |
|
109 /** |
|
110 * From MSatUiActionImplementer Removes the wait note from the screen. |
|
111 */ |
|
112 void StopShowWaitNote(); |
|
113 |
|
114 /** |
|
115 * Checks that is BT SAP connection active. |
|
116 * @return BT SAP activation status. |
|
117 */ |
|
118 TBool BTSAPActivatedL(); |
|
119 |
|
120 /** |
|
121 * From MSatUiActionImplementer |
|
122 * @return CoeEnv. |
|
123 */ |
|
124 CCoeEnv* CoeEnv(); |
|
125 |
|
126 /** |
|
127 * From MSatUiActionImplementer Displays given text on the screen. |
|
128 * @param aText Text to be shown. |
|
129 * @param aSimApplicationName Sim Application name |
|
130 * @param aIconBitmapDisplayText Icon for dialog |
|
131 * @param aSelfExplanatoryIcon If selfexplanatory icon |
|
132 * @param aSustainedText Indicates is this text sustained ie. no timers |
|
133 * used if ETrue. |
|
134 * @param aDuration Duration for showing the text |
|
135 * @param aWaitUserToClear Indication if user is needed to clear |
|
136 * message |
|
137 * @return Operation result. |
|
138 */ |
|
139 TSatUiResponse DisplayTextL( const TDesC& aText, |
|
140 const TDesC& aSimApplicationName, |
|
141 CFbsBitmap* aIconBitmapDisplayText, |
|
142 const TBool aSelfExplanatoryIcon, |
|
143 const TBool aSustainedText, |
|
144 const TTimeIntervalSeconds aDuration, |
|
145 const TBool aWaitUserToClear ); |
|
146 |
|
147 /** |
|
148 * From MSatUiActionImplementer Removes Display Text Dialog from |
|
149 * the screen. |
|
150 */ |
|
151 void ClearScreen(); |
|
152 |
|
153 /** |
|
154 * From MSatUiActionImplementer Asks a Yes/No answer from the user. |
|
155 * @param aText A question to be shown. |
|
156 * @param aCharacterSet The character range allowed. |
|
157 * @param aInkey Character user feeds. |
|
158 * @param aIconBitmap Icon for query dialog. |
|
159 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
160 * @param aDuration Duration for showing the dialog. |
|
161 * @param aImmediateDigitResponse Indication if Immediate digit response |
|
162 * is needed. |
|
163 * @return Operation result. |
|
164 */ |
|
165 TSatUiResponse GetYesNoL( const TDesC& aText, |
|
166 const TSatCharacterSet aCharacterSet, |
|
167 TChar& aInkey, |
|
168 const CFbsBitmap* aIconBitmap, |
|
169 const TBool aSelfExplanatory, |
|
170 TUint& aDuration, |
|
171 const TBool aImmediateDigitResponse ); |
|
172 |
|
173 /** |
|
174 * From MSatUiActionImplementer Asks input from the user. |
|
175 * @param aText A question to be shown. |
|
176 * @param aCharacterSet The character range allowed. |
|
177 * @param aInput The input string. |
|
178 * @param aMinLength The minimum length of the input allowed. |
|
179 * @param aMaxLength The maximum length of the input allowed. |
|
180 * @param aHideInput A flag indicating if the input should be hidden. |
|
181 * @param aGetInkey A flag indicating GetInkey command. |
|
182 * @param aIconBitmapGetInput Icon for query dialog. |
|
183 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
184 * @param aDuration Duration for showing the dialog. |
|
185 * @return Operation result. |
|
186 */ |
|
187 TSatUiResponse GetInputL( const TDesC& aText, |
|
188 const TSatCharacterSet aCharacterSet, |
|
189 TDes& aInput, |
|
190 const TInt aMinLength, |
|
191 const TInt aMaxLength, |
|
192 const TBool aHideInput, |
|
193 const TBool aGetInkey, |
|
194 const CFbsBitmap* aIconBitmapGetInput, |
|
195 const TBool aSelfExplanatory, |
|
196 TUint& aDuration ); |
|
197 |
|
198 /** |
|
199 * From MSatUiActionImplementer Prepares the SetUpMenu view and |
|
200 * calls the method of the view class. |
|
201 * @param aText The title text. |
|
202 * @param aMenuItems The array of menu items. |
|
203 * @param aMenuItemNextActions The array of next action indicators. |
|
204 * @param aIconBitmap The Context Pane icon. |
|
205 * @param aItemsIconArray Array of item icons |
|
206 * @param aSelfExplanatoryItems A flag indicating if only icons are shown. |
|
207 * @param aHelpIsAvailable A flag indicating if SAT help is available. |
|
208 * @return Operation result. |
|
209 */ |
|
210 TSatUiResponse SetUpMenuL( const TDesC& aText, |
|
211 const MDesCArray& aMenuItems, |
|
212 const CArrayFixFlat<TSatAction>* aMenuItemNextActions, |
|
213 const CFbsBitmap* aIconBitmap, |
|
214 const CAknIconArray* aItemsIconArray, |
|
215 const TBool aSelfExplanatoryItems, |
|
216 const TBool aHelpIsAvailable ); |
|
217 |
|
218 /** |
|
219 * From MSatUiActionImplementer Prepares the SelectItem view and |
|
220 * calls the method of the view class. |
|
221 * @param aText The title text. |
|
222 * @param aMenuItems The array of menu items. |
|
223 * @param aMenuItemNextActions The array of next action indicators. |
|
224 * @param aDefaultItem The item in focus. |
|
225 * @param aSelection The item index selected by the user. |
|
226 * @param aIconBitmap The Context Pane icon. |
|
227 * @param aItemsIconArray Array of item icons |
|
228 * @param aSelfExplanatoryItems A flag indicating if only icons are shown. |
|
229 * @param aHelpIsAvailable A flag indicating if SAT help is available. |
|
230 * @return Operation result. |
|
231 */ |
|
232 TSatUiResponse SelectItemL( const TDesC& aText, |
|
233 const MDesCArray& aMenuItems, |
|
234 const CArrayFixFlat<TSatAction>* aMenuItemNextActions, |
|
235 const TInt aDefaultItem, |
|
236 TUint8& aSelection, |
|
237 const CFbsBitmap* aIconBitmap, |
|
238 const CAknIconArray* aItemsIconArray, |
|
239 const TBool aSelfExplanatoryItems, |
|
240 const TBool aHelpIsAvailable ); |
|
241 |
|
242 /** |
|
243 * From MSatUiActionImplementer Plays Standard Tone. |
|
244 * @param aText The text to be displayed. |
|
245 * @param aSequence The name of the file to be played. |
|
246 * @param aDuration The duration of the tone to be played. |
|
247 * @param aIconBitmap The tone playing note icon |
|
248 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
249 * @return Operation result. |
|
250 */ |
|
251 TSatUiResponse PlayStandardToneL( const TDesC& aText, |
|
252 const TDesC8& aSequence, |
|
253 TTimeIntervalMicroSeconds aDuration, |
|
254 const CFbsBitmap* aIconBitmap, |
|
255 const TBool aSelfExplanatory ); |
|
256 |
|
257 /** |
|
258 * From MSatUiActionImplementer Shows a query to get confirmation |
|
259 * for Send SMS, Send SS or Send USSD command. |
|
260 * @param aText The text to be displayed. |
|
261 * @param aActionAccepted Indicates whether the command was accepted. |
|
262 * @param aType Type of the command (SMS, SS or USSD). |
|
263 * @return Operation result. |
|
264 */ |
|
265 TSatUiResponse ConfirmSendL( const TDesC& aText, |
|
266 TBool& aActionAccepted, TInt aType ); |
|
267 |
|
268 /** |
|
269 * From MSatUiActionImplementer Shows a wait note indicating |
|
270 * Send SMS command. |
|
271 * @param aText The text to be displayed. |
|
272 * @param aIconBitmapSendSM Sending dialog icon. |
|
273 * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. |
|
274 */ |
|
275 void ShowSmsWaitNoteL( const TDesC& aText, |
|
276 const CFbsBitmap* aIconBitmapSendSM, |
|
277 const TBool aSelfExplanatoryIcon ); |
|
278 |
|
279 /** |
|
280 * From MSatUiActionImplementer Shows a wait note indicating |
|
281 * Send SS command. |
|
282 * @param aText The text to be displayed. |
|
283 * @param aIconBitmap Sending dialog icon. |
|
284 * @param aSelfExplanatoryIcon A flag indicating if only icon is shown. |
|
285 */ |
|
286 void ShowSsWaitNoteL( const TDesC& aText, |
|
287 const CFbsBitmap* aIconBitmap, |
|
288 const TBool aSelfExplanatoryIcon ); |
|
289 |
|
290 /** |
|
291 * From MSatUiActionImplementer Shows the query to confirm the |
|
292 * Refresh command. |
|
293 * @param aActionAccepted Indicates whether the command was accepted. |
|
294 * @return Operation result. |
|
295 */ |
|
296 TSatUiResponse ConfirmRefreshL( TBool& aActionAccepted ); |
|
297 |
|
298 /** |
|
299 * Notification of the SAT Call Control command. |
|
300 * @param aText The text string to be displayed. |
|
301 * @param aAlphaIdStatus Alpha Identifier status |
|
302 * @param aControlResult Call control general result |
|
303 * @return The response from the UI |
|
304 */ |
|
305 TSatUiResponse CallControlL( const TDesC& aText, |
|
306 const TSatAlphaIdStatus aAlphaIdStatus ); |
|
307 |
|
308 /** |
|
309 * Notification of the SAT Launch browser confirmation request |
|
310 * @param aText The text to be displayed. |
|
311 * @param aActionAccepted Indicates whether the command was accepted. |
|
312 * @param aIconBitmap The confirm note icon |
|
313 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
314 */ |
|
315 void ConfirmLaunchBrowserL( |
|
316 const TDesC& aText, |
|
317 TBool& aActionAccepted, |
|
318 const CFbsBitmap* aIconBitmap, |
|
319 const TBool aSelfExplanatory ); |
|
320 |
|
321 /** |
|
322 * Status of help support |
|
323 * @param aStatus status of help |
|
324 */ |
|
325 void HelpStatus( TBool aStatus ); |
|
326 |
|
327 /** |
|
328 * Notification of the SAT Mo Sm Control command. |
|
329 * @param aText The text string to be displayed. |
|
330 * @param aAlphaIdStatus Alpha Identifier status |
|
331 * @param aControlResult Mo Sm control general result |
|
332 * @return The response from the UI |
|
333 */ |
|
334 TSatUiResponse MoSmControlL( const TDesC& aText, |
|
335 const TSatAlphaIdStatus aAlphaIdStatus ); |
|
336 |
|
337 /** |
|
338 * From MSatUiActionImplementer Shows the wait note while DTMF are being |
|
339 * sent. |
|
340 * @param aText The text to be displayed. |
|
341 * @param aIconBitmap The confirm note icon |
|
342 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
343 * @return Information on the operation result. |
|
344 */ |
|
345 TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText, |
|
346 const CFbsBitmap* aIconBitmap, |
|
347 const TBool aSelfExplanatoryIcon ); |
|
348 |
|
349 /** |
|
350 * Dispatch iWait to action implementer. |
|
351 * @param aWait Timer. |
|
352 */ |
|
353 void DispatchTimer( CActiveSchedulerWait& aWait ); |
|
354 |
|
355 /** |
|
356 * Get a flag which is indicating if end key is pressed. |
|
357 * @return A Boolean flag which is indicating if end key is pressed. |
|
358 */ |
|
359 TBool GetEndKey(); |
|
360 |
|
361 /** |
|
362 * Set a flag which is indicating if end key is pressed. |
|
363 * @param aValue Status of end key |
|
364 */ |
|
365 void SetEndKey( TBool aValue ); |
|
366 |
|
367 /** |
|
368 * Set a flag which is indicating if proactive command is pending. |
|
369 * @param aValue Status of proactive command |
|
370 */ |
|
371 void SetCommandPending( TBool aValue ); |
|
372 |
|
373 /** |
|
374 * Plays user selected tone. |
|
375 * @param aText The text to be displayed. |
|
376 * @param aDuration The duration of the tone to be played. |
|
377 * @param aTone Tone type. |
|
378 * @param aIconBitmap The tone playing note icon |
|
379 * @param aSelfExplanatory Flag indicating if icon is self-explanatory. |
|
380 * @return Operation result. |
|
381 */ |
|
382 TSatUiResponse PlayUserSelectedToneL( |
|
383 const TDesC& aText, |
|
384 TTimeIntervalMicroSeconds aDuration, |
|
385 TSatTone aTone, |
|
386 const CFbsBitmap* aIconBitmap, |
|
387 const TBool aSelfExplanatory ); |
|
388 |
|
389 /** |
|
390 * Confirm user permission for Open Channel. |
|
391 * @param aText The text to be displayed. |
|
392 * @param aActionAccepted Indicates whether the command was accepted. |
|
393 * @param aIconBitmapOpenChannel Icon for query dialog |
|
394 * @param aSelfExplanatory A flag indicating if icon is self-explanatory |
|
395 * @return Operation result |
|
396 */ |
|
397 TSatUiResponse ConfirmOpenChannelL( |
|
398 const TDesC& aText, |
|
399 TBool& aActionAccepted, |
|
400 const CFbsBitmap* aIconBitmapOpenChannel, |
|
401 const TBool aSelfExplanatory ); |
|
402 |
|
403 /** |
|
404 * From MSatUiActionImplementer Shows the wait note while BIP packets |
|
405 * are sent. |
|
406 * @param aCommand Command type. |
|
407 * @param aText The text to be displayed. |
|
408 * @param aIconBitmap Icon for query dialog |
|
409 * @param aSelfExplanatory A flag indicating if icon is self-explanatory |
|
410 */ |
|
411 void ShowBIPNoteL( |
|
412 TInt aCommand, |
|
413 const TDesC& aText, |
|
414 const CFbsBitmap* aIconBitmap, |
|
415 const TBool aSelfExplanatory ); |
|
416 |
|
417 /** |
|
418 * From MSatUiActionImplementer Confirm user permission for SetUpCall |
|
419 * @param aText The text to be displayed. |
|
420 * @param aSimAppName Header for th equery |
|
421 * @param aActionAccepted Indicates whether the command was accepted. |
|
422 * @param aIconBitmap Icon for query dialog |
|
423 * @param aSelfExplanatory A flag indicating if icon is self-explanatory |
|
424 */ |
|
425 void ConfirmSetUpCallL( |
|
426 const TDesC& aText, |
|
427 const TDesC& aSimAppName, |
|
428 TBool& aActionAccepted, |
|
429 const CFbsBitmap* aIconBitmap, |
|
430 const TBool aSelfExplanatory ); |
|
431 |
|
432 /** |
|
433 * From MSatUiActionImplementer Show note indicating SAT is not |
|
434 * available. |
|
435 */ |
|
436 void ShowNotAvailableNoteL(); |
|
437 |
|
438 |
|
439 /** |
|
440 * From MSatUiActionImplementer Show the Ss error note. |
|
441 */ |
|
442 void ShowSsErrorNoteL(); |
|
443 |
|
444 /** |
|
445 * Start SatUi closing process |
|
446 */ |
|
447 void CloseSatUI(); |
|
448 |
|
449 /** |
|
450 * Get settings from current profile like volume, warning tones on/off etc. |
|
451 * @param aTone, optional specifies the type of needed tone if necessary |
|
452 * @param aToneName, optional buffer to get a soundfile name from |
|
453 * the active profile if necessary |
|
454 */ |
|
455 void GetProfileParamsL( TSatTone aTone = ESatToneNotSet, TDes* aToneName = NULL ); |
|
456 |
|
457 |
|
458 /** |
|
459 * Return current profile state. |
|
460 * @return current profile state. |
|
461 */ |
|
462 TInt ProfileState(); |
|
463 |
|
464 public: // Functions from base classes |
|
465 |
|
466 /** |
|
467 * From CAknViewAppUi Handles UI commands. |
|
468 * @param aCommand Command to be handled. |
|
469 */ |
|
470 void HandleCommandL( TInt aCommand ); |
|
471 |
|
472 protected: |
|
473 |
|
474 /** |
|
475 * From CEikAppUi. Takes care of commandline parameter. |
|
476 * @param aCommand Indicate the way an application is to be launched. |
|
477 * @param aDocumentName A document file name. |
|
478 * @param aTail Command line parameter. |
|
479 */ |
|
480 TBool ProcessCommandParametersL( |
|
481 TApaCommand aCommand, |
|
482 TFileName& aDocumentName, |
|
483 const TDesC8& aTail ); |
|
484 |
|
485 private: |
|
486 |
|
487 /** |
|
488 * Symbian OS default constructor. |
|
489 */ |
|
490 void ConstructL(); |
|
491 |
|
492 private: // functions |
|
493 |
|
494 /** |
|
495 * Creates empty menu. This is needed in SIM originated commands. |
|
496 */ |
|
497 void CreateEmptyMenuL(); |
|
498 |
|
499 /** |
|
500 * called when user has been |
|
501 * inactive for a pre-defined period |
|
502 * @param aPtr PPointer to creato |
|
503 * @return Error value |
|
504 */ |
|
505 static TInt DispatchUserInactive( TAny* aPtr ); |
|
506 |
|
507 /** |
|
508 * Delay callback function. Called when predefined time |
|
509 * has passed |
|
510 * @param Pointer to creator |
|
511 * @return whetwer to call function again after an interval |
|
512 */ |
|
513 static TInt DelayCallback( TAny* aPtr ); |
|
514 |
|
515 /** |
|
516 * Delay callback function. Called when predefined time |
|
517 * has passed |
|
518 * @param Pointer to creator |
|
519 * @return whetwer to call function again after an interval |
|
520 */ |
|
521 static TInt CloseCallControlNoteL( TAny* aPtr ); |
|
522 |
|
523 /** |
|
524 * Creates a callback timer |
|
525 * @param aDelay delay after callback function is called |
|
526 * @param aCallBack Callback function |
|
527 */ |
|
528 void CreateCallBackTimerL( const TInt aDelay, |
|
529 TInt (*aFunction)(TAny* aPtr) ); |
|
530 |
|
531 /** |
|
532 * Destroys the callback timer |
|
533 */ |
|
534 void DestroyCallBackTimer( ); |
|
535 |
|
536 /** |
|
537 * Make a mask for get input icon bitmap |
|
538 * @param aMask Mask for Get inpupt icon bitmap |
|
539 * @param aSize Size for mask |
|
540 */ |
|
541 void MakeGetInputBitmapMask( CFbsBitmap* aMask, TSize aSize ) const; |
|
542 |
|
543 /** |
|
544 * Handles a exit softkey. |
|
545 */ |
|
546 void HandleExitCommandL(); |
|
547 |
|
548 /** |
|
549 * From CAknViewAppUi Handles window server events.. |
|
550 * @param aEvent The window server event that occurred. |
|
551 * @param aDestination The control associated with the event. |
|
552 */ |
|
553 void HandleWsEventL( const TWsEvent& aEvent, |
|
554 CCoeControl* aDestination ); |
|
555 |
|
556 /** |
|
557 * Close all existing dialogs. |
|
558 */ |
|
559 void CloseDialogs(); |
|
560 |
|
561 /** |
|
562 * Initialisation of an audio sample has completed. |
|
563 * @param aError The status of the audio sample after initialisation. |
|
564 * @param aDuration The duration of the audio sample. |
|
565 */ |
|
566 void MapcInitComplete( |
|
567 TInt aError, |
|
568 const TTimeIntervalMicroSeconds& /*aDuration*/ ); |
|
569 |
|
570 /** |
|
571 * Play of an audio sample has completed. |
|
572 * @param aError The status of playback. |
|
573 */ |
|
574 void MapcPlayComplete( TInt aError ); |
|
575 |
|
576 /** |
|
577 * Remove null characters from text. |
|
578 * @param aText Text to be cleaned from NULLs |
|
579 */ |
|
580 void RemoveNullCharacters( HBufC* aText ); |
|
581 |
|
582 /** |
|
583 * Make and run note dialog with an icon |
|
584 * @param aResourceId Resource id of the dialog to be created |
|
585 * @param aText Text to the dialog |
|
586 * @param aIconBitmap Pointer to the icon bitmap |
|
587 * @param aSelfExplanatory Whether text is showed or not |
|
588 * @param aIconCommand Layout of dialog for scaling |
|
589 * @param aMskCommand middle softkey command |
|
590 * @return The user response to the note |
|
591 */ |
|
592 TInt RunQueryDialogL( |
|
593 TInt aResourceId, |
|
594 const TDesC& aText, |
|
595 const CFbsBitmap* aIconBitmap, |
|
596 const TBool aSelfExplanatory, |
|
597 TInt aMskCommand ); |
|
598 |
|
599 /** |
|
600 * Check if it is allowed to change view or SAT UI is in |
|
601 * view activation loop. |
|
602 * @param aForeground ETrue if the application is in the foreground. |
|
603 * @param aActiveView TUid of active view. |
|
604 * @return ETrue if view activation is allowed. |
|
605 */ |
|
606 TBool ViewActivationAllowed( const TBool aForeground, |
|
607 const TUid aActiveView ); |
|
608 |
|
609 /** |
|
610 * Handle received key event in immediate digit response case. |
|
611 * @param aScanCode Received key event code. |
|
612 */ |
|
613 void HandleImmediateDigitResponse( TInt aScanCode ); |
|
614 |
|
615 /** |
|
616 * Handle closing display text in high priority events |
|
617 * @param aEvent The window server event that occurred. |
|
618 */ |
|
619 void PriorityVerifyAndClose( const TWsEvent& aEvent ); |
|
620 |
|
621 /** |
|
622 * Stop playing PLAY TONE command. |
|
623 */ |
|
624 void StopPlayToneL(); |
|
625 |
|
626 private: //Data |
|
627 |
|
628 // Own: use timer repeat |
|
629 TBool iTimerRepeatOn; |
|
630 |
|
631 // Own: repeat count for timer |
|
632 TInt iTimerRepeatCount; |
|
633 |
|
634 TBool iHelp; |
|
635 |
|
636 // Session Terminated |
|
637 TBool iSelectItemPending; |
|
638 |
|
639 // select item command pending |
|
640 TBool iSessionTerminated; |
|
641 |
|
642 // delay timer |
|
643 CPeriodic* iTimer; |
|
644 |
|
645 // Own: indicates that note was cleared after a delay |
|
646 TBool iNoteClearedAfterDelay; |
|
647 |
|
648 // Own: indicates that a note was cleared after a delay |
|
649 TBool iNoResponseFromUserAfterDelay; |
|
650 |
|
651 //Ref: SatClient abstract adapter interface |
|
652 MSatUiAdapter* iAdapter; |
|
653 |
|
654 //Own: SetUpMenu view |
|
655 CSatUiView* iSetUpMenuView; |
|
656 |
|
657 //Own: SelectItem view |
|
658 CSatUiView* iSelectItemView; |
|
659 |
|
660 //The command comes first time, so the view should be created |
|
661 TBool iSetUpMenuFirst; |
|
662 TBool iSelectItemFirst; |
|
663 |
|
664 // Own: SIM application name |
|
665 HBufC* iAppName; |
|
666 // Own: view title |
|
667 HBufC* iTitle; |
|
668 |
|
669 //Own: Display Text dialog and text+icon |
|
670 CAknMessageQueryDialog* iDisplayTextDialog; |
|
671 CAknPopupForm* iDisplayTextIconDialog; |
|
672 |
|
673 //Own: get input dialog |
|
674 CSatUiTextQueryDialog* iGetInputDialog; |
|
675 |
|
676 //Own: Wait note |
|
677 CAknWaitDialog* iWaitNote; |
|
678 |
|
679 //Own: BIP Wait note |
|
680 CSatUiWaitDialog* iBipWaitNote; |
|
681 |
|
682 //Own: Refresh note |
|
683 CAknWaitDialog* iRefreshNote; |
|
684 |
|
685 //Own: Media server interface to play rtf file |
|
686 CMdaAudioToneUtility *iPlayer; |
|
687 |
|
688 //Failure while playing tone |
|
689 TSatUiResponse iPlayToneError; |
|
690 |
|
691 //wait scheduler |
|
692 CActiveSchedulerWait* iWait; |
|
693 |
|
694 // Flag for indicating end key status |
|
695 TBool iEndKeyPressed; |
|
696 |
|
697 // Status of view, select item or setup menu |
|
698 TUid iActiveView; |
|
699 |
|
700 // Flag for indicating if command is pending |
|
701 TBool iCommandPending; |
|
702 |
|
703 // Own: query dialog |
|
704 CAknQueryDialog* iQueryDialog; |
|
705 |
|
706 // Own: Inform dialog |
|
707 CAknNoteDialog* iNoteDialog; |
|
708 |
|
709 // Own: note dialog |
|
710 CAknStaticNoteDialog* iPermanentNote; |
|
711 |
|
712 // Player for user selected tones. |
|
713 CMdaAudioPlayerUtility* iAudioPlayer; |
|
714 |
|
715 // Volume for user selected tones. |
|
716 TInt iVolume; |
|
717 |
|
718 // Note for call control. |
|
719 CAknGlobalNote* iCcNote; |
|
720 |
|
721 // The note's ID in call control. |
|
722 TInt iCcNoteId; |
|
723 |
|
724 // Flag for indicating SatUI foreground status |
|
725 TBool iForeground; |
|
726 |
|
727 // Flag indicating previous SatUI foreground status |
|
728 TBool iPreviousForeground; |
|
729 |
|
730 // Counter for possible view activation loop |
|
731 TInt iViewLoopCounter; |
|
732 |
|
733 // Duration of tone |
|
734 TTimeIntervalMicroSeconds iDuration; |
|
735 |
|
736 // Used key value for immediate digit response |
|
737 TChar iKey; |
|
738 |
|
739 // Indicate if immediate digit response is requested |
|
740 TBool iImmediateDigitResponse; |
|
741 |
|
742 // Indication for End key case that wait note existed |
|
743 TBool iWaitNoteInUse; |
|
744 |
|
745 // Request ID for increased buffer size. |
|
746 TInt iReqWSBufferID; |
|
747 |
|
748 // Indication that warning and game tones are in use |
|
749 TBool iWarningAndPlayTones; |
|
750 |
|
751 // Not Own |
|
752 // Use to keep track of the dialog which is on the screen |
|
753 CCoeControl* iForegroundControl; |
|
754 |
|
755 // Indication that high priority event occured, used in DisplayText |
|
756 TBool iHighPriorityEvent; |
|
757 |
|
758 // Indication that immediate response TLV, used in DisplayText |
|
759 TBool iImmediateRsp; |
|
760 |
|
761 }; |
|
762 |
|
763 #endif // CSATUIVIEWAPPUI_H |
|
764 |
|
765 // End of File |