mod_last.cc File Reference

Implement handling of jabber:iq:last (XEP-0012) in the session manager. More...

#include "jsm.h"

Functions

void mod_last (jsmi si)


Detailed Description

Implement handling of jabber:iq:last (XEP-0012) in the session manager.

By sending a jabber:iq:last query of type get the server will either reply with its own startup time (query sent to the session manager's address) or with the time a user last went offline or the time of the user's registration if it never was online (query sent to a user's address).

jabber:iq:last queries are only processed if the querying entity has a subscription to the queried user's presence.


Function Documentation

void mod_last ( jsmi  si  ) 

init the mod_last module

register different callbacks:

  • mod_last_init for new user registrations
  • mod_last_sess for new sessions
  • mod_last_reply for stanzas sent to an offline user
  • mod_last_server for stanzas sent to the session manager's address

The server's startup time is stored as the argument to the mod_last_server callback.

Parameters:
si the session manager instance

References e_DELETE, e_DESERIALIZE, e_OFFLINE, e_REGISTER, e_SERVER, e_SESSION, js_config(), js_mapi_register(), log_debug2, LOGT_INIT, jsmi_struct::p, pmalloco(), register_config(), xmlnode_free(), and ZONE.


Generated on Wed Sep 10 01:59:48 2008 for jabberd14 by  doxygen 1.5.5