summaryrefslogtreecommitdiff
path: root/src/dged/reactor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dged/reactor.h')
-rw-r--r--src/dged/reactor.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dged/reactor.h b/src/dged/reactor.h
index e54afda..1fa014d 100644
--- a/src/dged/reactor.h
+++ b/src/dged/reactor.h
@@ -6,6 +6,16 @@ enum interest {
WriteInterest = 2,
};
+enum file_event_type {
+ FileWritten = 1 << 0,
+ LastEvent = 1 << 1,
+};
+
+struct file_event {
+ uint32_t mask;
+ uint32_t id;
+};
+
struct reactor;
struct reactor *reactor_create();
@@ -14,4 +24,7 @@ void reactor_update(struct reactor *reactor);
bool reactor_poll_event(struct reactor *reactor, uint32_t ev_id);
uint32_t reactor_register_interest(struct reactor *reactor, int fd,
enum interest interest);
+uint32_t reactor_watch_file(struct reactor *reactor, const char *path, uint32_t mask);
+void reactor_unwatch_file(struct reactor *reactor, uint32_t id);
+bool reactor_next_file_event(struct reactor *reactor, struct file_event *out);
void reactor_unregister_interest(struct reactor *reactor, uint32_t ev_id);