summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/hashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/hashmap.h')
-rw-r--r--src/pulsecore/hashmap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index 3f62adb1..b8a358ec 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -22,6 +22,8 @@
USA.
***/
+#include <pulsecore/idxset.h>
+
/* Simple Implementation of a hash table. Memory management is the
* user's job. It's a good idea to have the key pointer point to a
* string in the value data. */
@@ -29,7 +31,7 @@
typedef struct pa_hashmap pa_hashmap;
/* Create a new hashmap. Use the specified functions for hashing and comparing objects in the map */
-pa_hashmap *pa_hashmap_new(unsigned (*hash_func) (const void *p), int (*compare_func) (const void*a, const void*b));
+pa_hashmap *pa_hashmap_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func);
/* Free the hash table. Calls the specified function for every value in the table. The function may be NULL */
void pa_hashmap_free(pa_hashmap*, void (*free_func)(void *p, void *userdata), void *userdata);
@@ -50,4 +52,8 @@ unsigned pa_hashmap_size(pa_hashmap *h);
is returned. */
void *pa_hashmap_iterate(pa_hashmap *h, void **state, const void**key);
+void *pa_hashmap_steal_first(pa_hashmap *h);
+
+void *pa_hashmap_get_first(pa_hashmap *h);
+
#endif