jabberd14 1.6.2
Functions
jpacket.cc File Reference

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)

Detailed Description

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).


Function Documentation

jpacket jpacket_new ( xmlnode  x)

create a new jpacket by wrapping an xmlnode

Parameters:
xthe xmlnode that should be wrapped
Returns:
the newly created jpacket (NULL on failure)

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().

jpacket jpacket_reset ( jpacket  p)
int jpacket_subtype ( jpacket  p)