xcap_client.c File Reference

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <curl/curl.h>
#include "../../pt.h"
#include "../../db/db.h"
#include "../../sr_module.h"
#include "../../dprint.h"
#include "../../error.h"
#include "../../ut.h"
#include "../../mem/mem.h"
#include "../../mem/shm_mem.h"
#include "../presence/utils_func.h"
#include "xcap_functions.h"
#include "xcap_client.h"

Include dependency graph for xcap_client.c:

Go to the source code of this file.

Defines

#define STR_MATCH(s1, s2)   ((s1).len==(s2).len && memcmp((s1).s, (s2).s, (s1).len)==0)
#define XCAP_TABLE_VERSION   3

Functions

void destroy (void)
int get_auid_flag (str auid)
static int mod_init (void)
int parse_doc_url (str doc_url, char **serv_addr, xcap_doc_sel_t *doc_sel)
void query_xcap_update (unsigned int ticks, void *param)
struct mi_rootrefreshXcapDoc (struct mi_root *cmd, void *param)

Variables

static cmd_export_t cmds []
struct module_exports exports
static mi_export_t mi_cmds []
static param_export_t params []
int periodical_query = 1
unsigned int query_period = 100
str str_doc_col = str_init("doc")
str str_doc_type_col = str_init("doc_type")
str str_doc_uri_col = str_init("doc_uri")
str str_domain_col = str_init("domain")
str str_etag_col = str_init("etag")
str str_path_col = str_init("path")
str str_port_col = str_init("port")
str str_source_col = str_init("source")
str str_username_col = str_init("username")
db_con_txcap_db = NULL
str xcap_db_table = str_init("xcap")
str xcap_db_url = str_init(DEFAULT_DB_URL)
db_func_t xcap_dbf
xcap_callback_txcapcb_list = NULL


Define Documentation

#define STR_MATCH ( s1,
s2   )     ((s1).len==(s2).len && memcmp((s1).s, (s2).s, (s1).len)==0)

Definition at line 399 of file xcap_client.c.

#define XCAP_TABLE_VERSION   3

Definition at line 53 of file xcap_client.c.

Referenced by mod_init().


Function Documentation

void destroy ( void   ) 

int get_auid_flag ( str  auid  ) 

Definition at line 401 of file xcap_client.c.

References PRES_RULES, RESOURCE_LIST, str_init, and STR_MATCH.

Referenced by refreshXcapDoc().

static int mod_init ( void   )  [static]

int parse_doc_url ( str  doc_url,
char **  serv_addr,
xcap_doc_sel_t doc_sel 
)

Definition at line 293 of file xcap_client.c.

References xcap_doc_sel::auid, GLOBAL_TYPE, _str::len, _str::s, xcap_doc_sel::type, and USERS_TYPE.

Referenced by refreshXcapDoc().

void query_xcap_update ( unsigned int  ticks,
void *  param 
)

struct mi_root * refreshXcapDoc ( struct mi_root cmd,
void *  param 
) [read]


Variable Documentation

cmd_export_t cmds[] [static]

Initial value:

{  
   {"bind_xcap",  (cmd_function)bind_xcap,  1,    0, 0,            0},
   {    0,                     0,           0,    0, 0,           0}
}

Definition at line 91 of file xcap_client.c.

module exports

Definition at line 103 of file xcap_client.c.

mi_export_t mi_cmds[] [static]

Initial value:

 {
   { "refreshXcapDoc", refreshXcapDoc,      0,  0,  0},
   { 0,                 0,                  0,  0,  0}
}

Definition at line 97 of file xcap_client.c.

param_export_t params[] [static]

Definition at line 82 of file xcap_client.c.

Definition at line 62 of file xcap_client.c.

Referenced by mod_init().

unsigned int query_period = 100

Definition at line 63 of file xcap_client.c.

Referenced by mod_init().

str str_doc_col = str_init("doc")

Definition at line 67 of file xcap_client.c.

str str_doc_type_col = str_init("doc_type")

Definition at line 71 of file xcap_client.c.

str str_doc_uri_col = str_init("doc_uri")

Definition at line 72 of file xcap_client.c.

Referenced by xcapGetNewDoc().

str str_domain_col = str_init("domain")

Definition at line 70 of file xcap_client.c.

str str_etag_col = str_init("etag")

Definition at line 68 of file xcap_client.c.

str str_path_col = str_init("path")

Definition at line 66 of file xcap_client.c.

str str_port_col = str_init("port")

Definition at line 73 of file xcap_client.c.

Referenced by xcapGetNewDoc().

str str_source_col = str_init("source")

Definition at line 65 of file xcap_client.c.

Referenced by xcapGetNewDoc().

str str_username_col = str_init("username")

Definition at line 69 of file xcap_client.c.

db_con_t* xcap_db = NULL

Definition at line 77 of file xcap_client.c.

Referenced by xcapGetNewDoc().

str xcap_db_table = str_init("xcap")

Definition at line 59 of file xcap_client.c.

Referenced by xcapGetNewDoc().

str xcap_db_url = str_init(DEFAULT_DB_URL)

Definition at line 60 of file xcap_client.c.

Definition at line 78 of file xcap_client.c.

Referenced by xcapGetNewDoc().

Definition at line 61 of file xcap_client.c.

Referenced by destroy_xcapcb_list(), register_xcapcb(), and run_xcap_update_cb().


Generated on Fri May 25 00:00:45 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6