33 #define uri_PUBSUB "http://jabber.org/protocol/pubsub" 81 if(mod->
init)
return 0;
pkt_type_t type
packet type
int sm_register_ns(sm_t sm, const char *uri)
register a new global ns
jid_t jid
session jid (user@host/res)
int nad_append_attr(nad_t nad, int ns, const char *name, const char *val)
attach new attr to the last elem
data structures and prototypes for the session manager
const char * jid_user(jid_t jid)
expand and return the user
const char * jid_full(jid_t jid)
expand and return the full
single instance of a module in a chain
int init
number of times the module intialiser has been called
static mod_ret_t _pep_out_sess(mod_instance_t mi, sess_t sess, pkt_t pkt)
mod_ret_t(* out_sess)(mod_instance_t mi, sess_t sess, pkt_t pkt)
out-sess handler
int nad_append_elem(nad_t nad, int ns, const char *name, int depth)
create a new elem on the list
mod_ret_t(* in_sess)(mod_instance_t mi, sess_t sess, pkt_t pkt)
in-sess handler
module_t mod
module that this is an instance of
jid_t from
packet addressing (not used for routing)
packet summary data wrapper
nad_t nad
nad of the entire packet
void feature_register(sm_t sm, const char *feature)
register a feature
packet was unhandled, should be passed to the next module
There is one instance of this struct per user who is logged in to this c2s instance.
int jid_compare_user(jid_t a, jid_t b)
compare the user portion of two jids
int nad_find_elem(nad_t nad, unsigned int elem, int ns, const char *name, int depth)
locate the next elem at a given depth with an optional matching name
mod_ret_t
module return values
DLLEXPORT int module_init(mod_instance_t mi, const char *arg)
static mod_ret_t _pep_in_sess(mod_instance_t mi, sess_t sess, pkt_t pkt)
int nad_find_scoped_namespace(nad_t nad, const char *uri, const char *prefix)
find a namespace in scope