diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-05-06 15:31:30 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-05-06 15:31:30 +0000 |
commit | f93eca3530bef2cc23ffe6c3a04493ad171c2aed (patch) | |
tree | b1053873411a868b751d7471cd4cb02fa54ed29a /libavahi-core/timeeventq.h | |
parent | 42c9b99f2bb21d0ff1f1918314f9d5dd82a62763 (diff) |
move the sources to libavahi-core/
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@50 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'libavahi-core/timeeventq.h')
-rw-r--r-- | libavahi-core/timeeventq.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libavahi-core/timeeventq.h b/libavahi-core/timeeventq.h new file mode 100644 index 0000000..69ff860 --- /dev/null +++ b/libavahi-core/timeeventq.h @@ -0,0 +1,36 @@ +#ifndef footimeeventqhfoo +#define footimeeventqhfoo + +typedef struct _AvahiTimeEventQueue AvahiTimeEventQueue; +typedef struct _AvahiTimeEvent AvahiTimeEvent; + +#include "prioq.h" + +struct _AvahiTimeEvent { + AvahiTimeEventQueue *queue; + AvahiPrioQueueNode *node; + GTimeVal expiry; + void (*callback)(AvahiTimeEvent *e, void *userdata); + void *userdata; +}; + +struct _AvahiTimeEventQueue { + GSource source; + AvahiPrioQueue *prioq; +}; + +AvahiTimeEventQueue* avahi_time_event_queue_new(GMainContext *context, gint priority); +void avahi_time_event_queue_free(AvahiTimeEventQueue *q); + +AvahiTimeEvent* avahi_time_event_queue_add(AvahiTimeEventQueue *q, const GTimeVal *timeval, void (*callback)(AvahiTimeEvent *e, void *userdata), void *userdata); +void avahi_time_event_queue_remove(AvahiTimeEventQueue *q, AvahiTimeEvent *e); + +void avahi_time_event_queue_update(AvahiTimeEventQueue *q, AvahiTimeEvent *e, const GTimeVal *timeval); + +AvahiTimeEvent* avahi_time_event_queue_root(AvahiTimeEventQueue *q); +AvahiTimeEvent* avahi_time_event_next(AvahiTimeEvent *e); + + + + +#endif |