This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Typedefs | |
| typedef Dict | Dict |
Functions | |
| Dict * | dict_create (long size_hint, void(*destroy_value)(void *)) |
| void | dict_destroy (Dict *dict) |
| void | dict_put (Dict *dict, Octstr *key, void *value) |
| int | dict_put_once (Dict *dict, Octstr *key, void *value) |
| void * | dict_get (Dict *dict, Octstr *key) |
| void * | dict_remove (Dict *dict, Octstr *key) |
| long | dict_key_count (Dict *dict) |
| List * | dict_keys (Dict *dict) |
|
|
|
|
||||||||||||
|
Definition at line 192 of file dict.c. References mutex_create, Dict::size, List::tab, and Dict::tab. Referenced by brunet_parse_body(), cfg_create(), clickatell_parse_body(), conn_pool_init(), create_group(), init_concat_handler(), init_reroute(), main(), parse_value_element(), port_init(), pushusers_create(), radius_acct_init(), run_smsbox(), server(), smasi_create(), smpp_create(), smsbox_start(), store_file_init(), urltrans_create(), wap_map_add_user(), wap_push_ppg_init(), wap_push_ppg_pushuser_list_add(), wml_init(), and xmlrpc_create_struct_value(). 00193 {
00194 Dict *dict;
00195 long i;
00196
00197 dict = gw_malloc(sizeof(*dict));
00198
00199 /*
00200 * Hash tables tend to work well until they are fill to about 50%.
00201 */
00202 dict->size = size_hint * 2;
00203
00204 dict->tab = gw_malloc(sizeof(dict->tab[0]) * dict->size);
00205 for (i = 0; i < dict->size; ++i)
00206 dict->tab[i] = NULL;
00207 dict->lock = mutex_create();
00208 dict->destroy_value = destroy_value;
00209 dict->key_count = 0;
00210
00211 return dict;
00212 }
|
|
Here is the call graph for this function:

|
||||||||||||
Here is the call graph for this function:

|
|
Definition at line 335 of file dict.c. References Dict::key_count, lock, result, and unlock. Referenced by boxc_status(), main(), proxy_thread(), run_smsbox(), server(), store_file_dump(), store_file_load(), store_file_messages(), xmlrpc_count_members(), and xmlrpc_print_struct(). 00336 {
00337 long result;
00338
00339 lock(dict);
00340 result = dict->key_count;
00341 unlock(dict);
00342
00343 return result;
00344 }
|
|
|
Definition at line 347 of file dict.c. References gwlist_append(), gwlist_create, gwlist_get(), gwlist_len(), Item, Item::key, lock, octstr_duplicate, Dict::size, Dict::tab, and unlock. Referenced by add_group(), cfg_dump(), clear_old_concat_parts(), do_dump(), do_queue_cleanup(), grp_dump(), io_thread(), run_smsbox(), store_file_load(), store_file_status(), and xmlrpc_print_struct(). 00348 {
00349 List *list;
00350 Item *item;
00351 long i, j;
00352
00353 list = gwlist_create();
00354
00355 lock(dict);
00356 for (i = 0; i < dict->size; ++i) {
00357 if (dict->tab[i] == NULL)
00358 continue;
00359 for (j = 0; j < gwlist_len(dict->tab[i]); ++j) {
00360 item = gwlist_get(dict->tab[i], j);
00361 gwlist_append(list, octstr_duplicate(item->key));
00362 }
00363 }
00364 unlock(dict);
00365
00366 return list;
00367 }
|
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 271 of file dict.c. References dict_put_true(), and handle_null_value(). Referenced by init_reroute(), init_smsbox_routes(), pap_request_thread(), parse_struct_element(), and xmlrpc_add_member(). 00272 {
00273 int ret;
00274
00275 ret = 1;
00276 if (handle_null_value(dict, key, value))
00277 return 1;
00278 if (dict_put_true(dict, key, value)) {
00279 ret = 1;
00280 } else {
00281 ret = 0;
00282 }
00283 return ret;
00284 }
|
Here is the call graph for this function:

|
||||||||||||
Here is the call graph for this function:
