summaryrefslogtreecommitdiffstats
path: root/sync_watch.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sync_watch.hpp')
-rw-r--r--sync_watch.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/sync_watch.hpp b/sync_watch.hpp
index 30ea5f7..3ad5afd 100644
--- a/sync_watch.hpp
+++ b/sync_watch.hpp
@@ -54,6 +54,12 @@ class SyncWatch
static int callback(sd_event_source* s, int fd, uint32_t revents,
void* userdata);
+ /** @brief Adds an inotify watch to the specified file or directory path
+ *
+ * @param[in] path - The path to the file or directory
+ */
+ void addInotifyWatch(const fs::path& path);
+
/** @brief Map of file descriptors, watch descriptors, and file paths */
using fd = int;
using wd = int;
@@ -61,6 +67,9 @@ class SyncWatch
/** @brief The callback function for processing the inotify event */
std::function<int(int, fs::path&)> syncCallback;
+
+ /** @brief Persistent sd_event loop */
+ sd_event& loop;
};
} // namespace manager
OpenPOWER on IntegriCloud