#include "jsm.h"
Functions | |
| void | js_bounce_xmpp (jsmi si, session s, xmlnode x, xterror xterr) |
| xmlnode | js_config (jsmi si, const char *query, const char *lang) |
| int | js_islocal (jsmi si, jid id) |
| jid | js_trustees (udata u) |
| jid | js_seen_jids (udata u) |
| void | js_remove_trustee (udata u, jid id) |
| void | js_remove_seen (udata u, jid id) |
| int | _js_jidscanner (jid id, jid match) |
| int | js_trust (udata u, jid id) |
| int | js_seen (udata u, jid id) |
| int | js_online (mapi m) |
this tries to be a smarter jid matcher, where a "host" matches any "user@host" and "user@host" matches "user@host/resource"
| id | the jid that should be checked | |
| match | the jid that should be matched |
References xmppd::jabberid::get_domain(), xmppd::jabberid::get_node(), xmppd::jabberid::get_resource(), xmppd::jabberid::has_node(), and xmppd::jabberid::has_resource().
Referenced by js_seen(), and js_trust().
generate an error packet, that bounces a packet back to the server
| si | the session manger instance | |
| s | the session this bounce is related to (for selecting the right filters), NULL if not related to any session | |
| x | the xmlnode for which the bounce packet should be generated | |
| xterr | the reason for the bounce |
References xterror_struct::code, jpacket_struct::flag, j_strcmp(), jpacket_new(), js_deliver(), jutil_error_xmpp(), jutil_iqresult(), log_debug2, LOGT_DELIVER, xterror_struct::msg, NS_SERVER, PACKET_PASS_FILTERS_MAGIC, xmlnode_free(), xmlnode_get_attrib(), xmlnode_get_localname(), xmlnode_get_namespace(), xmlnode_insert_cdata(), xmlnode_insert_tag_ns(), xmlnode_put_attrib_ns(), xmlnode_serialize_string(), and ZONE.
Referenced by js_deliver(), js_offline_main(), and js_server_main().
get a configuration node inside the session manager configuration
| si | the session manager instance data | |
| query | the path through the tag hierarchy of the desired tag, eg. for the conf file <foo><bar>bar value</bar><baz/></foo> use "foo/bar" to retrieve the bar node, may be NULL to get the root node of the jsm config | |
| lang | the prefered language, NULL for no prefered language |
References jid_new(), js_config(), log_debug2, LOGT_CONFIG, NS_JABBERD_CONFIG_JSM, pool_free(), pool_new, jsmi_struct::std_namespace_prefixes, jsmi_struct::xc, xdb_get(), xmlnode_get_tags(), xmlnode_select_by_lang(), and ZONE.
Referenced by _js_authreg_register(), js_config(), js_packet(), jsm(), mod_auth_crypt(), mod_auth_digest(), mod_auth_plain(), mod_last(), mod_log(), mod_offline(), mod_presence(), mod_version(), and mod_xml().
macro to make sure the jid is a local user
| si | the session manager instance data | |
| id | the user to test |
References xmppd::jabberid::get_domain(), xmppd::jabberid::has_node(), jsmi_struct::hosts, and xhash_get().
Referenced by js_server_main().
| int js_online | ( | mapi | m | ) |
check if a mapi call is for the "online" event
sucks, should just rewrite the whole mapi to make things like this better
| m | the mapi call |
References JPACKET__AVAILABLE, JPACKET__INVISIBLE, jpacket_subtype(), mapi_struct::packet, session_struct::priority, mapi_struct::s, and jpacket_struct::to.
remove a user from the list of seen users
| u | from which user's seen list the user 'id' should be removed | |
| id | which user should be removed |
References jid_cmpx(), JID_SERVER, JID_USER, xmppd::jabberid_pool::next, and udata_struct::useen.
remove a user from the list of trustees
| u | from which user's trustees list the user 'id' should be removed | |
| id | which user should be removed |
References jid_cmpx(), JID_SERVER, JID_USER, xmppd::jabberid_pool::next, and udata_struct::utrust.
check if a id is seen (allowed to send presence to a user)
| u | the user for which the check should be made | |
| id | the jid which should be checked if it is trusted |
References _js_jidscanner(), and js_seen_jids().
get the list of jids, that are allowed to send presence to a given user
| u | for which user to get the list |
References udata_struct::useen.
Referenced by js_seen().
check if a id is trusted (allowed to see the presence of a user)
| u | the user for which the check should be made | |
| id | the jid which should be checked if it is trusted |
References _js_jidscanner(), acl_check_access(), ADMIN_SHOWPRES, js_trustees(), udata_struct::si, and jsmi_struct::xc.
get the list of jids, that are subscribed to a given user
| u | for which user to get the list |
References udata_struct::utrust.
Referenced by js_trust().
1.5.5