99 if(mod->
init)
return 0;
pkt_type_t type
packet type
jid_t jid
session jid (user@host/res)
data structures and prototypes for the session manager
const char * jid_full(jid_t jid)
expand and return the full
single instance of a module in a chain
static mod_ret_t _deliver_pkt_user(mod_instance_t mi, user_t user, pkt_t pkt)
int init
number of times the module intialiser has been called
#define stanza_err_FEATURE_NOT_IMPLEMENTED
DLLEXPORT int module_init(mod_instance_t mi, const char *arg)
void nad_set_attr(nad_t nad, int elem, int ns, const char *name, const char *val, int vallen)
create, update, or zap any matching attr on this elem
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 jid_free(jid_t jid)
free a jid
mod_ret_t(* pkt_user)(mod_instance_t mi, user_t user, pkt_t pkt)
pkt-user handler
void pkt_router(pkt_t pkt)
void feature_register(sm_t sm, const char *feature)
register a feature
static mod_ret_t _deliver_in_sess(mod_instance_t mi, sess_t sess, pkt_t pkt)
sess_t sess_match(user_t user, const char *resource)
match a session by resource
packet was unhandled, should be passed to the next module
packet was handled (and freed)
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
jid_t jid_dup(jid_t jid)
duplicate a jid
mod_ret_t
module return values
#define stanza_err_SERVICE_UNAVAILABLE
void pkt_sess(pkt_t pkt, sess_t sess)