presence/subscribe.h File Reference

Kamailio presence module :: SUBSCRIBE support subscribe.c. More...

#include "../../str.h"
#include "../../db/db.h"
#include "event_list.h"
#include "hash.h"
#include "event_list.h"

Include dependency graph for presence/subscribe.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  subscription

Defines

#define ACTIVE_STATUS   1
#define PENDING_STATUS   2
#define TERMINATED_STATUS   3
#define WAITING_STATUS   4

Typedefs

typedef int(* extract_sdialog_info_t )(subs_t *subs, struct sip_msg *msg, int max_expire, int *to_tag_gen, str scontact)
typedef int(* handle_expired_func_t )(subs_t *)
typedef int(* refresh_watcher_t )(str *, str *, str *, int, str *)
typedef struct subscription subs_t
typedef void(* update_db_subs_t )(db_con_t *, db_func_t, shtable_t, int, int, handle_expired_func_t)

Functions

int delete_db_subs (str pres_uri, str ev_stored_name, str to_tag)
int extract_sdialog_info (subs_t *subs, struct sip_msg *msg, int max_expire, int *to_tag_gen, str scontact)
int handle_subscribe (struct sip_msg *, char *, char *)
void msg_active_watchers_clean (unsigned int ticks, void *param)
void msg_watchers_clean (unsigned int ticks, void *param)
int refresh_watcher (str *pres_uri, str *watcher_uri, str *event, int status, str *reason)
int restore_db_subs (void)
void timer_db_update (unsigned int ticks, void *param)
void update_db_subs (db_con_t *db, db_func_t dbf, shtable_t hash_table, int htable_size, int no_lock, handle_expired_func_t handle_expired_func)
int update_subs_db (subs_t *subs, int type)


Detailed Description

Kamailio presence module :: SUBSCRIBE support subscribe.c.

Definition in file presence/subscribe.h.


Define Documentation

#define ACTIVE_STATUS   1

#define PENDING_STATUS   2

#define TERMINATED_STATUS   3

#define WAITING_STATUS   4

Definition at line 51 of file presence/subscribe.h.

Referenced by add_waiting_watchers(), and get_status_str().


Typedef Documentation

typedef int(* extract_sdialog_info_t)(subs_t *subs, struct sip_msg *msg, int max_expire, int *to_tag_gen, str scontact)

Definition at line 112 of file presence/subscribe.h.

typedef int(* handle_expired_func_t)(subs_t *)

Definition at line 102 of file presence/subscribe.h.

typedef int(* refresh_watcher_t)(str *, str *, str *,int, str *)

Definition at line 98 of file presence/subscribe.h.

typedef struct subscription subs_t

Definition at line 81 of file presence/subscribe.h.

Definition at line 107 of file presence/subscribe.h.


Function Documentation

int delete_db_subs ( str  pres_uri,
str  ev_stored_name,
str  to_tag 
)

int extract_sdialog_info ( subs_t subs,
struct sip_msg msg,
int  max_expire,
int *  to_tag_gen,
str  scontact 
)

int handle_subscribe ( struct sip_msg ,
char *  ,
char *   
)

void msg_active_watchers_clean ( unsigned int  ticks,
void *  param 
)

void msg_watchers_clean ( unsigned int  ticks,
void *  param 
)

int refresh_watcher ( str pres_uri,
str watcher_uri,
str event,
int  status,
str reason 
)

int restore_db_subs ( void   ) 

Definition at line 1618 of file presence/subscribe.c.

References active_watchers_table, subscription::callid, callid_col, subscription::contact, contact_col, contains_event(), core_hash(), db_func::delete, ERR_MEM, to_body::error, subscription::event, subscription::event_id, evlist::events, EvList, subscription::expires, expires_col, free_event_params(), db_func::free_result, subscription::from_domain, subscription::from_tag, subscription::from_user, insert_shtable(), db_val_t::int_val, _str::len, LM_DBG, LM_ERR, LM_INFO, subscription::local_contact, subscription::local_cseq, db_res::n, pres_ev::name, NULL, pa_db, pa_dbf, event::params, PKG_MEM_TYPE, subscription::pres_uri, db_func::query, subscription::reason, reason_col, subscription::record_route, subscription::remote_cseq, ROW_VALUES, db_res::rows, _str::s, s, shm_copy_event(), shm_malloc(), SHM_MEM_STR, shtable_size, subscription::sockinfo_str, subscription::status, str_callid_col, str_contact_col, str_event_col, str_event_id_col, str_expires_col, str_from_tag_col, str_local_contact_col, str_local_cseq_col, str_presentity_uri_col, str_reason_col, str_record_route_col, str_remote_cseq_col, str_socket_info_col, str_status_col, str_to_domain_col, str_to_tag_col, str_to_user_col, str_version_col, str_watcher_domain_col, str_watcher_username_col, db_val_t::string_val, subs_htable, subscription::to_domain, subscription::to_tag, subscription::to_user, db_func::use_table, db_val_t::val, and subscription::version.

Referenced by mod_init().

void timer_db_update ( unsigned int  ticks,
void *  param 
)

void update_db_subs ( db_con_t db,
db_func_t  dbf,
shtable_t  hash_table,
int  htable_size,
int  no_lock,
handle_expired_func_t  handle_expired_func 
)

int update_subs_db ( subs_t subs,
int  type 
)


Generated on Thu May 24 08:01:20 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6