diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-07-12 19:14:02 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-07-26 03:49:52 -0500 |
commit | 764d1b2255b4f66ba9bf80024ff425fe983d3528 (patch) | |
tree | 8a281cca00fb853cee8c0c6f4b6f7009a9e3442d /dump_manager.hpp | |
parent | 2dccfe43411868444783d2def5d7f80a1d964b4c (diff) | |
download | phosphor-debug-collector-764d1b2255b4f66ba9bf80024ff425fe983d3528.tar.gz phosphor-debug-collector-764d1b2255b4f66ba9bf80024ff425fe983d3528.zip |
Enable user initiated dump child directory level file watch
Change-Id: I38b1f0a06e96a465526ea1ac497e49dc5f778dd8
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Diffstat (limited to 'dump_manager.hpp')
-rw-r--r-- | dump_manager.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/dump_manager.hpp b/dump_manager.hpp index 4e6715b..003d9e4 100644 --- a/dump_manager.hpp +++ b/dump_manager.hpp @@ -33,6 +33,8 @@ using CreateIface = sdbusplus::server::object::object< namespace fs = std::experimental::filesystem; +using Watch = phosphor::dump::inotify::Watch; + /** @class Manager * @brief OpenBMC Dump manager implementation. * @details A concrete implementation for the @@ -123,6 +125,11 @@ class Manager : public CreateIface //the sd_event_add_child callback. return 0; } + /** @brief Remove specified watch object pointer from the + * watch map and associated entry from the map. + * @param[in] path - unique identifier of the map + */ + void removeWatch(const fs::path& path); /** @brief sdbusplus DBus bus connection. */ sdbusplus::bus::bus& bus; @@ -136,8 +143,13 @@ class Manager : public CreateIface /** @brief Id of the last Dump entry */ uint32_t lastEntryId; - /** @brief Dump watch object */ - phosphor::dump::inotify::Watch dumpWatch; + /** @brief Dump main watch object */ + Watch dumpWatch; + + /** @brief Child directory path and its associated watch object map + * [path:watch object] + */ + std::map<fs::path, std::unique_ptr<Watch>> childWatchMap; }; } // namespace dump |