Logo Search packages:      
Sourcecode: jabberd2 version File versions  Download package

sm.h File Reference


Detailed Description

data structures and prototypes for the session manager

Author:
Jeremie Miller

Robert Norris

Date
2005/09/09 05:34:54
Revision
1.53.2.9

Definition in file sm.h.

#include "sx/sx.h"
#include "sx/sasl.h"
#include "sx/ssl.h"
#include "mio/mio.h"
#include "util/util.h"

Go to the source code of this file.

Classes

struct  item_st
struct  mm_st
struct  mod_instance_st
struct  module_st
struct  os_field_st
struct  os_object_st
struct  os_st
struct  pkt_st
struct  sess_st
struct  sm_st
struct  st_driver_st
struct  st_filter_st
struct  storage_st
struct  user_st

Defines

#define ns_AGENTS   (4)
#define ns_AUTH   (1)
#define ns_BROWSE   (10)
#define ns_DELAY   (5)
#define ns_DISCO   (17)
#define ns_DISCO_INFO   (19)
#define ns_DISCO_ITEMS   (18)
#define ns_EVENT   (11)
#define ns_EXPIRE   (14)
#define ns_GATEWAY   (12)
#define ns_LAST   (13)
#define ns_PRIVACY   (15)
#define ns_PRIVATE   (9)
#define ns_REGISTER   (2)
#define ns_ROSTER   (3)
#define ns_SEARCH   (16)
#define ns_TIME   (7)
#define ns_VACATION   (20)
#define ns_VCARD   (8)
#define ns_VERSION   (6)
#define uri_AGENTS   "jabber:iq:agents"
#define uri_AUTH   "jabber:iq:auth"
#define uri_BROWSE   "jabber:iq:browse"
#define uri_DELAY   "jabber:x:delay"
#define uri_DISCO   "http://jabber.org/protocol/disco"
#define uri_DISCO_INFO   "http://jabber.org/protocol/disco#info"
#define uri_DISCO_ITEMS   "http://jabber.org/protocol/disco#items"
#define uri_EVENT   "jabber:x:event"
#define uri_EXPIRE   "jabber:x:expire"
#define uri_GATEWAY   "jabber:iq:gateway"
#define uri_LAST   "jabber:iq:last"
#define uri_PRIVACY   "jabber:iq:privacy"
#define uri_PRIVATE   "jabber:iq:private"
#define uri_REGISTER   "jabber:iq:register"
#define uri_ROSTER   "jabber:iq:roster"
#define uri_SEARCH   "jabber:iq:search"
#define uri_TIME   "jabber:iq:time"
#define uri_VACATION   "http://jabber.org/protocol/vacation"
#define uri_VCARD   "vcard-temp"
#define uri_VERSION   "jabber:iq:version"

Typedefs

typedef struct aci_st * aci_t
typedef struct item_stitem_t
typedef struct mm_stmm_t
typedef struct mod_instance_stmod_instance_t
typedef int(* module_init_fn )(mod_instance_t)
typedef struct module_stmodule_t
typedef struct os_field_stos_field_t
typedef struct os_object_stos_object_t
typedef struct os_stos_t
typedef struct pkt_stpkt_t
typedef struct sess_stsess_t
typedef struct sm_stsm_t
typedef st_ret_t(* st_driver_init_fn )(st_driver_t)
typedef struct st_driver_stst_driver_t
typedef struct st_filter_stst_filter_t
typedef struct storage_ststorage_t
typedef struct user_stuser_t

Enumerations

enum  mod_chain_t {
  chain_SESS_START, chain_SESS_END, chain_IN_SESS, chain_IN_ROUTER,
  chain_OUT_SESS, chain_OUT_ROUTER, chain_PKT_SM, chain_PKT_USER,
  chain_PKT_ROUTER, chain_USER_LOAD, chain_USER_CREATE, chain_USER_DELETE
}
enum  mod_ret_t { mod_HANDLED, mod_PASS }
enum  os_type_t {
  os_type_BOOLEAN, os_type_INTEGER, os_type_STRING, os_type_NAD,
  os_type_UNKNOWN
}
enum  pkt_type_t {
  pkt_NONE = 0x00, pkt_MESSAGE = 0x10, pkt_PRESENCE = 0x20, pkt_PRESENCE_UN = 0x21,
  pkt_PRESENCE_INVIS = 0x22, pkt_PRESENCE_PROBE = 0x24, pkt_S10N = 0x40, pkt_S10N_ED = 0x41,
  pkt_S10N_UN = 0x42, pkt_S10N_UNED = 0x44, pkt_IQ = 0x80, pkt_IQ_SET = 0x81,
  pkt_IQ_RESULT = 0x82, pkt_SESS = 0x100, pkt_SESS_END = 0x101, pkt_SESS_CREATE = 0x102,
  pkt_SESS_DELETE = 0x104, pkt_SESS_FAILED = 0x08, pkt_SESS_MASK = 0x10f, pkt_ERROR = 0x200
}
enum  route_type_t {
  route_NONE = 0x00, route_UNICAST = 0x10, route_BROADCAST = 0x11, route_ADV = 0x20,
  route_ADV_UN = 0x21, route_ERROR = 0x40
}
enum  st_filter_type_t { st_filter_type_PAIR, st_filter_type_AND, st_filter_type_OR, st_filter_type_NOT }
enum  st_ret_t { st_SUCCESS, st_FAILED, st_NOTFOUND, st_NOTIMPL }

Functions

int aci_check (xht acls, char *type, jid_t jid)
xht aci_load (sm_t sm)
void aci_unload (xht acls)
void dispatch (sm_t sm, pkt_t pkt)
void feature_register (sm_t sm, char *feature)
void feature_unregister (sm_t sm, char *feature)
void mm_free (mm_t mm)
mod_ret_t mm_in_router (mm_t mm, pkt_t pkt)
mod_ret_t mm_in_sess (mm_t mm, sess_t sess, pkt_t pkt)
mm_t mm_new (sm_t sm)
mod_ret_t mm_out_router (mm_t mm, pkt_t pkt)
mod_ret_t mm_out_sess (mm_t mm, sess_t sess, pkt_t pkt)
mod_ret_t mm_pkt_router (mm_t mm, pkt_t pkt)
mod_ret_t mm_pkt_sm (mm_t mm, pkt_t pkt)
mod_ret_t mm_pkt_user (mm_t mm, user_t user, pkt_t pkt)
void mm_sess_end (mm_t mm, sess_t sess)
int mm_sess_start (mm_t mm, sess_t sess)
int mm_user_create (mm_t mm, jid_t jid)
void mm_user_delete (mm_t mm, jid_t jid)
int mm_user_load (mm_t mm, user_t user)
int os_count (os_t os)
void os_free (os_t os)
int os_iter_first (os_t os)
int os_iter_next (os_t os)
os_object_t os_iter_object (os_t os)
os_t os_new (void)
void os_object_free (os_object_t o)
int os_object_get (os_t os, os_object_t o, const char *key, void **val, os_type_t type, os_type_t *ot)
int os_object_get_bool (os_t os, os_object_t o, const char *key, int *val)
int os_object_get_int (os_t os, os_object_t o, const char *key, int *val)
int os_object_get_nad (os_t os, os_object_t o, const char *key, nad_t *val)
int os_object_get_str (os_t os, os_object_t o, const char *key, char **val)
int os_object_get_time (os_t os, os_object_t o, const char *key, time_t *val)
int os_object_iter_first (os_object_t o)
void os_object_iter_get (os_object_t o, char **key, void **val, os_type_t *type)
int os_object_iter_next (os_object_t o)
os_object_t os_object_new (os_t os)
void os_object_put (os_object_t o, const char *key, const void *val, os_type_t type)
void os_object_put_time (os_object_t o, const char *key, const time_t *val)
pkt_t pkt_create (sm_t sm, const char *elem, const char *type, const char *to, const char *from)
void pkt_delay (pkt_t pkt, time_t t, const char *from)
pkt_t pkt_dup (pkt_t pkt, const char *to, const char *from)
pkt_t pkt_error (pkt_t pkt, int err)
void pkt_free (pkt_t pkt)
void pkt_id (pkt_t src, pkt_t dest)
void pkt_id_new (pkt_t pkt)
pkt_t pkt_new (sm_t sm, nad_t nad)
void pkt_router (pkt_t pkt)
void pkt_sess (pkt_t pkt, sess_t sess)
pkt_t pkt_tofrom (pkt_t pkt)
void pres_deliver (sess_t sess, pkt_t pres)
void pres_error (sess_t sess, jid_t jid)
void pres_in (user_t user, pkt_t pres)
void pres_probe (user_t user)
void pres_roster (sess_t sess, item_t item)
int pres_trust (user_t user, jid_t jid)
void pres_update (sess_t sess, pkt_t pres)
void sess_end (sess_t sess)
sess_t sess_match (user_t user, char *resource)
void sess_route (sess_t sess, pkt_t pkt)
sess_t sess_start (sm_t sm, jid_t jid)
void sm_c2s_action (sess_t dest, char *action, char *target)
int sm_mio_callback (mio_t m, mio_action_t a, int fd, void *data, void *arg)
void sm_signature (sm_t sm, char *str)
int sm_sx_callback (sx_t s, sx_event_t e, void *data, void *arg)
void sm_timestamp (time_t t, char timestamp[18])
st_ret_t storage_add_type (storage_t st, const char *driver, const char *type)
st_ret_t storage_delete (storage_t st, const char *type, const char *owner, const char *filter)
st_filter_t storage_filter (const char *filter)
void storage_free (storage_t st)
st_ret_t storage_get (storage_t st, const char *type, const char *owner, const char *filter, os_t *os)
int storage_match (st_filter_t filter, os_object_t o, os_t os)
storage_t storage_new (sm_t sm)
st_ret_t storage_put (storage_t st, const char *type, const char *owner, os_t os)
st_ret_t storage_replace (storage_t st, const char *type, const char *owner, const char *filter, os_t os)
int user_create (sm_t sm, jid_t jid)
void user_delete (sm_t sm, jid_t jid)
void user_free (user_t user)
user_t user_load (sm_t sm, jid_t jid)

Variables

sig_atomic_t sm_lost_router


Generated by  Doxygen 1.6.0   Back to index