mpengine/src/mpengine.cpp
changeset 38 b93f525c9244
parent 37 eb79a7c355bf
child 43 0f32e550d9d8
child 48 af3740e3753f
--- a/mpengine/src/mpengine.cpp	Fri Jun 11 19:36:32 2010 -0500
+++ b/mpengine/src/mpengine.cpp	Fri Jun 25 17:21:37 2010 -0500
@@ -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()