mds_plat/harvester_framework_api/inc/harvesterclient.h
branchRCL_3
changeset 12 9f21bab39f42
parent 0 c53acadfccc6
--- a/mds_plat/harvester_framework_api/inc/harvesterclient.h	Tue Apr 27 17:05:23 2010 +0300
+++ b/mds_plat/harvester_framework_api/inc/harvesterclient.h	Tue May 11 16:36:55 2010 +0300
@@ -32,6 +32,8 @@
 class MHarvesterEventObserver;
 class CHarvesterRequestActive;
 class CHarvesterRequestQueue;
+class MHarvesterSessionObserver;
+class CHarvesterSessionWatcher;
 
 // default event interval for MHarvesterEventObserver
 const TInt KHarvesterEventInterval = 20;
@@ -171,6 +173,20 @@
 			TInt aItemsLeft ) = 0;
 	};
 
+class MHarvesterSessionObserver
+    {
+public:
+
+    /**
+     * Called to notify the observer that harvester server has been terminated,
+     * thus harvester server sessions created are now invalid and new connection
+     * needs to be established
+     * NOTE! Cliens still have to call Close() on the session to release client side
+     * resources.
+     */
+    virtual void HarvesterServerTerminated() = 0;
+    };
+
 /**
  * Harvester client session class which provides also means to:
  * - Pause/resume the Harvesting framework
@@ -284,7 +300,20 @@
 		                                  RArray<TItemId> &aAlbumIds, 
 										  TBool aAddLocation,
 										  TUid aUid );
-		
+
+        /**
+         * Public method to set observer for notifications about harvester server termination.
+         * Only one observer at a time is currently supported.
+         *
+         * @param aObserver  Pointer to the observer
+         */     
+    	IMPORT_C void AddSessionObserverL( MHarvesterSessionObserver& aObserver  );
+
+        /**
+         * Public method to remove harvester session observer
+         */     
+        IMPORT_C void RemoveSessionObserver();
+    	
         /**
          * Requests a harvest complete event from harvester server.
 		 * On return, aURI is the URI of the harvested file.
@@ -346,6 +375,11 @@
          * Request queue processor.
          */
         CHarvesterRequestQueue* iRequestQueue;
+        
+        /**
+         * Harvester session observer AO.
+         */
+        CHarvesterSessionWatcher* iSessionWatcher;
     	};
 
 #endif // __HARVESTER_CLIENT_H__