radioapp/radiouiengine/inc/radiouiengine_p.h
branchRCL_3
changeset 19 cce62ebc198e
equal deleted inserted replaced
18:1a6714c53019 19:cce62ebc198e
       
     1 /*
       
     2 * Copyright (c) 2009 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 *
       
    16 */
       
    17 
       
    18 #ifndef RADIOUIENGINE_P_H_
       
    19 #define RADIOUIENGINE_P_H_
       
    20 
       
    21 // System includes
       
    22 #include <QScopedPointer>
       
    23 #include <QSharedPointer>
       
    24 
       
    25 // User includes
       
    26 #include "radio_global.h"
       
    27 #include "radioenginewrapperobserver.h"
       
    28 
       
    29 // Forward declarations
       
    30 class RadioUiEngine;
       
    31 class RadioEngineWrapper;
       
    32 class RadioStationModel;
       
    33 class RadioHistoryModel;
       
    34 class RadioPresetStorage;
       
    35 class RadioControlService;
       
    36 class RadioMonitorService;
       
    37 class RadioScannerEngine;
       
    38 class QTimer;
       
    39 
       
    40 class RadioUiEnginePrivate : public RadioEngineWrapperObserver
       
    41 {
       
    42     Q_DECLARE_PUBLIC( RadioUiEngine )
       
    43     Q_DISABLE_COPY( RadioUiEnginePrivate )
       
    44 
       
    45 public:
       
    46 
       
    47     RadioUiEnginePrivate( RadioUiEngine* engine );
       
    48     virtual ~RadioUiEnginePrivate();
       
    49 
       
    50     RadioUiEngine& api();
       
    51 
       
    52     bool init();
       
    53 
       
    54     void cancelSeeking();
       
    55 
       
    56     RadioEngineWrapper& wrapper();
       
    57 
       
    58 private:
       
    59 
       
    60 // from base class RadioEngineWrapperObserver
       
    61 
       
    62     void tunedToFrequency( uint frequency, int reason );
       
    63     void radioStatusChanged( bool radioIsOn );
       
    64     void rdsAvailabilityChanged( bool available );
       
    65     void increaseVolume();
       
    66     void decreaseVolume();
       
    67     void volumeChanged( int volume );
       
    68     void muteChanged( bool muted );
       
    69     void audioRouteChanged( bool loudspeaker );
       
    70     void antennaStatusChanged( bool connected );
       
    71     void skipPrevious();
       
    72     void skipNext();
       
    73 
       
    74 // New functions
       
    75 
       
    76     /*!
       
    77      * Tunes to next or previous station
       
    78      */
       
    79     uint skip( StationSkip::Mode mode, uint startFrequency = 0, const int reason = TuneReason::Skip );
       
    80 
       
    81 private: // data
       
    82 
       
    83     /**
       
    84      * Pointer to the public class
       
    85      * Not own.
       
    86      */
       
    87     RadioUiEngine*                          q_ptr;
       
    88 
       
    89     QScopedPointer<RadioEngineWrapper>      mEngineWrapper;
       
    90 
       
    91     QScopedPointer<RadioPresetStorage>      mPresetStorage;
       
    92 
       
    93     QScopedPointer<RadioStationModel>       mStationModel;
       
    94 
       
    95     QScopedPointer<RadioHistoryModel>       mHistoryModel;
       
    96 
       
    97     QScopedPointer<RadioControlService>     mControlService;
       
    98 
       
    99     QScopedPointer<RadioMonitorService>     mMonitorService;
       
   100 
       
   101     QWeakPointer<RadioScannerEngine>        mScannerEngine;
       
   102 
       
   103     /**
       
   104      * Power off timer
       
   105      * Owned by public class by setting parent
       
   106      */
       
   107     QTimer*                                 mPowerOffTimer;
       
   108 
       
   109 };
       
   110 
       
   111 #endif // RADIOUIENGINE_P_H_