Moving out FileState operations into a separate class/database
Change-Id: I9314ef92632253aaa843dee98933795f2d8e076f
diff --git a/src/action-log.h b/src/action-log.h
index b175001..f0ed9cd 100644
--- a/src/action-log.h
+++ b/src/action-log.h
@@ -37,7 +37,6 @@
typedef boost::shared_ptr<ActionItem> ActionItemPtr;
class ActionLog : public DbHelper
- , public FileState
{
public:
typedef boost::function<void (std::string /*filename*/, Ccnx::Name /*device_name*/, sqlite3_int64 /*seq_no*/,
@@ -100,28 +99,10 @@
ActionItemPtr
LookupAction (const Ccnx::Name &actionName);
- /**
- * @brief Set "complete" flag
- *
- * The call will do nothing if FileState does not have a record for the file (e.g., file got subsequently deleted)
- */
- void
- SetFileComplete (const std::string &filename);
- ///////////////////////////
- // File state operations //
- ///////////////////////////
- virtual FileItemPtr
- LookupFile (const std::string &filename);
-
- virtual FileItemsPtr
- LookupFilesForHash (const Hash &hash);
-
- virtual FileItemsPtr
- LookupFilesInFolder (const std::string &folder);
-
- virtual FileItemsPtr
- LookupFilesInFolderRecursively (const std::string &folder);
+ //
+ inline FileStatePtr
+ GetFileState ();
public:
// for test purposes
@@ -135,11 +116,9 @@
static void
apply_action_xFun (sqlite3_context *context, int argc, sqlite3_value **argv);
- static void
- directory_name_xFun (sqlite3_context *context, int argc, sqlite3_value **argv);
-
private:
SyncLogPtr m_syncLog;
+ FileStatePtr m_fileState;
Ccnx::CcnxWrapperPtr m_ccnx;
std::string m_sharedFolderName;
@@ -153,5 +132,11 @@
struct ActionLog : virtual boost::exception, virtual std::exception { };
}
+inline FileStatePtr
+ActionLog::GetFileState ()
+{
+ return m_fileState;
+}
+
#endif // ACTION_LOG_H