radioapp/radiouiengine/inc/radiouiengine_p.h
changeset 13 46974bebc798
child 14 63aabac4416d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/radioapp/radiouiengine/inc/radiouiengine_p.h	Fri Mar 19 09:29:04 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef RADIOUIENGINE_P_H_
+#define RADIOUIENGINE_P_H_
+
+// System includes
+#include <qscopedpointer>
+
+#include "radioenginewrapperobserver.h"
+
+// Forward declarations
+class RadioUiEngine;
+class RadioEngineWrapper;
+class RadioStationModel;
+class RadioPlayLogModel;
+class RadioPresetStorage;
+
+class RadioUiEnginePrivate : public RadioEngineWrapperObserver
+{
+    Q_DECLARE_PUBLIC( RadioUiEngine )
+    Q_DISABLE_COPY( RadioUiEnginePrivate )
+
+public:
+
+    enum TuneDirection{ Next, Previous };
+
+    RadioUiEnginePrivate( RadioUiEngine* engine );
+    ~RadioUiEnginePrivate();
+
+    bool startRadio();
+
+private:
+
+// from base class RadioEngineWrapperObserver
+
+    void tunedToFrequency( uint frequency, int commandSender );
+    void seekingStarted( Seeking::Direction direction );
+    void radioStatusChanged( bool radioIsOn );
+    void rdsAvailabilityChanged( bool available );
+    void volumeChanged( int volume );
+    void muteChanged( bool muted );
+    void audioRouteChanged( bool loudspeaker );
+    void scanAndSaveFinished();
+    void headsetStatusChanged( bool connected );
+    void skipPrevious();
+    void skipNext();
+
+// New functions
+
+    /*!
+     * Tunes to next or previous favorite preset
+     */
+    void skip( TuneDirection direction );
+
+private: // data
+
+    /**
+     * Pointer to the public class
+     * Not own.
+     */
+    RadioUiEngine*                      q_ptr;
+
+    QScopedPointer<RadioEngineWrapper>  mEngineWrapper;
+
+    QScopedPointer<RadioPresetStorage>  mPresetStorage;
+
+    RadioStationModel*                  mStationModel;
+
+    RadioPlayLogModel*                  mPlayLogModel;
+
+};
+
+#endif // RADIOUIENGINE_P_H_