|
HOME
SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port
FAQ
Documentation
Licensing
Download
Development (Trac)
Projects using pjsip
Mailing List
Open Source Links
About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono <bennylp pjsip.org>
|
|
Home --> Documentations --> PJLIB Reference
hash.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PJ_HASH_H__
00021 #define __PJ_HASH_H__
00022
00028 #include <pj/types.h>
00029
00030 PJ_BEGIN_DECL
00031
00046 #define PJ_HASH_KEY_STRING ((unsigned)-1)
00047
00051 #define PJ_HASH_ENTRY_BUF_SIZE (3*sizeof(void*) + 2*sizeof(pj_uint32_t))
00052
00056 typedef void *pj_hash_entry_buf[(PJ_HASH_ENTRY_BUF_SIZE+sizeof(void*)-1)/(sizeof(void*))];
00057
00069 PJ_DECL(pj_uint32_t) pj_hash_calc(pj_uint32_t hval,
00070 const void *key, unsigned keylen);
00071
00072
00084 PJ_DECL(pj_uint32_t) pj_hash_calc_tolower(pj_uint32_t hval,
00085 char *result,
00086 const pj_str_t *key);
00087
00096 PJ_DECL(pj_hash_table_t*) pj_hash_create(pj_pool_t *pool, unsigned size);
00097
00098
00113 PJ_DECL(void *) pj_hash_get( pj_hash_table_t *ht,
00114 const void *key, unsigned keylen,
00115 pj_uint32_t *hval );
00116
00117
00139 PJ_DECL(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht,
00140 const void *key, unsigned keylen, pj_uint32_t hval,
00141 void *value );
00142
00143
00162 PJ_DECL(void) pj_hash_set_np(pj_hash_table_t *ht,
00163 const void *key, unsigned keylen,
00164 pj_uint32_t hval, pj_hash_entry_buf entry_buf,
00165 void *value);
00166
00174 PJ_DECL(unsigned) pj_hash_count( pj_hash_table_t *ht );
00175
00176
00185 PJ_DECL(pj_hash_iterator_t*) pj_hash_first( pj_hash_table_t *ht,
00186 pj_hash_iterator_t *it );
00187
00188
00197 PJ_DECL(pj_hash_iterator_t*) pj_hash_next( pj_hash_table_t *ht,
00198 pj_hash_iterator_t *it );
00199
00208 PJ_DECL(void*) pj_hash_this( pj_hash_table_t *ht,
00209 pj_hash_iterator_t *it );
00210
00211
00216 PJ_END_DECL
00217
00218 #endif
00219
00220
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|
|