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/prioq.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/prioq.h')
-rw-r--r-- | libavahi-core/prioq.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libavahi-core/prioq.h b/libavahi-core/prioq.h new file mode 100644 index 0000000..6b5babb --- /dev/null +++ b/libavahi-core/prioq.h @@ -0,0 +1,35 @@ +#ifndef fooprioqhfoo +#define fooprioqhfoo + +#include <glib.h> + +struct _AvahiPrioQueue; +typedef struct _AvahiPrioQueue AvahiPrioQueue; + +struct _AvahiPrioQueueNode; +typedef struct _AvahiPrioQueueNode AvahiPrioQueueNode; + +struct _AvahiPrioQueue { + AvahiPrioQueueNode *root, *last; + + guint n_nodes; + gint (*compare) (gconstpointer a, gconstpointer b); +}; + +struct _AvahiPrioQueueNode { + AvahiPrioQueue *queue; + gpointer data; + guint x, y; + + AvahiPrioQueueNode *left, *right, *parent, *next, *prev; +}; + +AvahiPrioQueue* avahi_prio_queue_new(gint (*compare) (gconstpointer a, gconstpointer b)); +void avahi_prio_queue_free(AvahiPrioQueue *q); + +AvahiPrioQueueNode* avahi_prio_queue_put(AvahiPrioQueue *q, gpointer data); +void avahi_prio_queue_remove(AvahiPrioQueue *q, AvahiPrioQueueNode *n); + +void avahi_prio_queue_shuffle(AvahiPrioQueue *q, AvahiPrioQueueNode *n); + +#endif |