mpengine/src/mpengine.cpp
changeset 42 79c49924ae23
parent 41 ea59c434026a
child 43 0f32e550d9d8
child 48 af3740e3753f
--- a/mpengine/src/mpengine.cpp	Wed Jun 23 18:10:13 2010 +0300
+++ b/mpengine/src/mpengine.cpp	Tue Jul 06 14:13:36 2010 +0300
@@ -168,6 +168,14 @@
  */
 
 /*!
+    \fn void restorePathFailed()
+
+    This signal is emitted when an the previous path cannot be restored 
+    (i.e. no music in collection).
+
+ */
+
+/*!
     \fn void containerContentsChanged()
 
     This signal is emitted when items are removed or inserted on the current 
@@ -266,6 +274,9 @@
         connect( mMpxCollectionWrapper, SIGNAL( songsDeleted( bool ) ),
                 this, SLOT( handleDeleteEnded( bool ) ),
                 Qt::QueuedConnection );
+        connect( mMpxCollectionWrapper, SIGNAL( restorePathFailed() ),
+                this, SIGNAL( restorePathFailed() ),
+                Qt::QueuedConnection );
     }
 
     if( mode == StandAlone ){
@@ -970,6 +981,22 @@
 }
 
 /*!
+ Save data needed to later restore state (activity)
+ */
+void MpEngine::saveActivityData( QByteArray &data )
+{
+    mMpxCollectionWrapper->savePath( data );
+}
+
+/*!
+ Restore state from activity data 
+ */
+void MpEngine::loadActivityData( const QByteArray &data ) 
+{
+    mMpxCollectionWrapper->restorePath( data );
+}
+
+/*!
  Slot to handle equalizer ready signal from equalizer wrapper.
  */
 void MpEngine::handleEqualizerReady()