diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-06-14 08:01:41 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-07-17 19:00:08 +0000 |
commit | 671fc7f3e3b7f3cad762ff68548fb18559fdf091 (patch) | |
tree | dcf2cd9105433d9da79a21d428a360462fc3c101 /dump_manager.hpp | |
parent | 599c7afe0f90c1bb9b5cb9eda607150b562b8752 (diff) | |
download | phosphor-debug-collector-671fc7f3e3b7f3cad762ff68548fb18559fdf091.tar.gz phosphor-debug-collector-671fc7f3e3b7f3cad762ff68548fb18559fdf091.zip |
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>
Diffstat (limited to 'dump_manager.hpp')
-rw-r--r-- | dump_manager.hpp | 15 |
1 files changed, 4 insertions, 11 deletions
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 @@ class Manager; } // 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. |