#ifndef INCL_UTIL_XHASH_H
#define INCL_UTIL_XHASH_H 1
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "pool.h"
typedef struct xhn_struct
{
struct xhn_struct *next;
const char *key;
void *val;
} *xhn, _xhn;
typedef struct xht_struct
{
pool_t p;
int prime;
int dirty;
int count;
struct xhn_struct *zen;
int iter_bucket;
xhn iter_node;
} *xht, _xht;
typedef void (*xhash_walker_t)(xht h, const char *key, void *val, void *arg);
JABBERD2_API xht xhash_new(int prime);
JABBERD2_API void xhash_put(xht h, const char *key, void *val);
JABBERD2_API void xhash_putx(xht h, const char *key, int len, void *val);
JABBERD2_API void *xhash_get(xht h, const char *key);
JABBERD2_API void *xhash_getx(xht h, const char *key, int len);
JABBERD2_API void xhash_zap(xht h, const char *key);
JABBERD2_API void xhash_zapx(xht h, const char *key, int len);
JABBERD2_API void xhash_free(xht h);
typedef void (*xhash_walker)(xht h, const char *key, void *val, void *arg);
JABBERD2_API void xhash_walk(xht h, xhash_walker w, void *arg);
JABBERD2_API int xhash_dirty(xht h);
JABBERD2_API int xhash_count(xht h);
JABBERD2_API pool_t xhash_pool(xht h);
JABBERD2_API int xhash_iter_first(xht h);
JABBERD2_API int xhash_iter_next(xht h);
JABBERD2_API void xhash_iter_zap(xht h);
JABBERD2_API int xhash_iter_get(xht h, const char **key, void **val);
#endif