|
jabberd14
1.6.2
|
handles presences: send to subscribers, send offline on session end, probe for subscribed presences More...
#include "jsm.h"Data Structures | |
| struct | modpres_conf_struct |
| hold configuration data for this module instance More... | |
| struct | modpres_struct |
| hold all data belonging to this module and a single (online) user More... | |
Typedefs | |
| typedef struct modpres_conf_struct * | modpres_conf |
| hold configuration data for this module instance | |
| typedef struct modpres_conf_struct | _modpres_conf |
| typedef struct modpres_struct * | modpres |
| hold all data belonging to this module and a single (online) user | |
| typedef struct modpres_struct | _modpres |
Functions | |
| void | mod_presence (jsmi si) |
handles presences: send to subscribers, send offline on session end, probe for subscribed presences
This module is responsible for sending presences to all contacts that subscribed to the user's presence. It will send an unavailable presence to everybudy that got an available presence. It will send probes to the contacts to which we have subscribed presence.
This module is NOT responsible for handling subscriptions, they are handled in mod_roster.c.
We have three sets of jids for each user:
action points:
| typedef struct modpres_struct _modpres |
| typedef struct modpres_conf_struct _modpres_conf |
| typedef struct modpres_struct * modpres |
hold all data belonging to this module and a single (online) user
This structure holds the A and I (see description of mod_presence.c) list for a user, a flag if a user is invisible, and a list of JIDs we have to send a blind carbon copy of each presence
| typedef struct modpres_conf_struct * modpres_conf |
hold configuration data for this module instance
This structure holds all information about the configuration of this module.
| void mod_presence | ( | jsmi | si | ) |
init the module, register callbacks
builds a list of JabberIDs where presences should be blind carbon copied to. (Enclosing each in a <bcc/> element, which are contained in one <presence/> element in the session manager configuration.)
registers mod_presence_session() as a callback, that gets notified on new sessions and mod_presence_deliver() as a callback to deliver presence stanzas locally.
| si | the session manager instance |
References modpres_conf_struct::bcc, e_DELETE, e_DELIVER, e_DESERIALIZE, e_SESSION, j_strcmp(), jid_append(), jid_new(), js_config(), js_mapi_register(), log_debug2, LOGT_INIT, jsmi_struct::p, modpres_conf_struct::peerpres_to_xdb, pmalloco(), modpres_conf_struct::pres_to_xdb, xmlnode_free(), xmlnode_get_data(), xmlnode_get_firstchild(), xmlnode_get_localname(), xmlnode_get_nextsibling(), and xmlnode_get_type().
1.7.6.1