aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/watch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/common/watch.h')
-rw-r--r--src/lib/common/watch.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/common/watch.h b/src/lib/common/watch.h
new file mode 100644
index 0000000..ca60155
--- /dev/null
+++ b/src/lib/common/watch.h
@@ -0,0 +1,34 @@
1#ifndef WATCH_H
2#define WATCH_H
3
4#include <dbus/dbus.h>
5
6#include <gnunet/platform.h>
7#include <gnunet/gnunet_common.h>
8#include <gnunet/gnunet_scheduler_lib.h>
9
10struct Watch;
11
12struct WatchIter
13{
14 struct WatchIter *next;
15 struct WatchIter *prev;
16
17 struct Watch *w;
18};
19
20struct Watch *watch_create (DBusWatch *watch);
21void watch_ref (struct Watch *w);
22void watch_unref (struct Watch *w);
23
24/*
25 * Schedule or schedule the scheduler to monitor dbus file descriptors.
26 */
27void watch_schedule (struct Watch *w);
28void watch_unschedule (struct Watch *w);
29void do_watch_unschedule (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
30
31struct WatchIter *watch_find (struct WatchIter *, DBusWatch *watch);
32
33#endif
34