audiostubs/fmradiotunercontrolstub/Src/FMRadioTunerControlStub.h
changeset 0 0ce1b5ce9557
child 3 f935d51494d1
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * 		This header specifies the implementation of CFMRadioTunerControl.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef FMRADIOTUNERCONTROLSTUB_H
       
    22 #define FMRADIOTUNERCONTROLSTUB_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <FMRadioTunerControl.h>
       
    27 #include <RadioRdsControl.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CTuner;
       
    31 class CRdsGenerator;
       
    32 class CAfSwitcher;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  ?one_line_short_description.
       
    38 *  ?other_description_lines
       
    39 *
       
    40 *  @lib FMRadioTunerControlStub.lib
       
    41 *  @since Series 60 3.0
       
    42 */
       
    43 class CAdaptation : public CFMRadioTunerControl
       
    44 #ifdef RD_FM_RADIO_ENHANCEMENTS
       
    45 					,public MRdsControl
       
    46 #endif	// RD_FM_RADIO_ENHANCEMENTS
       
    47     {
       
    48     public: // New functions
       
    49 		static CAdaptation* NewL( MFMRadioTunerControlObserver& aObserver );
       
    50 		virtual ~CAdaptation();
       
    51 
       
    52 	public: // From base class CFMRadioTunerControl
       
    53 		void TunerOn( TFMRadioFrequencyRange aRange, TInt aFrequency );
       
    54 		void CancelTunerOn();
       
    55 		void TunerOff();
       
    56 		void CancelTunerOff();
       
    57 		void SetFrequencyRange( TFMRadioFrequencyRange aRange );
       
    58 		void CancelSetFrequencyRange();
       
    59 		void SetFrequency( TInt aFrequency );
       
    60 		void CancelSetFrequency();
       
    61 		void StationSeek( TFMRadioSeekDirection aDirection );
       
    62 		void CancelStationSeek();
       
    63 		void AudioMode();
       
    64 		void CancelAudioMode();
       
    65 		void SetAudioMode( TFMRadioAudioMode aMode );
       
    66 		void CancelSetAudioMode();
       
    67 		void MaxSignalStrength();
       
    68 		void CancelMaxSignalStrength();
       
    69 		void SignalStrength();
       
    70 		void CancelSignalStrength();
       
    71 		void Squelch();
       
    72 		void CancelSquelch();
       
    73 		void SetSquelch( TBool aEnabled );
       
    74 		void CancelSetSquelch();
       
    75 		void BufferToBeFilled( TDes8& aBuffer );
       
    76 		TFMRadioCapabilities Capabilities();
       
    77 
       
    78 #ifdef RD_FM_RADIO_ENHANCEMENTS
       
    79         MRdsControl* RdsControl( MRdsControlObserver& aObserver ) ;
       
    80         TInt GetFrequencyRange( TFMRadioFrequencyRange& aRange, TInt& aMinFreq, TInt& aMaxFreq ) const;
       
    81 
       
    82 	public: // From base class MRdsControl
       
    83 	    TInt GetCapabilities( TRdsCapabilities& aCaps ) const;
       
    84         TInt GetRdsSignalStatus( TBool& aRdsSignal ) const;
       
    85         TInt NotifyRdsDataChange( TRdsData aRdsData );
       
    86         void CancelNotifyRdsDataChange();
       
    87         TInt SetAutomaticSwitching( TBool aAuto );
       
    88         TInt GetAutomaticSwitching( TBool& aAuto );
       
    89         void CancelAFSearch();
       
    90         TInt SetAutomaticTrafficAnnouncement( TBool aAuto );
       
    91         TInt GetAutomaticTrafficAnnouncement( TBool& aAuto );
       
    92         void StationSeekByPTY( TRdsProgrammeType aPty, TBool aSeekUp );
       
    93         void StationSeekByTA( TBool aSeekUp );
       
    94         void StationSeekByTP( TBool aSeekUp );
       
    95         void CancelRdsStationSeek();
       
    96         void GetFreqByPTY( TRdsProgrammeType aPty );
       
    97         void CancelGetFreqByPTY();
       
    98         void GetFreqByTA();
       
    99         void CancelGetFreqByTA();
       
   100         void GetPSByPTY( TRdsProgrammeType aPty );
       
   101         void CancelGetPSByPTY();
       
   102         void GetPSByTA();
       
   103         void CancelGetPSByTA();
       
   104         TInt GetProgrammeIdentification( TInt& aPi );
       
   105         TInt GetProgrammeType( TRdsProgrammeType& aPty );
       
   106         TInt GetProgrammeService( TRdsPSName& aPs );
       
   107         TInt GetRadioText( TRdsRadioText& aRt, RArray<TRdsRTplusTag>& aRTplusTags );
       
   108         TInt GetClockTime( TDateTime& aCt );
       
   109         TInt GetTrafficAnnouncementStatus( TBool& aTaStatus );
       
   110         TInt GetTrafficProgrammeStatus( TBool& aTpStatus );
       
   111 
       
   112 #endif	// RD_FM_RADIO_ENHANCEMENTS
       
   113 
       
   114     private:
       
   115 
       
   116 		TBool ValidFrequency( TFMRadioFrequencyRange aRange, TInt aFrequency );
       
   117 		void SetFrequencySettings( TInt aFrequency );
       
   118 
       
   119         /**
       
   120         * C++ default constructor.
       
   121         */
       
   122         CAdaptation();
       
   123 
       
   124         /**
       
   125         * By default Symbian 2nd phase constructor is private.
       
   126         */
       
   127         void ConstructL( MFMRadioTunerControlObserver& aObserver );
       
   128 
       
   129     private:    // Data
       
   130     	// Tuner
       
   131     	CTuner* iTuner;
       
   132     	CRdsGenerator* iRds;
       
   133     	CAfSwitcher* iRdsAf;
       
   134     };
       
   135 
       
   136 #endif      // FMRADIOTUNERCONTROLSTUB_H
       
   137 
       
   138 // End of File