Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "gwlib.h"
Go to the source code of this file.
Data Structures | |
struct | Item |
struct | Dict |
Typedefs | |
typedef struct Item | Item |
Functions | |
static Item * | item_create (Octstr *key, void *value) |
static void | item_destroy (void *item) |
static int | item_has_key (void *item, void *key) |
static void | lock (Dict *dict) |
static void | unlock (Dict *dict) |
static long | key_to_index (Dict *dict, Octstr *key) |
static int | handle_null_value (Dict *dict, Octstr *key, void *value) |
static int | dict_put_true (Dict *dict, Octstr *key, void *value) |
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) |
Dict * | dict_duplicate (Dict *dict, void *(*duplicate_value)(void *)) |
long | dict_traverse (Dict *dict, void(*func)(Octstr *, void *, void *), void *data) |
long | dict_traverse_sorted (Dict *dict, int(*cmp)(const void *, const void *), void(*func)(Octstr *, void *, void *), void *data) |
Dict* dict_create | ( | long | size_hint, |
void(*)(void *) | destroy_value | ||
) |
Definition at line 192 of file dict.c.
References Dict::destroy_value, Dict::key_count, Dict::lock, mutex_create, Dict::size, and Dict::tab.
Referenced by boxc_create(), brunet_parse_body(), cfg_create(), clickatell_parse_body(), concat_handling_init(), conn_pool_init(), create_group(), dict_duplicate(), init_reroute(), init_smsc_routes(), main(), meta_data_merge(), meta_data_set_value(), meta_data_unpack(), parse_value_element(), port_init(), pushusers_create(), radius_acct_init(), run_smsbox(), server(), smasi_create(), smpp_create(), smpp_pdu_init(), smpp_tlv_add_constant(), smsbox_restart(), 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().
void dict_destroy | ( | Dict * | dict | ) |
Definition at line 215 of file dict.c.
References Dict::destroy_value, gwlist_destroy(), gwlist_extract_first(), item_destroy(), Dict::lock, mutex_destroy(), Dict::size, Dict::tab, and Item::value.
Referenced by boxc_destroy(), brunet_parse_reply(), cfg_destroy(), clickatell_parse_reply(), concat_handling_cleanup(), conn_pool_shutdown(), destroy_group(), destroy_smsc_routes(), main(), meta_data_destroy(), meta_data_set_values(), msg_to_pdu(), port_shutdown(), radius_acct_shutdown(), run_smsbox(), smasi_destroy(), smpp_destroy(), smpp_pdu_init(), smpp_pdu_shutdown(), smsbox_restart(), smsboxc_run(), smscconn_destroy(), smscconn_reconfig(), store_dumper(), urltrans_destroy(), wap_map_user_destroy(), wap_push_ppg_pushuser_list_destroy(), wap_push_ppg_shutdown(), wml_shutdown(), and xmlrpc_value_destroy().
Definition at line 370 of file dict.c.
References Dict::destroy_value, dict_create(), dict_put(), gwlist_get(), gwlist_len(), Item::key, lock(), Dict::size, Dict::tab, unlock(), and Item::value.
Definition at line 286 of file dict.c.
References gwlist_search(), item_has_key(), key_to_index(), lock(), Dict::tab, unlock(), and Item::value.
Referenced by add_group(), bearerbox_to_smpp(), boxc_receiver(), boxc_route_msg_to_smsc(), brunet_parse_reply(), cfg_get_group_checksum(), cfg_get_multi_group(), cfg_get_real(), cfg_get_single_group(), check_multipart(), clickatell_parse_reply(), concat_handling_check_and_handle(), concat_handling_clear_old_parts(), conn_pool_get(), do_dump(), do_queue_cleanup(), handle_pdu(), main(), meta_data_merge(), meta_data_pack(), meta_data_set_value(), meta_data_set_values(), oneuser_add(), parse_attribute(), parse_element(), port_add(), port_get_fdset(), port_get_request(), port_put_request(), port_set_timeout(), radius_acct_get_msisdn(), radius_get_attribute(), route_incoming_to_boxc(), route_incoming_to_smsc(), run_smsbox(), send_push_response(), smpp_pdu_init(), smpp_tlv_add_constant(), smpp_tlv_get_by_name(), smpp_tlv_get_by_tag(), store_file_for_each_message(), update_table(), update_tables(), urltrans_add_one(), urltrans_find_service(), user_find_by_username(), wap_map_user(), wap_push_ppg_pushuser_authenticate(), xmlrpc_get_member(), and xmlrpc_print_struct().
long dict_key_count | ( | Dict * | dict | ) |
Definition at line 335 of file dict.c.
References Dict::key_count, lock(), 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().
Definition at line 347 of file dict.c.
References gwlist_append(), gwlist_create, gwlist_get(), gwlist_len(), Item::key, lock(), octstr_duplicate, Dict::size, Dict::tab, and unlock().
Referenced by add_group(), cfg_dump(), cfg_get_group_checksum(), concat_handling_clear_old_parts(), do_dump(), do_queue_cleanup(), grp_dump(), io_thread(), main(), meta_data_merge(), meta_data_pack(), meta_data_set_values(), run_smsbox(), smpp_tlv_add_constant(), store_file_for_each_message(), store_file_load(), and xmlrpc_print_struct().
Definition at line 240 of file dict.c.
References Dict::destroy_value, dict_remove(), gwlist_append(), gwlist_create, gwlist_search(), item_create(), item_has_key(), Dict::key_count, key_to_index(), lock(), Dict::tab, unlock(), and Item::value.
Referenced by add_group(), attr_dict_construct(), bearerbox_to_smpp(), boxc_sent_push(), brunet_parse_body(), cfg_set(), check_multipart(), clickatell_parse_body(), concat_handling_check_and_handle(), concat_handling_clear_old_parts(), dict_duplicate(), handle_pdu(), main(), meta_data_merge(), meta_data_remove_value(), meta_data_set_value(), meta_data_unpack(), oneuser_add(), pap_request_thread(), port_add(), send_messages(), smpp_pdu_init(), smpp_tlv_add_constant(), smsbox_req_handle(), smsbox_req_sendota(), smsbox_sendota_post(), store_to_dict(), update_table(), update_tables(), urltrans_add_one(), wap_map_add_user(), wap_push_ppg_pushuser_authenticate(), and wml_init().
Definition at line 271 of file dict.c.
References dict_put_true(), and handle_null_value().
Referenced by boxc_receiver(), init_reroute(), init_smsbox_routes(), init_smsc_routes(), meta_data_merge(), meta_data_set_values(), pap_request_thread(), parse_struct_element(), smpp_pdu_init(), and xmlrpc_add_member().
Definition at line 154 of file dict.c.
References Dict::destroy_value, gwlist_append(), gwlist_create, gwlist_search(), item_create(), item_has_key(), Dict::key_count, key_to_index(), lock(), Dict::tab, and unlock().
Referenced by dict_put_once().
Definition at line 307 of file dict.c.
References gw_assert(), gwlist_destroy(), gwlist_extract_matching(), gwlist_get(), gwlist_len(), item_destroy(), item_has_key(), Dict::key_count, key_to_index(), lock(), Dict::tab, unlock(), and Item::value.
Referenced by boxc_sent_pop(), concat_handling_clear_old_parts(), delayed_http_reply(), dict_put(), do_queue_cleanup(), handle_null_value(), handle_pdu(), io_thread(), meta_data_get_value(), port_remove(), run_smsbox(), send_push_response(), smsbox_req_handle(), smsbox_req_sendota(), smsbox_sendota_post(), store_file_load(), store_to_dict(), update_table(), update_tables(), and wap_push_ppg_pushuser_authenticate().
Definition at line 392 of file dict.c.
References gwlist_get(), gwlist_len(), Item::key, lock(), Dict::size, Dict::tab, unlock(), and Item::value.
long dict_traverse_sorted | ( | Dict * | dict, |
int(*)(const void *, const void *) | cmp, | ||
void(*)(Octstr *, void *, void *) | func, | ||
void * | data | ||
) |
Definition at line 413 of file dict.c.
References gwlist_append(), gwlist_consume(), gwlist_create, gwlist_destroy(), gwlist_get(), gwlist_len(), gwlist_sort(), Item::key, lock(), Dict::size, Dict::tab, unlock(), and Item::value.
Definition at line 142 of file dict.c.
References Dict::destroy_value, and dict_remove().
Referenced by dict_put_once().
Definition at line 81 of file dict.c.
References Item::key, octstr_duplicate, and Item::value.
Referenced by dict_put(), and dict_put_true().
|
static |
Definition at line 91 of file dict.c.
References Item::key, and octstr_destroy().
Referenced by dict_destroy(), dict_remove(), and gw_prioqueue_destroy().
|
static |
Definition at line 101 of file dict.c.
References octstr_compare().
Referenced by dict_get(), dict_put(), dict_put_true(), and dict_remove().
Definition at line 137 of file dict.c.
References octstr_hash_key(), and Dict::size.
Referenced by dict_get(), dict_put(), dict_put_true(), and dict_remove().
|
static |
Definition at line 125 of file dict.c.
References Dict::lock, and mutex_lock.
Referenced by dict_duplicate(), dict_get(), dict_key_count(), dict_keys(), dict_put(), dict_put_true(), dict_remove(), dict_traverse(), and dict_traverse_sorted().
|
static |
Definition at line 131 of file dict.c.
References Dict::lock, and mutex_unlock.
Referenced by dict_duplicate(), dict_get(), dict_key_count(), dict_keys(), dict_put(), dict_put_true(), dict_remove(), dict_traverse(), and dict_traverse_sorted().