#include "jabberd.h"
Functions | |
| xdbcache | xdb_cache (instance id) |
| xmlnode | xdb_get (xdbcache xc, jid owner, const char *ns) |
| int | xdb_act (xdbcache xc, jid owner, const char *ns, char *act, char *match, xmlnode data) |
| int | xdb_act_path (xdbcache xc, jid owner, const char *ns, char const *act, char const *matchpath, xht namespaces, xmlnode data) |
| int | xdb_set (xdbcache xc, jid owner, const char *ns, xmlnode data) |
sends new xml action, returns non-zero if failure
Referenced by _js_session_to().
| int xdb_act_path | ( | xdbcache | xc, | |
| jid | owner, | |||
| const char * | ns, | |||
| char const * | act, | |||
| char const * | matchpath, | |||
| xht | namespaces, | |||
| xmlnode | data | |||
| ) |
create an xdbcache for the specified instance
This creates the _xdbcache structure from the memory pool of the instance, and registers two handlers: One handler is registered to get/handle the xdb responses that are delivered to the instance. The other handler is registered to get called regularily every 10 seconds.
References xdbcache_struct::i, xdbcache_struct::mutex, xdbcache_struct::next, o_PRECOND, instance_struct::p, pmalloco(), xdbcache_struct::prev, register_beat(), and register_phandler().
Referenced by dialback(), dnsrv(), jsm(), pthsock_client(), xdb_file(), and xdb_sql().
query data from the xdb
blocks until namespace is retrieved, host must map back to this service!
| xc | the xdbcache used for this query | |
| owner | for which JID the query should be made | |
| ns | which namespace to query |
References xdbcache_struct::cond, xdbcache_struct::data, xdbcache_struct::i, xdbcache_struct::id, jid_full(), log_debug2, LOGT_STORAGE, LOGT_THREAD, xdbcache_struct::mutex, xdbcache_struct::next, xdbcache_struct::ns, NTYPE_TAG, xdbcache_struct::owner, xdbcache_struct::preblock, xdbcache_struct::prev, xdbcache_struct::sent, xdbcache_struct::set, xmlnode_free(), xmlnode_get_firstchild(), xmlnode_get_nextsibling(), xmlnode_get_type(), and ZONE.
Referenced by _js_authreg_register(), dialback(), dnsrv(), js_config(), js_user(), pthsock_client(), xdb_file(), and xdb_sql().
sends new xml to replace old, returns non-zero if failure
1.5.5