|
1 /* |
|
2 * Copyright (c) 2005 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: Definition of class FMRadioAppUi. Provides command |
|
15 * and callback interfaces to control the engine and the |
|
16 * application views. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef FMRADIOAPPUI_H |
|
22 #define FMRADIOAPPUI_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <eikapp.h> |
|
26 #include <eikdoc.h> |
|
27 #include <e32std.h> |
|
28 #include <coeccntx.h> |
|
29 #include <aknViewAppUi.h> |
|
30 #include <coecntrl.h> |
|
31 #include <aknnotedialog.h> |
|
32 #include <aknnotewrappers.h> |
|
33 #include <iaupdateobserver.h> |
|
34 |
|
35 #include "fmradioenginestatechangecallback.h" |
|
36 #include "fmradioengine.h" |
|
37 #include "fmradiodefines.h" |
|
38 #include "fmradiosvkevents.h" |
|
39 #include "fmradioglobalconfirmationquery.h" |
|
40 #include "mchannellisthandler.h" |
|
41 |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 class CAknQueryDialog; |
|
45 class CFMRadioBackSteppingServiceWrapper; |
|
46 class CFMRadioDocument; |
|
47 class CFMRadioMainContainer; |
|
48 class CFMRadioScanLocalStationsView; |
|
49 class CFMRadioChannelListView; |
|
50 class CFMRadioMainView; |
|
51 class CEikMenuPane; |
|
52 class MFMRadioLayoutChangeObserver; |
|
53 class CAlfEnv; |
|
54 class CAknVolumePopup; |
|
55 class CAknInformationNote; |
|
56 class CAknGlobalNote; |
|
57 class CIAUpdate; |
|
58 class CIAUpdateParameters; |
|
59 class CFMRadioControlEventObserverImpl; |
|
60 class CRepository; |
|
61 // CLASS DECLARATION |
|
62 |
|
63 /** |
|
64 * Interface to tell when dialog was terminated |
|
65 * |
|
66 * @since 2.6 |
|
67 */ |
|
68 class MInformationNoteInterface |
|
69 { |
|
70 public: |
|
71 |
|
72 /** |
|
73 * tells when dialog was terminated |
|
74 */ |
|
75 virtual void DialogTerminated() = 0; |
|
76 |
|
77 }; |
|
78 |
|
79 |
|
80 /** |
|
81 * Information note for headset key events. Enabling functionality to disable new dialog creation |
|
82 * when dialog is active |
|
83 * |
|
84 * @since 2.6 |
|
85 */ |
|
86 class CFMInformationNote: public CAknInformationNote |
|
87 { |
|
88 public: |
|
89 |
|
90 /** |
|
91 * default constructor. |
|
92 */ |
|
93 CFMInformationNote( MInformationNoteInterface& aObserver); |
|
94 |
|
95 /** |
|
96 * Destructor. |
|
97 */ |
|
98 virtual ~CFMInformationNote(); |
|
99 |
|
100 private: |
|
101 |
|
102 // Dialog event observer |
|
103 MInformationNoteInterface& iDialogObserver; |
|
104 |
|
105 }; |
|
106 |
|
107 |
|
108 |
|
109 /** |
|
110 * Instantiates the application views. It also acts as the default command handler for the |
|
111 * application. Part of the standard application framework. |
|
112 * |
|
113 * @since 2.6 |
|
114 */ |
|
115 |
|
116 class CFMRadioAppUi : public CAknViewAppUi, |
|
117 public MFMRadioSvkEventsObserver, |
|
118 public MCoeControlObserver, |
|
119 private MRadioEngineStateChangeCallback, |
|
120 private MFMRadioGlobalConfirmationQueryObserver, |
|
121 private MInformationNoteInterface, |
|
122 public MChannelListHandler, |
|
123 public MIAUpdateObserver |
|
124 |
|
125 { |
|
126 public: |
|
127 // Volume, seek, tune and channel changing directions |
|
128 enum TFMRadioDirections |
|
129 { |
|
130 EDirectionUp, |
|
131 EDirectionNone, |
|
132 EDirectionDown |
|
133 }; |
|
134 |
|
135 public: // Constructors and destructor |
|
136 /** |
|
137 * EPOC default constructor. |
|
138 */ |
|
139 void ConstructL(); |
|
140 /** |
|
141 * Destructor. |
|
142 */ |
|
143 virtual ~CFMRadioAppUi(); |
|
144 |
|
145 /** |
|
146 * Utility method to select the right layout resource according to |
|
147 * mirroring and orientation |
|
148 * |
|
149 * @param aNormalPortraitRes Normal portrait resource id |
|
150 * @param aMirroredPortraitRes Mirrored portrait resource id |
|
151 * @param aNormalLandscapeRes Normal landscape resource id |
|
152 * @param aMirroredLandscapeRes Mirrored landscape resource id |
|
153 * @return one of the resource id's passed to this method |
|
154 */ |
|
155 TInt ChooseLayoutResource( const TInt aNormalPortraitRes, |
|
156 const TInt aMirroredPortraitRes, |
|
157 const TInt aNormalLandscapeRes, |
|
158 const TInt aMirroredLandscapeRes ) const; |
|
159 public: // Functions from base classes |
|
160 |
|
161 /** |
|
162 * From CEikAppUi, takes care of command handling. |
|
163 * @since 2.6 |
|
164 * @param aCommand command to be handled |
|
165 */ |
|
166 void HandleCommandL( TInt aCommand ); |
|
167 |
|
168 /** |
|
169 * Notification interface from RadioEngine. Used to inform |
|
170 * us when requests have completed. |
|
171 * @since 2.6 |
|
172 * @param aEventCode code corresponding to the event being propogated |
|
173 * @param aErrorCode error code of the event being propogated |
|
174 */ |
|
175 void HandleRadioEngineCallBack( MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode, TInt aErrorCode ); |
|
176 public: // new functions |
|
177 /** |
|
178 * Returns a pointer to the radio engine |
|
179 * |
|
180 * @return Radio engine |
|
181 */ |
|
182 CRadioEngine* RadioEngine(); |
|
183 |
|
184 /** |
|
185 * Returns a reference to Back Stepping wrapper |
|
186 * |
|
187 * @return Reference to Back Stepping wrapper |
|
188 */ |
|
189 CFMRadioBackSteppingServiceWrapper& BackSteppingWrapper() const; |
|
190 |
|
191 /** |
|
192 * Returns a pointer to FMRadio's document, cannot be null. |
|
193 * |
|
194 * @return A pointer to a CFMRadioDocument object. |
|
195 */ |
|
196 CFMRadioDocument* Document() const; |
|
197 /** |
|
198 * Checks if current screen orientation is landscape |
|
199 * |
|
200 * @return ETrue if orientation is landscape, otherwise EFalse |
|
201 */ |
|
202 TBool IsLandscapeOrientation() const; |
|
203 |
|
204 /** |
|
205 * Handles offline mode at startup. |
|
206 */ |
|
207 void HandleOfflineModeAtStartUpL(); |
|
208 |
|
209 /** |
|
210 * Handles start up foreground event. |
|
211 */ |
|
212 void HandleStartupForegroundEventL(); |
|
213 /** |
|
214 * Nunber of channels stored in presets. |
|
215 * @return number of channels in presets |
|
216 */ |
|
217 TInt NumberOfChannelsStored() const; |
|
218 /** |
|
219 * Returns the UID of the currently active local view. KNullUid if none |
|
220 * active (construction/destruction). |
|
221 * @return UID of the currently active local view, KNullUid if none |
|
222 * active. |
|
223 */ |
|
224 TUid ActiveView() const; |
|
225 /** |
|
226 * Return startup scanning wizard status. |
|
227 * @return running status |
|
228 */ |
|
229 TBool IsStartupWizardRunning() const; |
|
230 /** |
|
231 * Set startup scanning wizard status. |
|
232 * @param aRunningState running state |
|
233 */ |
|
234 void SetStartupWizardRunning( const TBool aRunningState ); |
|
235 /** |
|
236 * Tune to the specified frequency |
|
237 * @since 2.6 |
|
238 * @param aFrequency the frequency to be tuned |
|
239 */ |
|
240 void TuneL(TInt aFrequency); |
|
241 /** |
|
242 * @return mirrored layout state |
|
243 */ |
|
244 TBool IsLayoutMirrored() const; |
|
245 /** |
|
246 * Show currently active volume popup control |
|
247 */ |
|
248 void ShowVolumePopupL(); |
|
249 |
|
250 /** |
|
251 * From MChannelListHandler |
|
252 * Updates channels array in appui |
|
253 * @param aOperation tells which operation is made to array |
|
254 * @param aIndex tells affecting index |
|
255 * @param aMovedToNewIndex optional during move operation |
|
256 */ |
|
257 void UpdateChannelsL( TMoveoperations aOperation, |
|
258 TInt aIndex, |
|
259 TInt aMovedToNewIndex ); |
|
260 |
|
261 /** |
|
262 * From MChannelListHandler |
|
263 * Add a new channel to list of channels |
|
264 * @param aChannelName Name of the channel to be saved |
|
265 * @param aChannelFreq Channel frequency |
|
266 */ |
|
267 void AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq ); |
|
268 |
|
269 /** |
|
270 * From MChannelListHandler |
|
271 * Accessory method to channels array |
|
272 */ |
|
273 CArrayFixFlat<TChannelInformation>* Channels(); |
|
274 |
|
275 void AutoTuneInMainView ( TBool aTune ); |
|
276 /** |
|
277 * status of the startup wizard state |
|
278 * @return wizard status |
|
279 */ |
|
280 TBool IsStartupWizardHandled() const; |
|
281 /** |
|
282 * Return the index of the first channel that matches the |
|
283 * frequency specified. |
|
284 * @since 2.6 |
|
285 * @param aFrequency The frequency to match against |
|
286 * @return the index of the channel whose frequency matched. |
|
287 * -1 if no frequency matched. |
|
288 */ |
|
289 TInt MatchingChannelL( TInt aFrequency ); |
|
290 |
|
291 /** |
|
292 * Erase a channel |
|
293 * @param aIndex index to delete |
|
294 * @return ETrue if user accepted delete, otherwise EFalse |
|
295 */ |
|
296 TBool EraseChannelL( TInt aIndex ); |
|
297 |
|
298 /* |
|
299 * Returns a pointer to the currently active volume popup control |
|
300 * @return active volume popup |
|
301 */ |
|
302 CAknVolumePopup* ActiveVolumePopup() const; |
|
303 |
|
304 protected: |
|
305 /** |
|
306 * From CEikAppUi HandleWsEventL |
|
307 */ |
|
308 void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination); |
|
309 |
|
310 /** |
|
311 * From base class CCoeAppUi |
|
312 */ |
|
313 void HandleForegroundEventL( TBool aForeground ); |
|
314 |
|
315 private: // Functions from base classes |
|
316 |
|
317 /** |
|
318 * Handles a change to the application's resources |
|
319 * @param aType The type of changed resource |
|
320 */ |
|
321 void HandleResourceChangeL( TInt aType ); |
|
322 /** |
|
323 * Updates the landscape data. This is done separately |
|
324 * and not in IsLandscapeOrientation method as |
|
325 * IsLandscapeOrientation MUST NOT do a window server flush |
|
326 */ |
|
327 void UpdateLandscapeInformation(); |
|
328 private: // new functions |
|
329 |
|
330 /** |
|
331 * All leaving function calls are made here, so that nothing is left on the stack if the ConstructL leaves |
|
332 * The reason for this behaviour is that the UI framework doesn't handle leaves from the AppUi correctly. |
|
333 */ |
|
334 void SecondaryConstructL(); |
|
335 /** |
|
336 * Perform object cleanup. This would normally be performed in the destructor, but since it can also be |
|
337 * called from SecondaryConstructL it was moved into a seperate function. |
|
338 */ |
|
339 void Cleanup(); |
|
340 /** |
|
341 * Handles callback from engine |
|
342 * @since 3.0 |
|
343 */ |
|
344 void HandleInitializedCallbackL(); |
|
345 /** |
|
346 * Updates radio volume level by one step at time. |
|
347 * @since 2.6 |
|
348 * @param aDirection Parameter is interpreted as |
|
349 * following: 1 = increase volume, 0 = no change, |
|
350 * -1 = decrease volume. |
|
351 */ |
|
352 void UpdateVolume( CFMRadioAppUi::TFMRadioDirections aDirection ); |
|
353 /** |
|
354 * Perform automatic tuning to the next available audible frequency |
|
355 * @since 2.6 |
|
356 */ |
|
357 void ScanUpL(); |
|
358 /** |
|
359 * Perform automatic tuning to the last available audible frequency |
|
360 * @since 2.6 |
|
361 */ |
|
362 void ScanDownL(); |
|
363 /** |
|
364 * Save currently tuned frequency to the currently selected channel |
|
365 * @since 2.6 |
|
366 * @param aIndex the index of the slot to save the channel to. |
|
367 */ |
|
368 void SaveChannelL( TInt aIndex ); |
|
369 /** |
|
370 * Tune the radio hardware to the frequency saved at the specified channel |
|
371 * @since 2.6 |
|
372 * @param aIndex index of channel to tune to |
|
373 */ |
|
374 void PlayChannel( TInt aIndex ); |
|
375 /** |
|
376 * Set the audio output of the radio, and update the UI |
|
377 * @since 2.6 |
|
378 * @param aAudioOutput the audio output (headset or IHF) |
|
379 */ |
|
380 void SetAudioOutput( CRadioEngine::TFMRadioAudioOutput aAudioOutput ); |
|
381 /** |
|
382 * Cancel outstanding seek request |
|
383 * @since 2.6 |
|
384 */ |
|
385 void CancelSeek(); |
|
386 /** |
|
387 * Shutdown the application. |
|
388 * @since 2.6 |
|
389 */ |
|
390 void ExitApplication(); |
|
391 /** |
|
392 * Rename the currently selected channel |
|
393 * @since 2.6 |
|
394 */ |
|
395 void RenameCurrentChannelL(); |
|
396 /** |
|
397 * Display confirmation dialog for channel deletion |
|
398 * @param aIndex the index of the channel to delete |
|
399 */ |
|
400 TBool ConfirmChannelListDeleteL( TInt aIndex ); |
|
401 /** |
|
402 * Saves channel to be last item in channels list |
|
403 * @since 2.6 |
|
404 */ |
|
405 void SaveChannelToLastIntoListL(); |
|
406 /** |
|
407 * Displays an error note with the text contained in the passed in reference |
|
408 * @since 2.6 |
|
409 * @param aErrorNote id of the text to display in the error note |
|
410 */ |
|
411 void DisplayErrorNoteL( TInt aErrorNote ); |
|
412 |
|
413 /** |
|
414 * Displays an information note with the text contained in the passed in reference |
|
415 * @since 2.6 |
|
416 * @param aInfoNote id of the text to display in the error note |
|
417 */ |
|
418 void DisplayInformationNoteL( TInt aInfoNote ); |
|
419 |
|
420 /** |
|
421 * Return the numeric key value corresponding to the key code |
|
422 * @since 2.6 |
|
423 * @param aCode the Symbian key code |
|
424 * @return the numeric key value |
|
425 */ |
|
426 TInt NumericKeyValue( TUint aCode ); |
|
427 /** |
|
428 * Turn the fm radio hardware on |
|
429 * @since 2.6 |
|
430 */ |
|
431 void TurnRadioOn(); |
|
432 /** |
|
433 * Processes "seek operation completed" callback |
|
434 * @since 2.6 |
|
435 */ |
|
436 void HandleStopSeekCallback(); |
|
437 /** |
|
438 * Processes "set mute state" callback |
|
439 * @since 2.6 |
|
440 */ |
|
441 void HandleSetMuteStateCallback(); |
|
442 /** |
|
443 * Processes "volume changed" callback |
|
444 * @since 2.6 |
|
445 */ |
|
446 void HandleVolumeChangedCallback(); |
|
447 /** |
|
448 * Processes "set audio output completed" callback |
|
449 * @since 2.6 |
|
450 */ |
|
451 void HandleAudioOutputSetCallback(); |
|
452 /** |
|
453 * Processes "headset reconnected" callback |
|
454 * @since 2.6 |
|
455 */ |
|
456 void HandleHeadsetReconnectedCallback(); |
|
457 /** |
|
458 * Processes "headset disconnected" callback |
|
459 * @since 2.6 |
|
460 */ |
|
461 void HandleHeadsetDisconnectedCallback(); |
|
462 /** |
|
463 * Processes "flightmode disabled" callback |
|
464 * @since 2.6 |
|
465 */ |
|
466 void HandleFlightmodeDisabledCallback(); |
|
467 /** |
|
468 * Processes "volume update failed" callback |
|
469 * @since 2.6 |
|
470 */ |
|
471 void HandleVolumeUpdateFailedCallback(); |
|
472 /** |
|
473 * Handles mute keypress from main view |
|
474 * |
|
475 */ |
|
476 void HandleMuteCommand(); |
|
477 /** |
|
478 * Processes "manual tune failed" callback |
|
479 * @since 2.6 |
|
480 */ |
|
481 void HandleManualTuneFailedCallback(); |
|
482 /** |
|
483 * Processes audio resource not available |
|
484 * @since 3.0 |
|
485 */ |
|
486 void HandleAudioResourceNotAvailableL(TInt aErrorCode); |
|
487 |
|
488 /** |
|
489 * Processes audio resource available |
|
490 * @since 3.0 |
|
491 */ |
|
492 void HandleAudioResourceAvailableL(); |
|
493 |
|
494 /** |
|
495 * Processes FM Transmitter on. |
|
496 * @since 3.2 |
|
497 */ |
|
498 void HandleFMTransmitterOnCallbackL(); |
|
499 |
|
500 /** |
|
501 * Processes Frequency range changed. |
|
502 * @since 3.2 |
|
503 */ |
|
504 void HandleFreqRangeChangedCallback(); |
|
505 |
|
506 /** |
|
507 * Processes Frequency range changed. |
|
508 * @since 3.2 |
|
509 */ |
|
510 void HandleFlightModeEnabledCallbackL(); |
|
511 |
|
512 /** |
|
513 * Handle flight mode disabled. |
|
514 * @since 3.2 |
|
515 */ |
|
516 void HandleFlightModeDisabledCallback(); |
|
517 |
|
518 /** |
|
519 * Processes Frequency range changed. |
|
520 * @since 3.2 |
|
521 */ |
|
522 void HandleTunerReadyCallback(); |
|
523 |
|
524 /** |
|
525 * Get region automatically from network or manually by user choice if network |
|
526 * is not available |
|
527 */ |
|
528 TFMRadioRegionSetting HandleRegionsAtStartUpL(); |
|
529 |
|
530 /** |
|
531 * Request tuner control from engine |
|
532 */ |
|
533 void RequestTunerControl() const; |
|
534 |
|
535 /** |
|
536 * Is offline profile activated when radio audio was disabled. |
|
537 * @return ETrue, if offline profile activated when radio |
|
538 * audio was disabled. EFalse otherwise. |
|
539 */ |
|
540 TBool IsOfflineProfileActivatedWhenRadioAudioDisabled() const; |
|
541 |
|
542 /** |
|
543 * Sets the toolbar visibility. |
|
544 * @param aVisible |
|
545 */ |
|
546 void ShowToolbar( TBool aVisible ); |
|
547 |
|
548 /** |
|
549 * Determine if scan all local stations view should be started |
|
550 * in wizard mode |
|
551 */ |
|
552 void HandleStartupWizardL(); |
|
553 |
|
554 /** |
|
555 * Start local stations scan |
|
556 */ |
|
557 void StartLocalStationsSeekL(); |
|
558 |
|
559 /** |
|
560 * Tries to start radio again if the situation allows it |
|
561 */ |
|
562 void TryToResumeAudioL(); |
|
563 /** |
|
564 * Fade and show exit on all views |
|
565 */ |
|
566 void FadeViewsAndShowExit( TBool aState ); |
|
567 |
|
568 /* |
|
569 * Show connect headset query with only exit softkey |
|
570 */ |
|
571 void ShowConnectHeadsetDialogL(); |
|
572 |
|
573 /* |
|
574 * Get help context based on active view |
|
575 * @return array containing help context for active view |
|
576 */ |
|
577 CArrayFix<TCoeHelpContext>* GetCurrentHelpContextL() const; |
|
578 |
|
579 /** |
|
580 * A call back function for processing start up foreground event. |
|
581 * |
|
582 * @param aSelfPtr Pointer to self. |
|
583 * @return Always 0. |
|
584 */ |
|
585 static TInt StaticStartupForegroundCallback( TAny* aSelfPtr ); |
|
586 |
|
587 private: |
|
588 |
|
589 /** |
|
590 * Called when volume level should be changed. |
|
591 * Set volume control visible. |
|
592 * @param aVolumeChange: +1 change volume up |
|
593 * -1 change volume down |
|
594 */ |
|
595 void FMRadioSvkChangeVolumeL( TInt aVolumeChange ); |
|
596 |
|
597 /** |
|
598 * Called when volume was changed last time 2 seconds ago or |
|
599 * timer was started 2 seconds ago. The remove control timer |
|
600 * is started when ChangeVolumeL() is called |
|
601 * or when started through CMmsSvkEvents::StartRemoveTimerL() |
|
602 */ |
|
603 void FMRadioSvkRemoveVolumeL( ); |
|
604 |
|
605 void FMRadioHeadsetEvent(TAccessoryEvent aEvent); |
|
606 |
|
607 /** |
|
608 * From MFMRadioGlobalConfirmationQueryObserver |
|
609 * |
|
610 * @see MFMRadioGlobalConfirmationQueryObserver::GlobalConfirmationQueryDismissedL(TInt aSoftKey) |
|
611 */ |
|
612 void GlobalConfirmationQueryDismissedL( TInt aSoftKey ); |
|
613 |
|
614 /** |
|
615 *From MCoeControlObserver. To handle the volume events. |
|
616 */ |
|
617 void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ); |
|
618 |
|
619 /** |
|
620 * From MInformationNoteInterface. To handle dialog terminated events. |
|
621 */ |
|
622 void DialogTerminated(); |
|
623 |
|
624 /** |
|
625 * Gets the Channels array |
|
626 */ |
|
627 void GetChannelsArrayL(); |
|
628 /** |
|
629 * Check available IAD updates |
|
630 */ |
|
631 void HandleIADUpdateCheckL(); |
|
632 // from base class MIAUpdateObserver |
|
633 void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates ); |
|
634 void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails ); |
|
635 void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow ); |
|
636 |
|
637 /** |
|
638 * Processes the tail of the command |
|
639 * @param aTail The tail to be processed |
|
640 */ |
|
641 void ProcessCommandTailL( const TDesC8& aTail ); |
|
642 |
|
643 // from base class CEikAppUi |
|
644 MCoeMessageObserver::TMessageResponse HandleMessageL( |
|
645 TUint32 aClientHandleOfTargetWindowGroup, |
|
646 TUid aMessageUid, |
|
647 const TDesC8& aMessageParameters ); |
|
648 |
|
649 TBool ProcessCommandParametersL( TApaCommand aCommand, |
|
650 TFileName& aDocumentName, |
|
651 const TDesC8& aTail ); |
|
652 |
|
653 /** |
|
654 * Check if Active Idle app is on foreground. |
|
655 * |
|
656 * @return ETrue if idle app is in the foreground, EFalse otherwise. |
|
657 */ |
|
658 TBool IsIdleAppForeground(); |
|
659 |
|
660 /** |
|
661 * Check if Active Idle is enabled. |
|
662 * |
|
663 * @return ETrue if active idle is in the enabled, EFalse otherwise. |
|
664 */ |
|
665 TBool IsActiveIdleEnabled(); |
|
666 |
|
667 /** |
|
668 * Handles the possibly pending view activation |
|
669 */ |
|
670 void HandlePendingViewActivationL(); |
|
671 |
|
672 private: |
|
673 |
|
674 enum TInterfaceState |
|
675 { |
|
676 EFMRadioStateOff = 0, // Radio off |
|
677 EFMRadioStateOffForPhoneCall, // Radio off because a phone call |
|
678 EFMRadioStateOffBeforePhoneCall,// Radio was off + phone call going on -> no resume |
|
679 EFMRadioStateOn, |
|
680 EFMRadioStateRecording, |
|
681 EFMRadioStateBusyRadioOn, |
|
682 EFMRadioStateBusyRadioOff, |
|
683 EFMRadioStateBusyScanUp, |
|
684 EFMRadioStateBusyScanDown, |
|
685 EFMRadioStateBusySeek, |
|
686 EFMRadioStateBusyMute, |
|
687 EFMRadioStateBusyVolume, |
|
688 EFMRadioStateBusyManualTune, |
|
689 EFMRadioStateBusyScanLocalStations, |
|
690 EFMRadioStateExiting |
|
691 }; |
|
692 |
|
693 /** |
|
694 * State to indicate the mute status |
|
695 */ |
|
696 enum TFMMuteStatus |
|
697 { |
|
698 EFMUninitialized = 0, // Uninitialized value |
|
699 EFMUnmuted, // Unmute state |
|
700 EFMMuted // Mute state |
|
701 }; |
|
702 |
|
703 // System's volume indicator |
|
704 CAknVolumePopup* iIhfVolumePopupControl; |
|
705 CAknVolumePopup* iHeadsetVolumePopupControl; |
|
706 CAknVolumePopup* iActiveVolumePopupControl; |
|
707 |
|
708 CRadioEngine* iRadioEngine; |
|
709 TInt iCurrentRadioState; |
|
710 CFMRadioScanLocalStationsView* iScanLocalStationsView; |
|
711 CFMRadioChannelListView* iChannelListView; |
|
712 CFMRadioMainView* iMainView; |
|
713 //all the possible radio UI states |
|
714 TInt iFMRadioVariationFlags; |
|
715 CFMRadioSvkEvents* iSvkEvents; |
|
716 TBool iAlreadyClean; |
|
717 MFMRadioLayoutChangeObserver* iLayoutChangeObserver; |
|
718 CFMRadioControlEventObserverImpl* iControlEventObserver; |
|
719 /** |
|
720 * Is audio resources available |
|
721 */ |
|
722 TBool iAudioResourceAvailable; |
|
723 |
|
724 /** |
|
725 * Was audio lost "permanently" due to another music playing application? |
|
726 */ |
|
727 TBool iAudioLost; |
|
728 |
|
729 /** |
|
730 * Global offline query. Owned |
|
731 */ |
|
732 CFMRadioGlobalConfirmationQuery* iGlobalOfflineQuery; |
|
733 |
|
734 /** |
|
735 * Local activate offline query. Owned |
|
736 */ |
|
737 CAknQueryDialog* iLocalActivateOfflineQuery; |
|
738 |
|
739 /** |
|
740 * Local continue offline query. Owned |
|
741 */ |
|
742 CAknQueryDialog* iLocalContinueOfflineQuery; |
|
743 |
|
744 /** |
|
745 * Is offline profile activated when radio audio was disabled. |
|
746 */ |
|
747 TBool iOfflineProfileActivatedWhenRadioAudioDisabled; |
|
748 |
|
749 /** |
|
750 * Is the local "continue in offline" query visible. |
|
751 */ |
|
752 TBool iShowingLocalOfflineContinueQuery; |
|
753 |
|
754 /** |
|
755 * Is the local or global offline query activated. |
|
756 */ |
|
757 TBool iOfflineQueryDialogActivated; |
|
758 |
|
759 /** |
|
760 * Is the start up of application ongoing. |
|
761 */ |
|
762 TBool iStartUp; |
|
763 |
|
764 /** |
|
765 * Is the screen orientation landscape |
|
766 */ |
|
767 TBool iLandscape; |
|
768 CAlfEnv* iAlfEnv; // Owned |
|
769 // flag to indicate wizard handling |
|
770 TBool iStartupWizardHandled; |
|
771 // flag for startup wizard status |
|
772 TBool iStartupWizardRunning; |
|
773 // connect headset query |
|
774 CAknQueryDialog* iConnectHeadsetQuery; |
|
775 // flag to indicate if automatic tune is activated from startup wizard |
|
776 TBool iTuneFromWizardActivated; |
|
777 // akn information note ptr to check that dialog has dismissed from display |
|
778 TBool iInfoNoteOn; |
|
779 // global note for headset status when radio is background |
|
780 CAknGlobalNote* iConnectHeadsetGlobalNote; |
|
781 // flag for previous mute status |
|
782 TFMMuteStatus iMuteStatusBeforeRadioInit; |
|
783 // Channels list |
|
784 CArrayFixFlat<TChannelInformation>* iChannels; |
|
785 // IAD client object. Owned. |
|
786 CIAUpdate* iUpdate; |
|
787 // Parameters for IAD update. Owned. |
|
788 CIAUpdateParameters* iParameters; |
|
789 TBool iAutoTune; |
|
790 TBool iAutoTuneUnmute; |
|
791 // The backstepping wrapper. Owned. |
|
792 CFMRadioBackSteppingServiceWrapper* iBsWrapper; |
|
793 // Is feature manager initialized, used for uninitializing feature manager |
|
794 TBool iFeatureManagerInitialized; |
|
795 // own, for active idle setting |
|
796 CRepository* iSettingsRepository; |
|
797 // Callback for processing start up foreground event. |
|
798 CAsyncCallBack* iStartupForegroundCallback; |
|
799 // The view id of the view that is to be activated when possible |
|
800 TUid iPendingViewId; |
|
801 }; |
|
802 |
|
803 #endif |
|
804 |
|
805 // End of File |