fmradio/fmradioengine/inc/fmradioengine.h
branchRCL_3
changeset 13 4f2584af5a29
parent 11 97dcae98e602
equal deleted inserted replaced
12:9f3ff466f56b 13:4f2584af5a29
    25 #include <RadioUtility.h>
    25 #include <RadioUtility.h>
    26 #include <RadioFmTunerUtility.h>
    26 #include <RadioFmTunerUtility.h>
    27 #include <RadioPlayerUtility.h>
    27 #include <RadioPlayerUtility.h>
    28 #include <RadioPresetUtility.h>
    28 #include <RadioPresetUtility.h>
    29 #include <RadioFmPresetUtility.h>
    29 #include <RadioFmPresetUtility.h>
    30 #include <etelmm.h>
       
    31 
    30 
    32 #include "fmradiosystemeventdetectorobserver.h"
    31 #include "fmradiosystemeventdetectorobserver.h"
    33 #include "fmradionetworkchangeobserver.h"
    32 #include "fmradionetworkchangeobserver.h"
    34 #include "fmradiordsobserver.h"
    33 #include "fmradiordsobserver.h"
    35 #include "fmradioengine.hrh"
    34 #include "fmradioengine.hrh"
   755     * Second phase class constructor.
   754     * Second phase class constructor.
   756     */
   755     */
   757     void ConstructL();
   756     void ConstructL();
   758     
   757     
   759     /**
   758     /**
   760     * ConnectLineL
       
   761     */
       
   762     void ConnectLineL();
       
   763 
       
   764     /**
       
   765      * Updates the frequency into settings and P&S
   759      * Updates the frequency into settings and P&S
   766      * 
   760      * 
   767      * @param aFrequency The frequency to be set
   761      * @param aFrequency The frequency to be set
   768      */
   762      */
   769     void StoreAndPublishFrequency( TInt aFrequency );
   763     void StoreAndPublishFrequency( TInt aFrequency );
   770     
   764     
   771 private:
   765     // internal radio engine states
   772 
   766     enum TRadioEngineState
   773    //the internal radio engine states
   767         {
   774    enum TRadioEngineState
       
   775        {
       
   776         EStateRadioOff,
   768         EStateRadioOff,
   777         EStateRadioOn,
   769         EStateRadioOn,
   778         };
   770         };
   779 
   771     
       
   772     // internal state of the tuner control
       
   773     enum TRadioTunerControlState
       
   774         {
       
   775         EStateRadioTunerControlUninitialized,
       
   776         EStateRadioTunerControlOn,
       
   777         EStateRadioTunerControlOff
       
   778         };
       
   779     
       
   780 private:
       
   781    
   780     // The Radio Utility
   782     // The Radio Utility
   781     CRadioUtility* iRadioUtility; // own
   783     CRadioUtility* iRadioUtility; // own
   782     // The Tuner Utility
   784     // The Tuner Utility
   783     CRadioFmTunerUtility* iFmTunerUtility;
   785     CRadioFmTunerUtility* iFmTunerUtility;
   784     // The Player Utility
   786     // The Player Utility
   799     CAudioOutput* iAudioOutput; //own
   801     CAudioOutput* iAudioOutput; //own
   800     // pointer to CCentralRepositoryHandler
   802     // pointer to CCentralRepositoryHandler
   801     CCentralRepositoryHandler* iCentralRepositoryHandler; // own
   803     CCentralRepositoryHandler* iCentralRepositoryHandler; // own
   802     // Used to provide async behavior in some callbacks
   804     // Used to provide async behavior in some callbacks
   803     CRadioStateHandler *iStateHandler;
   805     CRadioStateHandler *iStateHandler;
   804     // flag to indicate if auto resume is supported
       
   805     TBool iAutoResume;
       
   806     // flag to indicate if a call is in progress
   806     // flag to indicate if a call is in progress
   807     TBool iInCall;
   807     TBool iInCall;
   808     // pointer to TRadioSettings
   808     // pointer to TRadioSettings
   809     TRadioSettings* iRadioSettings; // own
   809     TRadioSettings* iRadioSettings; // own
   810     // the current radio state
   810     // the current radio state
   816     // a flag indicating if tune prset is requestd
   816     // a flag indicating if tune prset is requestd
   817     TBool iTunePresetRequested;
   817     TBool iTunePresetRequested;
   818     // Indicates a request to initialized the radio is pending
   818     // Indicates a request to initialized the radio is pending
   819     TBool iInitializeRadioRequestExists;
   819     TBool iInitializeRadioRequestExists;
   820     // Indicates if the tuner control has been granted.
   820     // Indicates if the tuner control has been granted.
   821     TBool iTunerControl;
   821     TRadioTunerControlState iTunerControl;
   822     // High and low frequency of the current band.
   822     // High and low frequency of the current band.
   823     TInt iBottomFrequency;
   823     TInt iBottomFrequency;
   824     TInt iTopFrequency;
   824     TInt iTopFrequency;
   825     // ETrue if frequency was set by RDS AF
   825     // ETrue if frequency was set by RDS AF
   826     TBool iFrequencySetByRdsAf;
   826     TBool iFrequencySetByRdsAf;
   827     //Listens changes in network availability
   827     //Listens changes in network availability
   828     CFMRadioSystemEventDetector* iSystemEventDetector;
   828     CFMRadioSystemEventDetector* iSystemEventDetector;
   829    	// for fmradio engine resource file
   829     // for fmradio engine resource file
   830     TInt iFMRadioEngineResourceOffset;
   830     TInt iFMRadioEngineResourceOffset;
   831     //Listens changes in network ID and country code 
   831     //Listens changes in network ID and country code 
   832     CFMRadioMobileNetworkInfoListener* iNetworkInfoListener;
   832     CFMRadioMobileNetworkInfoListener* iNetworkInfoListener;
   833     //P&S interaction interface for FMRadio actions.
   833     //P&S interaction interface for FMRadio actions.
   834 	CFMRadioPubSub* iPubSub;
   834     CFMRadioPubSub* iPubSub;
   835     // accessory observer
   835     // accessory observer
   836     CFMRadioAccessoryConnection* iHeadsetObserver;
   836     CFMRadioAccessoryConnection* iHeadsetObserver;
   837     // tel server session
       
   838     RTelServer iTelServer;
       
   839     // phone
       
   840     RMobilePhone iPhone;
       
   841 	// line
       
   842 	RMobileLine iLine;
       
   843 	// tsy name
       
   844 	TFileName iTsyName;
       
   845     // conrrectly constructer
       
   846     TBool ilineConstructed;
       
   847     // for storing station name for method GetPresetNameL
   837     // for storing station name for method GetPresetNameL
   848    	TStationName iStationName;
   838     TStationName iStationName;
   849     // Local cache for tuning state so that it doesn't get published before should
   839     // Local cache for tuning state so that it doesn't get published before should
   850    	TFMRadioPSTuningState iTuningState;
   840     TFMRadioPSTuningState iTuningState;
   851     // If last time audio is set to IHF with no headset connected.
       
   852     TBool iHFOptionActivated;
       
   853     };
   841     };
   854 
   842 
   855 #endif  //FMRADIOENGINE_H
   843 #endif  //FMRADIOENGINE_H
   856 
   844 
   857 // End of file
   845 // End of file