content server caches ObjectDbPtr
use Hash instead of Hash string
use constant instead of raw number
Change-Id: Ib3f5f2d4cd755bfb73b38c2621ad2383522b2621
diff --git a/src/object-db.h b/src/object-db.h
index f60e504..cabc46d 100644
--- a/src/object-db.h
+++ b/src/object-db.h
@@ -28,6 +28,8 @@
#include <ccnx-name.h>
#include <boost/filesystem.hpp>
#include <boost/shared_ptr.hpp>
+#include <ctime>
+#include <vector>
class ObjectDb
{
@@ -45,6 +47,9 @@
// sqlite3_int64
// getNumberOfSegments (const Ccnx::Name &deviceName);
+ time_t
+ secondsSinceLastUse();
+
static bool
DoesExist (const boost::filesystem::path &folder, const Ccnx::Name &deviceName, const std::string &hash);
@@ -57,6 +62,7 @@
private:
sqlite3 *m_db;
+ time_t m_lastUsed;
};
typedef boost::shared_ptr<ObjectDb> ObjectDbPtr;