cpl_db.c File Reference

#include "../../mem/shm_mem.h"
#include "../../db/db.h"
#include "../../dprint.h"
#include "../../str.h"
#include "cpl_db.h"

Include dependency graph for cpl_db.c:

Go to the source code of this file.

Defines

#define TABLE_VERSION   1

Functions

int cpl_db_bind (const str *db_url, const str *db_table)
void cpl_db_close (void)
int cpl_db_init (const str *db_url, const str *db_table)
int get_user_script (str *username, str *domain, str *script, str *key)
int rmv_from_db (str *username, str *domain)
int write_to_db (str *username, str *domain, str *xml, str *bin)

Variables

str cpl_bin_col = str_init("cpl_bin")
static db_func_t cpl_dbf
str cpl_domain_col = str_init("domain")
str cpl_username_col = str_init("username")
str cpl_xml_col = str_init("cpl_xml")
static db_con_tdb_hdl = 0


Define Documentation

#define TABLE_VERSION   1

Definition at line 34 of file cpl_db.c.


Function Documentation

int cpl_db_bind ( const str db_url,
const str db_table 
)

void cpl_db_close ( void   ) 

Definition at line 99 of file cpl_db.c.

References db_func::close.

Referenced by cpl_db_bind(), and cpl_db_init().

int cpl_db_init ( const str db_url,
const str db_table 
)

Definition at line 75 of file cpl_db.c.

References cpl_db_close(), db_func::init, _str::len, LM_CRIT, _str::s, and db_func::use_table.

Referenced by cpl_child_init(), cpl_db_bind(), and mi_child_init().

int get_user_script ( str username,
str domain,
str script,
str key 
)

int rmv_from_db ( str username,
str domain 
)

int write_to_db ( str username,
str domain,
str xml,
str bin 
)


Variable Documentation

str cpl_bin_col = str_init("cpl_bin")

Definition at line 42 of file cpl_db.c.

Referenced by cpl_invoke_script().

db_func_t cpl_dbf [static]

Definition at line 37 of file cpl_db.c.

str cpl_domain_col = str_init("domain")

Definition at line 40 of file cpl_db.c.

str cpl_username_col = str_init("username")

Definition at line 39 of file cpl_db.c.

str cpl_xml_col = str_init("cpl_xml")

Definition at line 41 of file cpl_db.c.

Referenced by do_script_download().

db_con_t* db_hdl = 0 [static]

Definition at line 36 of file cpl_db.c.


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6