presence/notify.c File Reference

Kamailio presence module :: Notification with SIP NOTIFY. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
#include "../../trim.h"
#include "../../ut.h"
#include "../../globals.h"
#include "../../str.h"
#include "../../db/db.h"
#include "../../db/db_val.h"
#include "../../socket_info.h"
#include "../tm/tm_load.h"
#include "../pua/hash.h"
#include "presentity.h"
#include "presence.h"
#include "notify.h"
#include "utils_func.h"

Include dependency graph for presence/notify.c:

Go to the source code of this file.

Defines

#define ALLOC_SIZE   3000
#define MAX_FORWARD   70

Functions

int add_waiting_watchers (watcher_t *watchers, str pres_uri, str event)
int add_watcher_list (subs_t *s, watcher_t *watchers)
dlg_tbuild_dlg_t (subs_t *subs)
strbuild_empty_bla_body (str pres_uri)
int build_str_hdr (subs_t *subs, int is_body, str *hdr)
strcreate_winfo_xml (watcher_t *watchers, char *version, str resource, str event, int STATE_FLAG)
void free_cbparam (c_back_param *cb_param)
int free_tm_dlg (dlg_t *td)
void free_watcher_list (watcher_t *watchers)
strget_p_notify_body (str pres_uri, pres_ev_t *event, str *etag, str *contact)
char * get_status_str (int status_flag)
int get_subs_db (str *pres_uri, pres_ev_t *event, str *sender, subs_t **s_array, int *n)
subs_tget_subs_dialog (str *pres_uri, pres_ev_t *event, str *sender)
strget_wi_notify_body (subs_t *subs, subs_t *watcher_subs)
int get_wi_subs_db (subs_t *subs, watcher_t *watchers)
int notify (subs_t *subs, subs_t *watcher_subs, str *n_body, int force_null_body)
void p_tm_callback (struct cell *t, int type, struct tmcb_params *ps)
void printf_subs (subs_t *subs)
int publ_notify (presentity_t *p, str pres_uri, str *body, str *offline_etag, str *rules_doc)
int query_db_notify (str *pres_uri, pres_ev_t *event, subs_t *watcher_subs)
int send_notify_request (subs_t *subs, subs_t *watcher_subs, str *n_body, int force_null_body)
c_back_paramshm_dup_cbparam (subs_t *)
int update_in_list (subs_t *s, subs_t *s_array, int new_rec_no, int n)
int watcher_found_in_list (watcher_t *watchers, str wuri)

Variables

str str_body_col = str_init("body")
str str_callid_col = str_init("callid")
str str_contact_col = str_init("contact")
str str_domain_col = str_init("domain")
str str_etag_col = str_init("etag")
str str_event_col = str_init("event")
str str_event_id_col = str_init("event_id")
str str_expires_col = str_init("expires")
str str_from_tag_col = str_init("from_tag")
str str_id_col = str_init("id")
str str_inserted_time_col = str_init("inserted_time")
str str_local_contact_col = str_init("local_contact")
str str_local_cseq_col = str_init("local_cseq")
str str_presentity_uri_col = str_init("presentity_uri")
str str_reason_col = str_init("reason")
str str_received_time_col = str_init("received_time")
str str_record_route_col = str_init("record_route")
str str_remote_cseq_col = str_init("remote_cseq")
str str_sender_col = str_init("sender")
str str_socket_info_col = str_init("socket_info")
str str_status_col = str_init("status")
str str_to_domain_col = str_init("to_domain")
str str_to_tag_col = str_init("to_tag")
str str_to_user_col = str_init("to_user")
str str_username_col = str_init("username")
str str_version_col = str_init("version")
str str_watcher_domain_col = str_init("watcher_domain")
str str_watcher_username_col = str_init("watcher_username")


Detailed Description

Kamailio presence module :: Notification with SIP NOTIFY.

Definition in file presence/notify.c.


Define Documentation

#define ALLOC_SIZE   3000

Definition at line 54 of file presence/notify.c.

#define MAX_FORWARD   70


Function Documentation

int add_waiting_watchers ( watcher_t watchers,
str  pres_uri,
str  event 
)

int add_watcher_list ( subs_t s,
watcher_t watchers 
)

dlg_t* build_dlg_t ( subs_t subs  ) 

str* build_empty_bla_body ( str  pres_uri  ) 

Definition at line 514 of file presence/notify.c.

References _str::len, len, LM_ERR, NULL, pkg_free, pkg_malloc, and _str::s.

Referenced by get_p_notify_body().

int build_str_hdr ( subs_t subs,
int  is_body,
str hdr 
)

str * create_winfo_xml ( watcher_t watchers,
char *  version,
str  resource,
str  event,
int  STATE_FLAG 
)

void free_cbparam ( c_back_param cb_param  ) 

Definition at line 1707 of file presence/notify.c.

References NULL, and shm_free.

Referenced by p_tm_callback(), and send_notify_request().

int free_tm_dlg ( dlg_t td  ) 

Definition at line 892 of file presence/notify.c.

References free_rr(), dlg::loc_uri, pkg_free, dlg::rem_uri, dlg::route_set, and _str::s.

void free_watcher_list ( watcher_t watchers  ) 

Definition at line 458 of file presence/notify.c.

References watcher::id, watcher::next, NULL, pkg_free, _str::s, and watcher::uri.

Referenced by get_wi_notify_body().

str* get_p_notify_body ( str  pres_uri,
pres_ev_t event,
str etag,
str contact 
)

char* get_status_str ( int  status_flag  ) 

int get_subs_db ( str pres_uri,
pres_ev_t event,
str sender,
subs_t **  s_array,
int *  n 
)

subs_t* get_subs_dialog ( str pres_uri,
pres_ev_t event,
str sender 
)

str* get_wi_notify_body ( subs_t subs,
subs_t watcher_subs 
)

int get_wi_subs_db ( subs_t subs,
watcher_t watchers 
)

int notify ( subs_t subs,
subs_t watcher_subs,
str n_body,
int  force_null_body 
)

void p_tm_callback ( struct cell t,
int  type,
struct tmcb_params ps 
)

void printf_subs ( subs_t subs  ) 

int publ_notify ( presentity_t p,
str  pres_uri,
str body,
str offline_etag,
str rules_doc 
)

int query_db_notify ( str pres_uri,
pres_ev_t event,
subs_t watcher_subs 
)

int send_notify_request ( subs_t subs,
subs_t watcher_subs,
str n_body,
int  force_null_body 
)

c_back_param * shm_dup_cbparam ( subs_t subs  ) 

int update_in_list ( subs_t s,
subs_t s_array,
int  new_rec_no,
int  n 
)

int watcher_found_in_list ( watcher_t watchers,
str  wuri 
)

Definition at line 1860 of file presence/notify.c.

References _str::len, watcher::next, _str::s, and watcher::uri.

Referenced by add_waiting_watchers().


Variable Documentation

str str_body_col = str_init("body")

Definition at line 70 of file presence/notify.c.

Referenced by get_sphere(), pres_htable_restore(), and update_presentity().

str str_callid_col = str_init("callid")

str str_contact_col = str_init("contact")

Definition at line 83 of file presence/notify.c.

Referenced by restore_db_subs(), and update_db_subs().

str str_domain_col = str_init("domain")

str str_etag_col = str_init("etag")

str str_event_col = str_init("event")

str str_event_id_col = str_init("event_id")

str str_expires_col = str_init("expires")

str str_from_tag_col = str_init("from_tag")

str str_id_col = str_init("id")

Definition at line 93 of file presence/notify.c.

Referenced by msg_watchers_clean().

str str_inserted_time_col = str_init("inserted_time")

Definition at line 91 of file presence/notify.c.

Referenced by insert_db_subs_auth(), and msg_watchers_clean().

str str_local_contact_col = str_init("local_contact")

Definition at line 88 of file presence/notify.c.

Referenced by restore_db_subs(), and update_db_subs().

str str_local_cseq_col = str_init("local_cseq")

str str_presentity_uri_col = str_init("presentity_uri")

str str_reason_col = str_init("reason")

str str_received_time_col = str_init("received_time")

Definition at line 92 of file presence/notify.c.

Referenced by update_presentity().

str str_record_route_col = str_init("record_route")

Definition at line 82 of file presence/notify.c.

Referenced by get_database_info(), restore_db_subs(), and update_db_subs().

str str_remote_cseq_col = str_init("remote_cseq")

str str_sender_col = str_init("sender")

Definition at line 94 of file presence/notify.c.

Referenced by update_presentity().

str str_socket_info_col = str_init("socket_info")

Definition at line 87 of file presence/notify.c.

Referenced by restore_db_subs(), and update_db_subs().

str str_status_col = str_init("status")

str str_to_domain_col = str_init("to_domain")

Definition at line 71 of file presence/notify.c.

Referenced by get_database_info(), restore_db_subs(), and update_db_subs().

str str_to_tag_col = str_init("to_tag")

str str_to_user_col = str_init("to_user")

Definition at line 67 of file presence/notify.c.

Referenced by get_database_info(), restore_db_subs(), and update_db_subs().

str str_username_col = str_init("username")

str str_version_col = str_init("version")

str str_watcher_domain_col = str_init("watcher_domain")

str str_watcher_username_col = str_init("watcher_username")


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