Almost everything works, but still small problem with file assembly
diff --git a/src/content-server.h b/src/content-server.h
index 994f8b9..946170d 100644
--- a/src/content-server.h
+++ b/src/content-server.h
@@ -1,5 +1,3 @@
-#ifndef CONTENT_SERVER_H
-#define CONTENT_SERVER_H
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2013 University of California, Los Angeles
@@ -21,17 +19,22 @@
* Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
+#ifndef CONTENT_SERVER_H
+#define CONTENT_SERVER_H
+
#include "ccnx-wrapper.h"
#include "object-db.h"
#include "action-log.h"
#include <set>
#include <boost/thread/shared_mutex.hpp>
#include <boost/thread/locks.hpp>
+#include "executor.h"
class ContentServer
{
public:
- ContentServer(Ccnx::CcnxWrapperPtr ccnx, ActionLogPtr actionLog, const boost::filesystem::path &rootDir, int freshness = -1);
+ ContentServer(Ccnx::CcnxWrapperPtr ccnx, ActionLogPtr actionLog, const boost::filesystem::path &rootDir,
+ const Ccnx::Name &deviceName, const std::string &sharedFolderName, int freshness = -1);
~ContentServer();
// the assumption is, when the interest comes in, interest is informs of
@@ -41,19 +44,34 @@
void registerPrefix(const Ccnx::Name &prefix);
void deregisterPrefix(const Ccnx::Name &prefix);
+private:
void
- serve(const Ccnx::Name &interest);
+ serve_Action (Ccnx::Name forwardingHint, const Ccnx::Name &interest);
+
+ void
+ serve_File (Ccnx::Name forwardingHint, const Ccnx::Name &interest);
+
+ void
+ serve_Action_Execute(Ccnx::Name forwardingHint, Ccnx::Name interest);
+
+ void
+ serve_File_Execute(Ccnx::Name forwardingHint, Ccnx::Name interest);
private:
Ccnx::CcnxWrapperPtr m_ccnx;
ActionLogPtr m_actionLog;
typedef boost::shared_mutex Mutex;
- typedef boost::unique_lock<Mutex> WriteLock;
- typedef boost::shared_lock<Mutex> ReadLock;
+
+ typedef boost::unique_lock<Mutex> ScopedLock;
typedef std::set<Ccnx::Name>::iterator PrefixIt;
std::set<Ccnx::Name> m_prefixes;
Mutex m_mutex;
boost::filesystem::path m_dbFolder;
int m_freshness;
+
+ Executor m_executor;
+
+ Ccnx::Name m_deviceName;
+ std::string m_sharedFolderName;
};
#endif // CONTENT_SERVER_H