diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-01-21 00:16:08 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-01-21 00:16:08 +0000 |
commit | 0781d5363fb6fd723a2316fc7558aef6439b2f71 (patch) | |
tree | f6a942889c55230611d4472c21a7075a7c2fc609 /timeeventq.h | |
parent | d6e2dbabccb08970da991e6d2b0fda7a56d83e6f (diff) |
massive work
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@8 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'timeeventq.h')
-rw-r--r-- | timeeventq.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/timeeventq.h b/timeeventq.h new file mode 100644 index 0000000..8fd5c02 --- /dev/null +++ b/timeeventq.h @@ -0,0 +1,30 @@ +#ifndef footimeeventqhfoo +#define footimeeventqhfoo + +typedef struct _flxTimeEventQueue flxTimeEventQueue; +typedef struct _flxTimeEvent flxTimeEvent; + +#include "prioq.h" + +struct _flxTimeEvent { + flxTimeEventQueue *queue; + flxPrioQueueNode *node; + GTimeVal expiry; + void (*callback)(flxTimeEvent *e, void *userdata); + void *userdata; +}; + +struct _flxTimeEventQueue { + GSource source; + flxPrioQueue *prioq; +}; + +flxTimeEventQueue* flx_time_event_queue_new(GMainContext *context); +void flx_time_event_queue_free(flxTimeEventQueue *q); + +flxTimeEvent* flx_time_event_queue_add(flxTimeEventQueue *q, const GTimeVal *timeval, void (*callback)(flxTimeEvent *e, void *userdata), void *userdata); +void flx_time_event_queue_remove(flxTimeEventQueue *q, flxTimeEvent *e); + +void flx_time_event_update(flxTimeEventQueue *q, flxTimeEvent *e, const GTimeVal *timeval); + +#endif |