|
jabberd14 1.6.2
|
a jpacket is a wrapper around an xmlnode that contains an XMPP stanza More...
#include <jabberdlib.h>Functions | |
| jpacket | jpacket_new (xmlnode x) |
| jpacket | jpacket_reset (jpacket p) |
| int | jpacket_subtype (jpacket p) |
a jpacket is a wrapper around an xmlnode that contains an XMPP stanza
A jpacket adds some variables to an xmlnode that contains a stanza, so that jabberd is able to cache information on the stanza type (message, presence, iq) that is contained in this jpacket and to further classify the presence stanzas. It also adds some pointers to important data inside the xmlnode, that has to be accessed often (e.g. sender and receiver of a stanza).
create a new jpacket by wrapping an xmlnode
| x | the xmlnode that should be wrapped |
References jpacket_reset(), pmalloc(), jpacket_struct::x, and xmlnode_pool().
Referenced by _js_routed_packet(), dialback_miod_read(), js_bounce_xmpp(), js_mapi_create_additional_iq_result(), js_packet(), and xmppd::instance_base::on_stanza_packet().
recalculate the information the jpacket holds about the stanza
| p | the packet that should get its information recalculated |
References jpacket_struct::from, jpacket_struct::iq, jpacket_struct::iqns, jid_new(), JPACKET__AVAILABLE, JPACKET__ERROR, JPACKET__INVISIBLE, JPACKET__PROBE, JPACKET__UNAVAILABLE, JPACKET_IQ, JPACKET_MESSAGE, JPACKET_PRESENCE, JPACKET_S10N, JPACKET_UNKNOWN, NS_SERVER, NTYPE_TAG, jpacket_struct::p, pstrdup(), jpacket_struct::subtype, jpacket_struct::to, xmlnode_t::type, jpacket_struct::type, jpacket_struct::x, xmlnode_get_attrib_ns(), xmlnode_get_firstchild(), xmlnode_get_localname(), xmlnode_get_namespace(), xmlnode_get_nextsibling(), xmlnode_hide_attrib_ns(), and xmlnode_pool().
Referenced by _js_routed_auth_packet(), _js_session_from(), and jpacket_new().
| int jpacket_subtype | ( | jpacket | p | ) |
get the subtype of a jpacket
| p | the jpacket for which the caller wants to know the subtype |
References j_strcmp(), JPACKET__CHAT, JPACKET__ERROR, JPACKET__GET, JPACKET__GROUPCHAT, JPACKET__HEADLINE, JPACKET__NONE, JPACKET__RESULT, JPACKET__SET, JPACKET__SUBSCRIBE, JPACKET__SUBSCRIBED, JPACKET__UNKNOWN, JPACKET__UNSUBSCRIBE, JPACKET__UNSUBSCRIBED, JPACKET_IQ, JPACKET_MESSAGE, JPACKET_S10N, jpacket_struct::subtype, jpacket_struct::type, jpacket_struct::x, and xmlnode_get_attrib_ns().
Referenced by _js_authreg_auth(), _js_authreg_register(), _js_session_from(), _js_session_to(), js_authreg(), js_mapi_create_additional_iq_result(), and js_online().
1.7.4