#include <jabberdlib.h>
Namespaces | |
| namespace | xmppd |
Functions | |
| xht | xhash_new (int prima) |
| void | xhash_put (xht h, const char *key, void *val) |
| void * | xhash_get (xht h, const char *key) |
| void * | xhash_get_by_domain (xht h, const char *domain) |
| void | xhash_zap (xht h, const char *key) |
| void | xhash_free (xht h) |
| void | xhash_walk (xht h, xhash_walker w, void *arg) |
| xmlnode | xhash_to_xml (xht h) |
| xht | xhash_from_xml (xmlnode hash, pool p) |
| void xhash_free | ( | xht | h | ) |
free a xhash structure
| h | the xhash to free |
convert the xmlnode representation of an xhash back to an xhash
| hash | the xhash in xml notation |
References j_atoi(), NS_JABBERD_HASH, pstrdup(), xhash_free(), xhash_new(), xhash_put(), xmlnode_get_attrib_ns(), xmlnode_get_data(), xmlnode_get_list_item(), and xmlnode_get_tags().
Referenced by xdb_file_phandler().
| void* xhash_get | ( | xht | h, | |
| const char * | key | |||
| ) |
retrive a value from a xhash
| h | the xhash to get the value from | |
| key | which value to get |
| void* xhash_get_by_domain | ( | xht | h, | |
| const char * | domain | |||
| ) |
retrive a value from a xhash ... considering the key to be a domain
In contrast to xhash_get() this function interprets the key as a domain and checks all higher level domains, if the key is not found in the hash. If now higher level domains are found either, the key '*' is tried.
Example: For the domain 'a.example.com' the following lookups are done in this order until there is the first match: 'a.example.com', 'example.com', 'com', and '*'.
| h | the xhash to get the value from | |
| domain | the domain which should be used as the key |
References xmppd::xhash< value_type >::get_by_domain().
| xht xhash_new | ( | int | prima | ) |
create a new xhash hash collection
| prime | size of the hash (use a prime number!) |
Referenced by _js_authreg_register(), _pool_new(), acl_get_users(), configo(), configurate(), deliver_init(), dialback(), dnsrv(), js_packet(), js_sc_session_new(), js_session_new(), js_user(), jsm(), jutil_priority(), main(), mio_init(), mio_ssl_init(), xmppd::proxy65::proxy65::proxy65(), pthsock_client(), register_instance(), xmppd::resolver::resend_service::resend_service(), srv_lookup(), xdb_file(), xdb_sql(), and xhash_from_xml().
| void xhash_put | ( | xht | h, | |
| const char * | key, | |||
| void * | val | |||
| ) |
put an entry in the xhash
| h | the hash to insert the entry in | |
| key | with which key the value should be entered | |
| val | the value, that should be entered |
write the contents of an xhash to an xmlnode
| h | the xhash to be converted |
References NS_JABBERD_HASH, xhash_walk(), and xmlnode_new_tag_ns().
| void xhash_walk | ( | xht | h, | |
| xhash_walker | w, | |||
| void * | arg | |||
| ) |
iterate over a xhash strucutre
| h | the xhash to iterave over | |
| w | which function should be called for each value | |
| arg | what to pass to the optional argument of the xhash_walker function |
| void xhash_zap | ( | xht | h, | |
| const char * | key | |||
| ) |
remove an entry from the xhash
| h | the xhash where a value should be removed | |
| key | the key of the value, that should be removed |
1.5.5