radioapp/radiouiengine/inc/radiouiengine_p.h
changeset 16 f54ebcfc1b80
parent 14 63aabac4416d
child 19 afea38384506
equal deleted inserted replaced
14:63aabac4416d 16:f54ebcfc1b80
    18 #ifndef RADIOUIENGINE_P_H_
    18 #ifndef RADIOUIENGINE_P_H_
    19 #define RADIOUIENGINE_P_H_
    19 #define RADIOUIENGINE_P_H_
    20 
    20 
    21 // System includes
    21 // System includes
    22 #include <QScopedPointer>
    22 #include <QScopedPointer>
       
    23 #include <QPointer>
    23 
    24 
    24 #include "radioenginewrapperobserver.h"
    25 #include "radioenginewrapperobserver.h"
    25 
    26 
    26 // Forward declarations
    27 // Forward declarations
    27 class RadioUiEngine;
    28 class RadioUiEngine;
    28 class RadioEngineWrapper;
    29 class RadioEngineWrapper;
    29 class RadioStationModel;
    30 class RadioStationModel;
    30 class RadioPlayLogModel;
    31 class RadioHistoryModel;
    31 class RadioPresetStorage;
    32 class RadioPresetStorage;
    32 class RadioControlService;
    33 class RadioControlService;
    33 class RadioMonitorService;
    34 class RadioMonitorService;
       
    35 class RadioScannerEngine;
    34 
    36 
    35 class RadioUiEnginePrivate : public RadioEngineWrapperObserver
    37 class RadioUiEnginePrivate : public RadioEngineWrapperObserver
    36 {
    38 {
    37     Q_DECLARE_PUBLIC( RadioUiEngine )
    39     Q_DECLARE_PUBLIC( RadioUiEngine )
    38     Q_DISABLE_COPY( RadioUiEnginePrivate )
    40     Q_DISABLE_COPY( RadioUiEnginePrivate )
    40 public:
    42 public:
    41 
    43 
    42     enum TuneDirection{ Next, Previous };
    44     enum TuneDirection{ Next, Previous };
    43 
    45 
    44     RadioUiEnginePrivate( RadioUiEngine* engine );
    46     RadioUiEnginePrivate( RadioUiEngine* engine );
    45     ~RadioUiEnginePrivate();
    47     virtual ~RadioUiEnginePrivate();
       
    48 
       
    49     RadioUiEngine& api();
    46 
    50 
    47     bool startRadio();
    51     bool startRadio();
       
    52 
       
    53     void cancelSeeking();
       
    54 
       
    55     RadioEngineWrapper& wrapper();
    48 
    56 
    49 private:
    57 private:
    50 
    58 
    51 // from base class RadioEngineWrapperObserver
    59 // from base class RadioEngineWrapperObserver
    52 
    60 
    53     void tunedToFrequency( uint frequency, int commandSender );
    61     void tunedToFrequency( uint frequency, int reason );
    54     void seekingStarted( Seeking::Direction direction );
       
    55     void radioStatusChanged( bool radioIsOn );
    62     void radioStatusChanged( bool radioIsOn );
    56     void rdsAvailabilityChanged( bool available );
    63     void rdsAvailabilityChanged( bool available );
    57     void volumeChanged( int volume );
    64     void volumeChanged( int volume );
    58     void muteChanged( bool muted );
    65     void muteChanged( bool muted );
    59     void audioRouteChanged( bool loudspeaker );
    66     void audioRouteChanged( bool loudspeaker );
    60     void scanAndSaveFinished();
    67     void antennaStatusChanged( bool connected );
    61     void headsetStatusChanged( bool connected );
       
    62     void skipPrevious();
    68     void skipPrevious();
    63     void skipNext();
    69     void skipNext();
    64 
    70 
    65 // New functions
    71 // New functions
    66 
    72 
    73 
    79 
    74     /**
    80     /**
    75      * Pointer to the public class
    81      * Pointer to the public class
    76      * Not own.
    82      * Not own.
    77      */
    83      */
    78     RadioUiEngine*                      q_ptr;
    84     RadioUiEngine*                          q_ptr;
    79 
    85 
    80     QScopedPointer<RadioEngineWrapper>  mEngineWrapper;
    86     QScopedPointer<RadioEngineWrapper>      mEngineWrapper;
    81 
    87 
    82     QScopedPointer<RadioPresetStorage>  mPresetStorage;
    88     QScopedPointer<RadioPresetStorage>      mPresetStorage;
    83 
    89 
    84     RadioStationModel*                  mStationModel;
    90     RadioStationModel*                      mStationModel;
    85 
    91 
    86     RadioPlayLogModel*                  mPlayLogModel;
    92     RadioHistoryModel*                      mHistoryModel;
    87 
    93 
    88     RadioControlService*                mControlService;
    94     RadioControlService*                    mControlService;
    89 
    95 
    90     RadioMonitorService*                mMonitorService;
    96     RadioMonitorService*                    mMonitorService;
       
    97 
       
    98     QPointer<RadioScannerEngine>            mScannerEngine;
    91 
    99 
    92 };
   100 };
    93 
   101 
    94 #endif // RADIOUIENGINE_P_H_
   102 #endif // RADIOUIENGINE_P_H_