Add support for generic inotify based directory watch.

Watch a directory for the changes based on user configuration
and then report changes to the user.

Change-Id: I9f53d3135dd4bff6187840c0c53d2a64509808cd
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/dump_manager.hpp b/dump_manager.hpp
index 3bbcf3e..b4c09c1 100644
--- a/dump_manager.hpp
+++ b/dump_manager.hpp
@@ -1,12 +1,14 @@
 #pragma once
 
+#include <experimental/filesystem>
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <xyz/openbmc_project/Dump/Create/server.hpp>
-#include <experimental/filesystem>
 
 #include "xyz/openbmc_project/Dump/Internal/Create/server.hpp"
 #include "dump_entry.hpp"
+#include "dump_utils.hpp"
 
 namespace phosphor
 {
@@ -19,22 +21,13 @@
 
 } // namespace internal
 
-namespace fs = std::experimental::filesystem;
 using Type =
     sdbusplus::xyz::openbmc_project::Dump::Internal::server::Create::Type;
 
 using CreateIface = sdbusplus::server::object::object<
                     sdbusplus::xyz::openbmc_project::Dump::server::Create>;
 
-/* Need a custom deleter for freeing up sd_event */
-struct EventDeleter
-{
-    void operator()(sd_event* event) const
-    {
-        event = sd_event_unref(event);
-    }
-};
-using EventPtr = std::unique_ptr<sd_event, EventDeleter>;
+namespace fs = std::experimental::filesystem;
 
 /** @class Manager
  *  @brief OpenBMC Dump  manager implementation.