diff options
Diffstat (limited to 'src/lib/common/watch.h')
-rw-r--r-- | src/lib/common/watch.h | 34 |
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 | |||
10 | struct Watch; | ||
11 | |||
12 | struct WatchIter | ||
13 | { | ||
14 | struct WatchIter *next; | ||
15 | struct WatchIter *prev; | ||
16 | |||
17 | struct Watch *w; | ||
18 | }; | ||
19 | |||
20 | struct Watch *watch_create (DBusWatch *watch); | ||
21 | void watch_ref (struct Watch *w); | ||
22 | void watch_unref (struct Watch *w); | ||
23 | |||
24 | /* | ||
25 | * Schedule or schedule the scheduler to monitor dbus file descriptors. | ||
26 | */ | ||
27 | void watch_schedule (struct Watch *w); | ||
28 | void watch_unschedule (struct Watch *w); | ||
29 | void do_watch_unschedule (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
30 | |||
31 | struct WatchIter *watch_find (struct WatchIter *, DBusWatch *watch); | ||
32 | |||
33 | #endif | ||
34 | |||