summaryrefslogtreecommitdiffstats
path: root/libavahi-core/prioq.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavahi-core/prioq.h')
-rw-r--r--libavahi-core/prioq.h35
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