diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-08-13 21:25:09 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-08-13 21:25:09 +0000 |
commit | 4f0a5e7572a4257894b4bfede42c26d65152609e (patch) | |
tree | 21e3d5ee20716739590e5931859a4c2052161395 /avahi-core/hashmap.h | |
parent | d6d7d3769441b73ffb5b7af34fef823b41e66312 (diff) |
* strip glib from avahi-core
* implement glib memory allocator
* add new documentation file MALLOC
* initialize pseudo-RNG from /dev/urandom in avahi-daemon
* remove some gcc 4.0 warnings
* beef up watch system with real timeouts
* move GCC __attribute__ macros into its own header avahi-common/gccmacro.h
* make use of GCC's sentinel attribute where it make sense
* add malloc() implementations that abort on OOM and enable them by default
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@308 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/hashmap.h')
-rw-r--r-- | avahi-core/hashmap.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/avahi-core/hashmap.h b/avahi-core/hashmap.h index c3000ba..f546dfc 100644 --- a/avahi-core/hashmap.h +++ b/avahi-core/hashmap.h @@ -37,14 +37,19 @@ AvahiHashmap* avahi_hashmap_new(AvahiHashFunc hash_func, AvahiEqualFunc equal_fu void avahi_hashmap_free(AvahiHashmap *m); void* avahi_hashmap_lookup(AvahiHashmap *m, const void *key); void* avahi_hashmap_steal(AvahiHashmap *m, const void *key); -int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *data); -int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *data); +int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *value); +int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *value); void avahi_hashmap_remove(AvahiHashmap *m, const void *key); +typedef void (*AvahiHashmapForeachCallback)(void *key, void *value, void *userdata); + +void avahi_hashmap_foreach(AvahiHashmap *m, AvahiHashmapForeachCallback callback, void *userdata); + unsigned avahi_string_hash(const void *data); int avahi_string_equal(const void *a, const void *b); -unsigned avahi_domain_hash(const void *data); +unsigned avahi_int_hash(const void *data); +int avahi_int_equal(const void *a, const void *b); AVAHI_C_DECL_END |