Rough implementation of the state server. Now it is possible to request restore of a particular file

See state-server.h for more details on command syntax.

// <PREFIX_CMD> = /localhost/<user's-device-name>/"chronoshare"/"cmd"
// <PREFIX_CMD>/"restore"/"file"/<one-component-relative-file-name>/<version>/<file-hash>

<file-hash> component is used solely to disambiguate file version and
need not be specified in full (or specified at all, but the component
need to be present). The system will only check that specified file-hash
is a prefix of the real hash of the file

Change-Id: I7a4d15a04eb1a1c59a3412da46174441c61a45c0
diff --git a/src/dispatcher.h b/src/dispatcher.h
index 902ec62..0455ff0 100644
--- a/src/dispatcher.h
+++ b/src/dispatcher.h
@@ -29,6 +29,7 @@
 #include "object-db.h"
 #include "object-manager.h"
 #include "content-server.h"
+#include "state-server.h"
 #include "fetch-manager.h"
 
 #include <boost/function.hpp>
@@ -70,9 +71,6 @@
   void
   Restore_LocalFile (FileItemPtr file);
 
-  void
-  Restore_LocalFile_Execute (FileItemPtr file);
-
   // for test
   HashPtr
   SyncRoot() { return m_core->root(); }
@@ -84,6 +82,8 @@
   void
   Did_LocalFile_Delete_Execute (boost::filesystem::path relativeFilepath); // cannot be const & for Execute event!!! otherwise there will be segfault
 
+  void
+  Restore_LocalFile_Execute (FileItemPtr file);
 
 private:
   /**
@@ -174,6 +174,7 @@
 
   std::string m_sharedFolder;
   ContentServer *m_server;
+  StateServer   *m_stateServer;
   bool m_enablePrefixDiscovery;
 
   FetchManagerPtr m_actionFetcher;