showlog: Show all host and service states by default
[nagios-reports-module.git] / hash.h
blob903fb2faffdd9b5bdc6ae75e411b9aa2b571a5e0
1 #ifndef _HASH_H_
2 #define _HASH_H_
3 #include <stdio.h>
5 struct hash_table;
6 typedef struct hash_table hash_table;
8 #define TABLE hash_table *table
9 extern unsigned int hash_get_max_entries(TABLE);
10 extern unsigned int hash_get_num_entries(TABLE);
11 extern unsigned int hash_table_size(TABLE);
12 extern hash_table *hash_init(unsigned int buckets);
13 extern void *hash_find(TABLE, const char *key);
14 extern void *hash_find2(TABLE, const char *k1, const char *k2);
15 extern int hash_add(TABLE, const char *key, void *data);
16 extern int hash_add2(TABLE, const char *k1, const char *k2, void *data);
17 extern int hash_add_unique(TABLE, const char *key, void *data);
18 extern int hash_add_unique2(TABLE, const char *k1, const char *k2, void *data);
19 extern void *hash_update(TABLE, const char *key, void *data);
20 extern void *hash_update2(TABLE, const char *k1, const char *k2, void *data);
21 extern void *hash_remove(TABLE, const char *key);
22 extern void *hash_remove2(TABLE, const char *k1, const char *k2);
23 extern void hash_remove_data(TABLE, const char *k1, const void *data);
24 extern void hash_remove_data2(TABLE, const char *k1, const char *k2, const void *data);
25 extern void hash_walk_data(TABLE, int (*walker)(void *data));
26 extern int hash_check_table(TABLE);
27 extern unsigned int hash_count_entries(TABLE);
28 #endif /* HASH_H */