00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef APR_HASH_H
00018 #define APR_HASH_H
00019 
00025 #include "apr_pools.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00047 #define APR_HASH_KEY_STRING     (-1)
00048 
00052 typedef struct apr_hash_t apr_hash_t;
00053 
00057 typedef struct apr_hash_index_t apr_hash_index_t;
00058 
00064 APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool);
00065 
00073 APR_DECLARE(apr_hash_t *) apr_hash_copy(apr_pool_t *pool,
00074                                         const apr_hash_t *h);
00075 
00084 APR_DECLARE(void) apr_hash_set(apr_hash_t *ht, const void *key,
00085                                apr_ssize_t klen, const void *val);
00086 
00094 APR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,
00095                                  apr_ssize_t klen);
00096 
00125 APR_DECLARE(apr_hash_index_t *) apr_hash_first(apr_pool_t *p, apr_hash_t *ht);
00126 
00133 APR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi);
00134 
00144 APR_DECLARE(void) apr_hash_this(apr_hash_index_t *hi, const void **key, 
00145                                 apr_ssize_t *klen, void **val);
00146 
00152 APR_DECLARE(unsigned int) apr_hash_count(apr_hash_t *ht);
00153 
00162 APR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p,
00163                                            const apr_hash_t *overlay, 
00164                                            const apr_hash_t *base);
00165 
00179 APR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p,
00180                                          const apr_hash_t *h1,
00181                                          const apr_hash_t *h2,
00182                                          void * (*merger)(apr_pool_t *p,
00183                                                      const void *key,
00184                                                      apr_ssize_t klen,
00185                                                      const void *h1_val,
00186                                                      const void *h2_val,
00187                                                      const void *data),
00188                                          const void *data);
00189 
00193 APR_POOL_DECLARE_ACCESSOR(hash);
00194 
00197 #ifdef __cplusplus
00198 }
00199 #endif
00200 
00201 #endif