Deletion detection
diff --git a/src/action-log.h b/src/action-log.h
index 9833b92..f28a398 100644
--- a/src/action-log.h
+++ b/src/action-log.h
@@ -23,6 +23,7 @@
 #define ACTION_LOG_H
 
 #include "db-helper.h"
+#include "file-state.h"
 #include "sync-log.h"
 #include "action-item.pb.h"
 #include "file-item.pb.h"
@@ -35,11 +36,8 @@
 typedef boost::shared_ptr<ActionLog> ActionLogPtr;
 typedef boost::shared_ptr<ActionItem> ActionItemPtr;
 
-typedef std::list<FileItem> FileItems;
-typedef boost::shared_ptr<FileItem>  FileItemPtr;
-typedef boost::shared_ptr<FileItems> FileItemsPtr;
-
 class ActionLog : public DbHelper
+                , public FileState
 {
 public:
   typedef boost::function<void (std::string /*filename*/, Ccnx::Name /*device_name*/, sqlite3_int64 /*seq_no*/,
@@ -53,6 +51,8 @@
              const std::string &sharedFolder,
              OnFileAddedOrChangedCallback onFileAddedOrChanged, OnFileRemovedCallback onFileRemoved);
 
+  virtual ~ActionLog () { }
+
   //////////////////////////
   // Local operations     //
   //////////////////////////
@@ -103,12 +103,18 @@
   ///////////////////////////
   // File state operations //
   ///////////////////////////
-  FileItemPtr
+  virtual FileItemPtr
   LookupFile (const std::string &filename);
 
-  FileItemsPtr
+  virtual FileItemsPtr
   LookupFilesForHash (const Hash &hash);
 
+  virtual FileItemsPtr
+  LookupFilesInFolder (const std::string &folder);
+
+  virtual FileItemsPtr
+  LookupFilesInFolderRecursively (const std::string &folder);
+
 public:
   // for test purposes
   sqlite3_int64
@@ -121,6 +127,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;