--- a/radioapp/radioenginewrapper/src/radioenginewrapper_win32.cpp Fri Jun 04 10:21:36 2010 +0100
+++ b/radioapp/radioenginewrapper/src/radioenginewrapper_win32.cpp Fri Jun 11 13:38:32 2010 +0300
@@ -26,8 +26,6 @@
RadioEngineWrapper::RadioEngineWrapper( RadioStationHandlerIf& stationHandler ) :
d_ptr( new RadioEngineWrapperPrivate( this, stationHandler ) )
{
- Q_D( RadioEngineWrapper );
- d->init();
}
/*!
@@ -41,6 +39,15 @@
/*!
*
*/
+bool RadioEngineWrapper::init()
+{
+ Q_D( RadioEngineWrapper );
+ return d->init();
+}
+
+/*!
+ *
+ */
void RadioEngineWrapper::addObserver( RadioEngineWrapperObserver* observer )
{
Q_D( RadioEngineWrapper );
@@ -57,15 +64,6 @@
}
/*!
- * Checks if the radio engine has been constructed properly
- */
-bool RadioEngineWrapper::isEngineConstructed()
-{
- Q_D( RadioEngineWrapper );
- return d->isEngineConstructed();
-}
-
-/*!
* Returns the settings handler owned by the engine
*/
RadioSettingsIf& RadioEngineWrapper::settings()
@@ -113,10 +111,10 @@
/*!
* Returns the frequency step size from the selected region
*/
-bool RadioEngineWrapper::isFrequencyValid( uint frequency )
+bool RadioEngineWrapper::isFrequencyValid( uint frequency ) const
{
Q_UNUSED( frequency );
- return true;
+ return frequency >= minFrequency() && frequency <= maxFrequency() && frequency % frequencyStepSize() == 0;
}
/*!
@@ -163,21 +161,52 @@
}
/*!
- * Tunes to the given frequency
+ * Sets or unsets the engine to manual seek mode
*/
-void RadioEngineWrapper::tuneFrequency( uint frequency, const int sender )
+void RadioEngineWrapper::setManualSeekMode( bool manualSeek )
{
Q_D( RadioEngineWrapper );
- d->tuneFrequency( frequency, sender );
+ d->mManualSeekMode = manualSeek;
+}
+
+/*!
+ * Checks if the engine is in manual seek mode
+ */
+bool RadioEngineWrapper::isInManualSeekMode() const
+{
+ Q_D( const RadioEngineWrapper );
+ return d->mManualSeekMode;
}
/*!
- * Tunes to the given frequency after a delay
+ *
*/
-void RadioEngineWrapper::tuneWithDelay( uint frequency, const int sender )
+void RadioEngineWrapper::setRdsEnabled( bool rdsEnabled )
+{
+ Q_UNUSED( rdsEnabled );
+}
+
+/*!
+ * Tunes to the given frequency
+ */
+void RadioEngineWrapper::setFrequency( uint frequency, const int reason )
{
Q_D( RadioEngineWrapper );
- d->tuneWithDelay( frequency, sender );
+ d->setFrequency( frequency, reason );
+}
+
+/*!
+ *
+ */
+void RadioEngineWrapper::increaseVolume()
+{
+}
+
+/*!
+ *
+ */
+void RadioEngineWrapper::decreaseVolume()
+{
}
/*!
@@ -192,8 +221,10 @@
/*!
*
*/
-void RadioEngineWrapper::setMute( bool muted )
+void RadioEngineWrapper::setMute( bool muted, bool updateSettings )
{
+ Q_UNUSED( muted );
+ Q_UNUSED( updateSettings );
}
/*!
@@ -208,7 +239,7 @@
/*!
*
*/
-void RadioEngineWrapper::startSeeking( Seeking::Direction direction, const int reason )
+void RadioEngineWrapper::startSeeking( Seek::Direction direction, const int reason )
{
Q_D( RadioEngineWrapper );
d->startSeeking( direction, reason );