fmradio/fmradio/inc/fmradioappui.h
branchRCL_3
changeset 6 3cb097cb90f8
parent 5 108d9820af01
child 13 4f2584af5a29
equal deleted inserted replaced
5:108d9820af01 6:3cb097cb90f8
    14 * Description:  Definition of class FMRadioAppUi. Provides command
    14 * Description:  Definition of class FMRadioAppUi. Provides command
    15 *                      and callback interfaces to control the engine and the
    15 *                      and callback interfaces to control the engine and the
    16 *                     application views.
    16 *                     application views.
    17 *
    17 *
    18 */
    18 */
    19 
       
    20 
    19 
    21 #ifndef FMRADIOAPPUI_H
    20 #ifndef FMRADIOAPPUI_H
    22 #define FMRADIOAPPUI_H
    21 #define FMRADIOAPPUI_H
    23 
    22 
    24 // INCLUDES
    23 // INCLUDES
    64 * Interface to tell when dialog was terminated
    63 * Interface to tell when dialog was terminated
    65 *
    64 *
    66 *    @since 2.6
    65 *    @since 2.6
    67 */
    66 */
    68 class MInformationNoteInterface
    67 class MInformationNoteInterface
    69 	{
    68     {
    70 	public:
    69     public:
    71 		
    70         /**
    72 		/**
       
    73         * tells when dialog was terminated
    71         * tells when dialog was terminated
    74         */
    72         */
    75 		virtual void DialogTerminated() = 0;
    73         virtual void DialogTerminated() = 0;
    76 	
    74     };
    77 	};
    75 
    78 	
       
    79 	
       
    80 /**
    76 /**
    81 * Information note for headset key events. Enabling functionality to disable new dialog creation 
    77 * Information note for headset key events. Enabling functionality to disable new dialog creation 
    82 * when dialog is active
    78 * when dialog is active
    83 *
    79 *
    84 *    @since 2.6
    80 *    @since 2.6
    85 */
    81 */
    86 class CFMInformationNote: public CAknInformationNote
    82 class CFMInformationNote: public CAknInformationNote
    87 	{
    83     {
    88 	public:
    84     public:
    89 	
    85     
    90 		/**
    86         /**
    91         * default constructor.
    87         * default constructor.
    92         */
    88         */
    93 		CFMInformationNote( MInformationNoteInterface& aObserver);
    89         CFMInformationNote( MInformationNoteInterface& aObserver);
    94 		
    90         
    95 		/**
    91         /**
    96         * Destructor.
    92         * Destructor.
    97         */
    93         */
    98 		virtual ~CFMInformationNote();
    94         virtual ~CFMInformationNote();
    99 		
    95         
   100 	private:
    96     private:
   101 		
    97         
   102 		// Dialog event observer
    98         // Dialog event observer
   103 		MInformationNoteInterface& iDialogObserver;
    99         MInformationNoteInterface& iDialogObserver;
   104 	
   100     
   105 	};
   101     };
   106 
       
   107  
       
   108 
   102 
   109 /**
   103 /**
   110 * Instantiates the application views. It also acts as the default command handler for the
   104 * Instantiates the application views. It also acts as the default command handler for the
   111 *  application. Part of the standard application framework.
   105 *  application. Part of the standard application framework.
   112 *
   106 *
   129             {
   123             {
   130             EDirectionUp,
   124             EDirectionUp,
   131             EDirectionNone,
   125             EDirectionNone,
   132             EDirectionDown
   126             EDirectionDown
   133             };
   127             };
       
   128         
       
   129         enum TRadioState
       
   130             {
       
   131             EFMRadioStateOff = 0,            // Radio off
       
   132             EFMRadioStateOffForPhoneCall,    // Radio off because a phone call
       
   133             EFMRadioStateOffBeforePhoneCall, // Radio was off + phone call going on -> no resume
       
   134             EFMRadioStateOn,
       
   135             EFMRadioStateRecording,
       
   136             EFMRadioStateBusyRadioOn,
       
   137             EFMRadioStateBusyRadioOff,
       
   138             EFMRadioStateBusySeek,
       
   139             EFMRadioStateBusyMute,
       
   140             EFMRadioStateBusyVolume,
       
   141             EFMRadioStateBusyManualTune,
       
   142             EFMRadioStateBusyScanLocalStations,
       
   143             EFMRadioStateExiting
       
   144             };
   134 
   145 
   135     public: // Constructors and destructor
   146     public: // Constructors and destructor
   136         /**
   147         /**
   137         * EPOC default constructor.
   148         * EPOC default constructor.
   138         */
   149         */
   139         void ConstructL();
   150         void ConstructL();
       
   151         
       
   152         /**
       
   153          * C++ default constructor.
       
   154          */
       
   155         CFMRadioAppUi();
       
   156         
   140         /**
   157         /**
   141         * Destructor.
   158         * Destructor.
   142         */
   159         */
   143         virtual ~CFMRadioAppUi();
   160         virtual ~CFMRadioAppUi();
   144 
   161 
   162         * From CEikAppUi, takes care of command handling.
   179         * From CEikAppUi, takes care of command handling.
   163         * @since 2.6
   180         * @since 2.6
   164         * @param aCommand command to be handled
   181         * @param aCommand command to be handled
   165         */
   182         */
   166         void HandleCommandL( TInt aCommand );
   183         void HandleCommandL( TInt aCommand );
   167         
   184 
   168         /**
   185         /**
   169         * Notification interface from RadioEngine. Used to inform
   186         * Notification interface from RadioEngine. Used to inform
   170         * us when requests have completed.
   187         * us when requests have completed.
   171         * @since 2.6
   188         * @since 2.6
   172         * @param aEventCode code corresponding to the event being propogated
   189         * @param aEventCode code corresponding to the event being propogated
   173         * @param aErrorCode error code of the event being propogated
   190         * @param aErrorCode error code of the event being propogated
   174         */
   191         */
   175         void HandleRadioEngineCallBack( MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode, TInt aErrorCode );
   192         void HandleRadioEngineCallBack( MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode, TInt aErrorCode );
   176     public: // new functions 
   193     public: // new functions 
   177     	/**
   194         /**
   178 		* Returns a pointer to the radio engine
   195         * Returns a pointer to the radio engine
   179 	    *
   196         *
   180 	    * @return Radio engine
   197         * @return Radio engine
   181 		*/
   198         */
   182     	CRadioEngine* RadioEngine();
   199         CRadioEngine* RadioEngine();
   183     	
   200 
   184         /**
   201         /**
   185          * Returns a reference to Back Stepping wrapper
   202          * Returns a reference to Back Stepping wrapper
   186          * 
   203          * 
   187          * @return Reference to Back Stepping wrapper
   204          * @return Reference to Back Stepping wrapper
   188          */
   205          */
   189         CFMRadioBackSteppingServiceWrapper& BackSteppingWrapper() const;
   206         CFMRadioBackSteppingServiceWrapper& BackSteppingWrapper() const;
   190     	
   207 
   191     	/**
   208         /**
   192 	     * Returns a pointer to FMRadio's document, cannot be null.
   209          * Returns a pointer to FMRadio's document, cannot be null.
   193 	     *
   210          *
   194 	     * @return A pointer to a CFMRadioDocument object.
   211          * @return A pointer to a CFMRadioDocument object.
   195 	     */
   212          */
   196     	CFMRadioDocument* Document() const;
   213         CFMRadioDocument* Document() const;
   197         /**
   214         /**
   198 		* Checks if current screen orientation is landscape
   215         * Checks if current screen orientation is landscape
   199 	    *
   216         *
   200 	    * @return ETrue if orientation is landscape, otherwise EFalse
   217         * @return ETrue if orientation is landscape, otherwise EFalse
   201 		*/
   218         */
   202 		TBool IsLandscapeOrientation() const;
   219         TBool IsLandscapeOrientation() const;
   203 		
   220 
   204     	/**
   221         /**
   205      	* Handles offline mode at startup.
   222         * Handles offline mode at startup.
   206      	*/
   223         */
   207      	void HandleOfflineModeAtStartUpL();
   224         void HandleOfflineModeAtStartUpL();
   208      	
   225 
   209         /**
   226         /**
   210         * Handles start up foreground event.
   227         * Handles start up foreground event.
   211         */		
   228         */		
   212         void HandleStartupForegroundEventL();
   229         void HandleStartupForegroundEventL();
   213         /**
   230         /**
   214         * Nunber of channels stored in presets.
   231         * Nunber of channels stored in presets.
   215         * @return number of channels in presets
   232         * @return number of channels in presets
   216         */ 
   233         */ 
   217         TInt NumberOfChannelsStored() const;           
   234         TInt NumberOfChannelsStored() const;
   218         /**
   235         /**
   219     	 * Returns the UID of the currently active local view. KNullUid if none 
   236         * Returns the UID of the currently active local view. KNullUid if none 
   220     	 * active (construction/destruction).
   237         * active (construction/destruction).
   221     	 * @return UID of the currently active local view, KNullUid if none 
   238         * @return UID of the currently active local view, KNullUid if none 
   222     	 * active.
   239         * active.
   223     	 */
   240         */
   224     	TUid ActiveView() const;
   241         TUid ActiveView() const;
   225     	/**
   242         /**
   226     	* Return startup scanning wizard status.
   243         * Return startup scanning wizard status.
   227     	* @return running status
   244         * @return running status
   228     	*/
   245         */
   229     	TBool IsStartupWizardRunning() const;
   246         TBool IsStartupWizardRunning() const;
   230     	/**
   247         /**
   231     	* Set startup scanning wizard status.
   248         * Set startup scanning wizard status.
   232     	* @param aRunningState running state
   249         * @param aRunningState running state
   233     	*/
   250         */
   234     	void SetStartupWizardRunning( const TBool aRunningState );
   251         void SetStartupWizardRunning( const TBool aRunningState );
   235     	/**
   252         /**
   236         * Tune to the specified frequency
   253         * Tune to the specified frequency
   237         * @since 2.6
   254         * @since 2.6
   238         * @param aFrequency the frequency to be tuned
   255         * @param aFrequency the frequency to be tuned
   239         */
   256         */
   240         void TuneL(TInt aFrequency);
   257         void TuneL(TInt aFrequency);
   241         /**        
   258         /**        
   242         * @return mirrored layout state
   259         * @return mirrored layout state
   243         */
   260         */
   244         TBool IsLayoutMirrored() const;
   261         TBool IsLayoutMirrored() const;
   245 		/**
   262         /**
   246 		* Show currently active volume popup control
   263         * Show currently active volume popup control
   247 		*/
   264         */
   248 		void ShowVolumePopupL();
   265         void ShowVolumePopupL();
   249 
   266 
   250 		/**
   267         /**
   251 		 * From MChannelListHandler 
   268          * From MChannelListHandler 
   252 		 * Updates channels array in appui 
   269          * Updates channels array in appui 
   253 		 * @param aOperation tells which operation is made to array
   270          * @param aOperation tells which operation is made to array
   254 		 * @param aIndex tells affecting index
   271          * @param aIndex tells affecting index
   255 		 * @param aMovedToNewIndex optional during move operation
   272          * @param aMovedToNewIndex optional during move operation
   256 		 */	
   273          */
   257 		void UpdateChannelsL( TMoveoperations aOperation, 
   274         void UpdateChannelsL( TMoveoperations aOperation, 
   258 				TInt aIndex, 
   275                 TInt aIndex, 
   259 				TInt aMovedToNewIndex  );
   276                 TInt aMovedToNewIndex  );
   260 		
   277 
   261 		/**
   278         /**
   262 		 * From MChannelListHandler
   279          * From MChannelListHandler
   263 		 * Add a new channel to list of channels
   280          * Add a new channel to list of channels
   264 		 * @param aChannelName Name of the channel to be saved
   281          * @param aChannelName Name of the channel to be saved
   265 		 * @param aChannelFreq Channel frequency
   282          * @param aChannelFreq Channel frequency
   266 		 */	
   283          */
   267 		void AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq );
   284         void AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq );
   268 		
   285 
   269 		/**
   286         /**
   270 		 * From MChannelListHandler
   287          * From MChannelListHandler
   271 		 * Accessory method to channels array
   288          * Accessory method to channels array
   272 		 */
   289          */
   273 		CArrayFixFlat<TChannelInformation>* Channels();
   290          RPointerArray<CFMRadioPreset>& Channels();
   274 		
   291 
   275 		void AutoTuneInMainView ( TBool aTune );
   292         void AutoTuneInMainView ( TBool aTune );
   276         /**
   293         /**
   277          * status of the startup wizard state
   294          * status of the startup wizard state
   278          * @return wizard status
   295          * @return wizard status
   279          */
   296          */
   280         TBool IsStartupWizardHandled() const;
   297         TBool IsStartupWizardHandled() const;
   298         /*
   315         /*
   299          * Returns a pointer to the currently active volume popup control
   316          * Returns a pointer to the currently active volume popup control
   300          * @return active volume popup
   317          * @return active volume popup
   301          */
   318          */
   302         CAknVolumePopup* ActiveVolumePopup() const;
   319         CAknVolumePopup* ActiveVolumePopup() const;
       
   320         
       
   321         /*
       
   322          * Get current radio state.
       
   323 		 * @return TRadioState state of the radio
       
   324          */
       
   325         CFMRadioAppUi::TRadioState CFMRadioAppUi::RadioState() const;
   303 
   326 
   304     protected:
   327     protected:
   305         /**
   328         /**
   306         * From CEikAppUi HandleWsEventL
   329         * From CEikAppUi HandleWsEventL
   307         */
   330         */
   308         void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
   331         void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
   309         
   332 
   310         /**
   333         /**
   311         * From base class CCoeAppUi    
   334         * From base class CCoeAppUi    
   312     	*/
   335         */
   313     	void HandleForegroundEventL( TBool aForeground );
   336         void HandleForegroundEventL( TBool aForeground );
   314     	
   337 
   315     private: // Functions from base classes
   338     private: // Functions from base classes
   316 
       
   317         /**
   339         /**
   318         * Handles a change to the application's resources
   340         * Handles a change to the application's resources
   319         * @param aType The type of changed resource
   341         * @param aType The type of changed resource
   320         */
   342         */
   321         void HandleResourceChangeL( TInt aType );
   343         void HandleResourceChangeL( TInt aType );
   322         /**
   344         /**
   323 		* Updates the landscape data. This is done separately 
   345         * Updates the landscape data. This is done separately 
   324 		* and not in IsLandscapeOrientation method as
   346         * and not in IsLandscapeOrientation method as
   325 		* IsLandscapeOrientation MUST NOT do a window server flush
   347         * IsLandscapeOrientation MUST NOT do a window server flush
   326 		*/
   348         */
   327 		void UpdateLandscapeInformation();
   349         void UpdateLandscapeInformation();
   328      private: // new functions
   350      private: // new functions
   329 
   351 
   330         /**
   352         /**
   331         * All leaving function calls are made here, so that nothing is left on the stack if the ConstructL leaves
   353         * 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.
   354         * The reason for this behaviour is that the UI framework doesn't handle leaves from the AppUi correctly.
   407         * Displays an error note with the text contained in the passed in reference
   429         * Displays an error note with the text contained in the passed in reference
   408         * @since 2.6
   430         * @since 2.6
   409         * @param aErrorNote id of the text to display in the error note
   431         * @param aErrorNote id of the text to display in the error note
   410         */
   432         */
   411         void DisplayErrorNoteL( TInt aErrorNote );
   433         void DisplayErrorNoteL( TInt aErrorNote );
   412         
   434 
   413         /**
   435         /**
   414         * Displays an information note with the text contained in the passed in reference
   436         * Displays an information note with the text contained in the passed in reference
   415         * @since 2.6
   437         * @since 2.6
   416         * @param aInfoNote id of the text to display in the error note
   438         * @param aInfoNote id of the text to display in the error note
   417         */
   439         */
   418         void DisplayInformationNoteL( TInt aInfoNote );
   440         void DisplayInformationNoteL( TInt aInfoNote );
   419         
   441 
   420         /**
   442         /**
   421         * Return the numeric key value corresponding to the key code
   443         * Return the numeric key value corresponding to the key code
   422         * @since 2.6
   444         * @since 2.6
   423         * @param aCode the Symbian key code
   445         * @param aCode the Symbian key code
   424         * @return the numeric key value
   446         * @return the numeric key value
   466         void HandleFlightmodeDisabledCallback();
   488         void HandleFlightmodeDisabledCallback();
   467         /**
   489         /**
   468         * Processes "volume update failed" callback
   490         * Processes "volume update failed" callback
   469         * @since 2.6
   491         * @since 2.6
   470         */
   492         */
   471         void HandleVolumeUpdateFailedCallback();                
   493         void HandleVolumeUpdateFailedCallback();
   472         /**
   494         /**
   473         * Handles mute keypress from main view
   495         * Handles mute keypress from main view
   474         * 
   496         * 
   475         */
   497         */
   476         void HandleMuteCommand();
   498         void HandleMuteCommand();
   527         */
   549         */
   528         TFMRadioRegionSetting HandleRegionsAtStartUpL();
   550         TFMRadioRegionSetting HandleRegionsAtStartUpL();
   529         
   551         
   530         /**
   552         /**
   531         * Request tuner control from engine
   553         * Request tuner control from engine
   532         */        
   554         */
   533         void RequestTunerControl() const;
   555         void RequestTunerControl() const;
   534         
   556 
   535         /**
   557         /**
   536         * Is offline profile activated when radio audio was disabled.
   558         * Is offline profile activated when radio audio was disabled.
   537         * @return ETrue, if offline profile activated when radio 
   559         * @return ETrue, if offline profile activated when radio 
   538         *         audio was disabled. EFalse otherwise.
   560         * audio was disabled. EFalse otherwise.
   539         */
   561         */
   540         TBool IsOfflineProfileActivatedWhenRadioAudioDisabled() const;        
   562         TBool IsOfflineProfileActivatedWhenRadioAudioDisabled() const;
   541 
   563 
   542         /**
   564         /**
   543         * Sets the toolbar visibility.
   565         * Sets the toolbar visibility.
   544         * @param aVisible 
   566         * @param aVisible 
   545         */ 
   567         */ 
   579         /**
   601         /**
   580         * A call back function for processing start up foreground event. 
   602         * A call back function for processing start up foreground event. 
   581         *
   603         *
   582         * @param aSelfPtr  Pointer to self.
   604         * @param aSelfPtr  Pointer to self.
   583         * @return Always 0.
   605         * @return Always 0.
   584         */        
   606         */
   585         static TInt StaticStartupForegroundCallback( TAny* aSelfPtr );     
   607         static TInt StaticStartupForegroundCallback( TAny* aSelfPtr );
   586         
       
   587     private:
   608     private:
   588 
       
   589         /**
   609         /**
   590         * Called when volume level should be changed.
   610         * Called when volume level should be changed.
   591         * Set volume control visible.
   611         * Set volume control visible.
   592         * @param aVolumeChange: +1 change volume up
   612         * @param aVolumeChange: +1 change volume up
   593         *                       -1 change volume down
   613         *                       -1 change volume down
   594         */
   614         */
   595         void FMRadioSvkChangeVolumeL( TInt aVolumeChange );
   615         void FMRadioSvkChangeVolumeL( TInt aVolumeChange );
   596 
       
   597         /**
   616         /**
   598         * Called when volume was changed last time 2 seconds ago or
   617         * Called when volume was changed last time 2 seconds ago or
   599         * timer was started 2 seconds ago. The remove control timer
   618         * timer was started 2 seconds ago. The remove control timer
   600         * is started when ChangeVolumeL() is called
   619         * is started when ChangeVolumeL() is called
   601         * or when started through CMmsSvkEvents::StartRemoveTimerL()
   620         * or when started through CMmsSvkEvents::StartRemoveTimerL()
   602         */
   621         */
   603         void FMRadioSvkRemoveVolumeL( );
   622         void FMRadioSvkRemoveVolumeL( );
   604 
       
   605         void FMRadioHeadsetEvent(TAccessoryEvent aEvent);
   623         void FMRadioHeadsetEvent(TAccessoryEvent aEvent);
   606         
       
   607         /**
   624         /**
   608          * From MFMRadioGlobalConfirmationQueryObserver
   625          * From MFMRadioGlobalConfirmationQueryObserver
   609          * 
   626          * 
   610          * @see MFMRadioGlobalConfirmationQueryObserver::GlobalConfirmationQueryDismissedL(TInt aSoftKey)
   627          * @see MFMRadioGlobalConfirmationQueryObserver::GlobalConfirmationQueryDismissedL(TInt aSoftKey)
   611          */
   628          */
   612         void GlobalConfirmationQueryDismissedL( TInt aSoftKey );
   629         void GlobalConfirmationQueryDismissedL( TInt aSoftKey );
   613         
       
   614         /**
   630         /**
   615         *From MCoeControlObserver. To handle the volume events.
   631         *From MCoeControlObserver. To handle the volume events.
   616         */
   632         */
   617         void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
   633         void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
   618         
       
   619         /**
   634         /**
   620         * From MInformationNoteInterface. To handle dialog terminated events.
   635         * From MInformationNoteInterface. To handle dialog terminated events.
   621         */
   636         */
   622         void DialogTerminated();
   637         void DialogTerminated();
   623         
       
   624         /**
   638         /**
   625         * Gets the Channels array
   639         * Gets the Channels array
   626         */
   640         */
   627         void GetChannelsArrayL();
   641         void GetChannelsArrayL();
   628 		/**
   642         /**
   629 		* Check available IAD updates
   643         * Check available IAD updates
   630 		*/
   644         */
   631 		void HandleIADUpdateCheckL();
   645         void HandleIADUpdateCheckL();
   632 		// from base class MIAUpdateObserver
   646         // from base class MIAUpdateObserver
   633     	void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates );
   647         void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates );
   634     	void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails );
   648         void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails );
   635     	void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow );
   649         void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow );
   636         
   650 
   637     	/**
   651         /**
   638     	 * Processes the tail of the command
   652          * Processes the tail of the command
   639     	 * @param aTail The tail to be processed
   653          * @param aTail The tail to be processed
   640     	 */
   654          */
   641     	void ProcessCommandTailL( const TDesC8& aTail );
   655         void ProcessCommandTailL( const TDesC8& aTail );
   642     	
   656 
   643         // from base class CEikAppUi	
   657         // from base class CEikAppUi	
   644         MCoeMessageObserver::TMessageResponse HandleMessageL(
   658         MCoeMessageObserver::TMessageResponse HandleMessageL(
   645             TUint32 aClientHandleOfTargetWindowGroup, 
   659             TUint32 aClientHandleOfTargetWindowGroup, 
   646             TUid aMessageUid, 
   660             TUid aMessageUid, 
   647             const TDesC8& aMessageParameters );
   661             const TDesC8& aMessageParameters );
   648 
   662 
   649         TBool ProcessCommandParametersL( TApaCommand aCommand, 
   663         TBool ProcessCommandParametersL( TApaCommand aCommand, 
   650                                          TFileName& aDocumentName, 
   664                                          TFileName& aDocumentName, 
   651                                          const TDesC8& aTail );
   665                                          const TDesC8& aTail );
   652 	    
   666 
   653         /**
   667         /**
   654         * Check if Active Idle app is on foreground.
   668         * Check if Active Idle app is on foreground.
   655         *
   669         *
   656         * @return ETrue if idle app is in the foreground, EFalse otherwise.
   670         * @return ETrue if idle app is in the foreground, EFalse otherwise.
   657         */	
   671         */
   658         TBool IsIdleAppForeground();
   672         TBool IsIdleAppForeground();
   659 	
   673 
   660         /**
   674         /**
   661         * Check if Active Idle is enabled.
   675         * Check if Active Idle is enabled.
   662         *
   676         *
   663         * @return ETrue if active idle is in the enabled, EFalse otherwise.
   677         * @return ETrue if active idle is in the enabled, EFalse otherwise.
   664         */
   678         */
   666 
   680 
   667         /**
   681         /**
   668          * Handles the possibly pending view activation 
   682          * Handles the possibly pending view activation 
   669          */
   683          */
   670         void HandlePendingViewActivationL();
   684         void HandlePendingViewActivationL();
   671         
   685 
   672     private:
   686     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             
   687             
   693         /**
   688         /**
   694          * State to indicate the mute status
   689          * State to indicate the mute status
   695          */
   690          */
   696         enum TFMMuteStatus
   691         enum TFMMuteStatus
   697             {
   692             {
   698             EFMUninitialized = 0,       // Uninitialized value
   693             EFMUninitialized = 0,       // Uninitialized value
   699             EFMUnmuted,                 // Unmute state
   694             EFMUnmuted,                 // Unmute state
   700             EFMMuted                    // Mute state
   695             EFMMuted                    // Mute state
   701             };
   696             };
   702         
   697 
   703         // System's volume indicator
   698         // System's volume indicator
   704         CAknVolumePopup* iIhfVolumePopupControl;
   699         CAknVolumePopup* iIhfVolumePopupControl;
   705         CAknVolumePopup* iHeadsetVolumePopupControl;
   700         CAknVolumePopup* iHeadsetVolumePopupControl;
   706         CAknVolumePopup* iActiveVolumePopupControl;
   701         CAknVolumePopup* iActiveVolumePopupControl;
   707                         
   702                         
   708         CRadioEngine*   iRadioEngine;
   703         CRadioEngine*   iRadioEngine;
   709         TInt iCurrentRadioState;
   704         TRadioState iCurrentRadioState;
   710         CFMRadioScanLocalStationsView* iScanLocalStationsView;
   705         CFMRadioScanLocalStationsView* iScanLocalStationsView;
   711         CFMRadioChannelListView* iChannelListView;
   706         CFMRadioChannelListView* iChannelListView;
   712         CFMRadioMainView* iMainView;
   707         CFMRadioMainView* iMainView;
   713         //all the possible radio UI states
   708         //all the possible radio UI states
   714         TInt iFMRadioVariationFlags;
   709         TInt iFMRadioVariationFlags;
   751         */
   746         */
   752         TBool iShowingLocalOfflineContinueQuery;
   747         TBool iShowingLocalOfflineContinueQuery;
   753         
   748         
   754         /**
   749         /**
   755         * Is the local or global offline query activated.
   750         * Is the local or global offline query activated.
   756     	*/
   751         */
   757         TBool iOfflineQueryDialogActivated;
   752         TBool iOfflineQueryDialogActivated;
   758         
   753         
   759     	/** 
       
   760     	* Is the start up of application ongoing. 
       
   761     	*/
       
   762     	TBool iStartUp;
       
   763         
       
   764         /** 
   754         /** 
   765 		* Is the screen orientation landscape 
   755          * Is the start up of application ongoing.
   766 		*/
   756          */
   767 		TBool iLandscape;
   757         TBool iStartUp;
       
   758         
       
   759         /**
       
   760         * Is the screen orientation landscape
       
   761         */
       
   762         TBool iLandscape;
   768         CAlfEnv* iAlfEnv; // Owned
   763         CAlfEnv* iAlfEnv; // Owned
   769         // flag to indicate wizard handling
   764         // flag to indicate wizard handling
   770         TBool iStartupWizardHandled;
   765         TBool iStartupWizardHandled;
   771         // flag for startup wizard status
   766         // flag for startup wizard status
   772         TBool iStartupWizardRunning;
   767         TBool iStartupWizardRunning;
   773         // connect headset query
   768         // connect headset query
   774         CAknQueryDialog* iConnectHeadsetQuery;
   769         CAknQueryDialog* iConnectHeadsetQuery;
   775         // flag to indicate if automatic tune is activated from startup wizard
   770         // flag to indicate if automatic tune is activated from startup wizard
   776         TBool iTuneFromWizardActivated;    
   771         TBool iTuneFromWizardActivated;
   777        	// akn information note ptr to check that dialog has dismissed from display
   772         // akn information note ptr to check that dialog has dismissed from display
   778        	TBool iInfoNoteOn;
   773         TBool iInfoNoteOn;
   779        	// global note for headset status when radio is background
   774         // global note for headset status when radio is background
   780        	CAknGlobalNote* iConnectHeadsetGlobalNote;
   775         CAknGlobalNote* iConnectHeadsetGlobalNote;
   781        	// flag for previous mute status 
   776         // flag for previous mute status 
   782         TFMMuteStatus iMuteStatusBeforeRadioInit;
   777         TFMMuteStatus iMuteStatusBeforeRadioInit;
   783        	// Channels list
   778         // Channels list
   784        	CArrayFixFlat<TChannelInformation>* iChannels; 	  
   779         RPointerArray<CFMRadioPreset> iChannels;
   785        	// IAD client object. Owned.
   780         // IAD client object. Owned.
   786        	CIAUpdate* iUpdate; 	  
   781         CIAUpdate* iUpdate;
   787        	// Parameters for IAD update. Owned.
   782         // Parameters for IAD update. Owned.
   788        	CIAUpdateParameters* iParameters;       	
   783         CIAUpdateParameters* iParameters;
   789        	TBool iAutoTune;
       
   790        	TBool iAutoTuneUnmute;
       
   791         // The backstepping wrapper. Owned.
   784         // The backstepping wrapper. Owned.
   792         CFMRadioBackSteppingServiceWrapper* iBsWrapper;       	
   785         CFMRadioBackSteppingServiceWrapper* iBsWrapper;
   793         // Is feature manager initialized, used for uninitializing feature manager
   786         // Is feature manager initialized, used for uninitializing feature manager
   794         TBool iFeatureManagerInitialized;
   787         TBool iFeatureManagerInitialized;
   795         // own, for active idle setting
   788         // own, for active idle setting
   796         CRepository* iSettingsRepository;
   789         CRepository* iSettingsRepository;
   797         // Callback for processing start up foreground event. 
   790         // Callback for processing start up foreground event.