Handle offline messages to users (including message expiration (XEP-0023), that is DEPRICATED by XEP-0079, message events (XEP-0022), that might become DEPRICATED by XEP-0085 or a successor, and flexible offline message retrieval (XEP-0013)). More...
#include "jsm.h"Data Structures | |
| struct | modoffline_conf_struct |
| struct | modoffline_session_struct |
Typedefs | |
| typedef struct modoffline_conf_struct * | modoffline_conf |
| typedef struct modoffline_conf_struct | _modoffline_conf |
| typedef struct modoffline_session_struct * | modoffline_session |
| typedef struct modoffline_session_struct | _modoffline_session |
Functions | |
| void | mod_offline (jsmi si) |
Handle offline messages to users (including message expiration (XEP-0023), that is DEPRICATED by XEP-0079, message events (XEP-0022), that might become DEPRICATED by XEP-0085 or a successor, and flexible offline message retrieval (XEP-0013)).
This module is responsible for checking if a message can be delivered to a user session or if it has to be stored in xdb for later delivery.
If a user comes online this module will check if there are stored messages for this user (only if the user's presence has a non-negative priority) and deliver them, if the have not yet expired (using XEP-0023 processing).
If a message is stored offline, this module will check if the sender wants to get an event and send it if requested. (Message Events - XEP-0022)
This module supports flexible offline message retrieval (XEP-0013)
mod_offline must go before mod_presence
| typedef struct modoffline_conf_struct _modoffline_conf |
| typedef struct modoffline_session_struct _modoffline_session |
| typedef struct modoffline_conf_struct * modoffline_conf |
configuration of mod_offline
| typedef struct modoffline_session_struct * modoffline_session |
data that is held for a single session of a user
| void mod_offline | ( | jsmi | si | ) |
startup this module, register its callbacks
two callbacks have to be registered: we have to receive the messages addressed to the user (mod_offline_handler) and we need noticed if a user comes online (mod_offline_session)
| si | the session manager instance |
References e_DELETE, e_DESERIALIZE, e_OFFLINE, e_SERVER, e_SESSION, js_config(), js_mapi_register(), log_debug2, LOGT_INIT, jsmi_struct::p, pmalloco(), jsmi_struct::std_namespace_prefixes, modoffline_conf_struct::store_type_chat, modoffline_conf_struct::store_type_error, modoffline_conf_struct::store_type_groupchat, modoffline_conf_struct::store_type_headline, modoffline_conf_struct::store_type_normal, xmlnode_free(), xmlnode_get_list_item(), xmlnode_get_tags(), and ZONE.
1.6.3