#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 "../../db/db.h"#include "../../db/db_res.h"#include "../../sr_module.h"#include "../../dprint.h"#include "../../ut.h"#include "../../timer.h"#include "../../str.h"#include "../../mem/shm_mem.h"#include "../../parser/parse_from.h"#include "../../parser/parse_content.h"#include "../../parser/contact/parse_contact.h"#include "../../resolve.h"#include "../../hash_func.h"#include "../../mi/mi.h"#include "../tm/tm_load.h"#include "imc_mng.h"#include "imc_cmd.h"

Go to the source code of this file.
Functions | |
| int | add_from_db (void) |
| static int | child_init (int) |
| void | destroy (void) |
| Module destroy function. | |
| static int | imc_manager (struct sip_msg *, char *, char *) |
| static struct mi_root * | imc_mi_list_members (struct mi_root *cmd, void *param) |
| static struct mi_root * | imc_mi_list_rooms (struct mi_root *cmd, void *param) |
| void | inv_callback (struct cell *t, int type, struct tmcb_params *ps) |
| static int | mod_init (void) |
Variables | |
| imc_hentry_p | _imc_htable = NULL |
| static cmd_export_t | cmds [] |
| static str | db_url = str_init(DEFAULT_DB_URL) |
| struct module_exports | exports |
| char | imc_cmd_start_char |
| str | imc_cmd_start_str = str_init(IMC_CMD_START_STR) |
| static str | imc_col_domain = str_init("domain") |
| static str | imc_col_flag = str_init("flag") |
| static str | imc_col_name = str_init("name") |
| static str | imc_col_room = str_init("room") |
| static str | imc_col_username = str_init("username") |
| MODULE_VERSION db_con_t * | imc_db = NULL |
| db_func_t | imc_dbf |
| int | imc_hash_size = 4 |
| static str | members_table = str_init("imc_members") |
| static mi_export_t | mi_cmds [] |
| str | outbound_proxy = {NULL, 0} |
| static param_export_t | params [] |
| static str | rooms_table = str_init("imc_rooms") |
| struct tm_binds | tmb |
| int add_from_db | ( | void | ) |
the initiating function
Definition at line 158 of file imc.c.
References DB_STR, db_func::delete, domain, db_func::free_result, imc_add_member(), imc_add_room(), imc_release_room(), db_val_t::int_val, _str::len, LM_DBG, LM_ERR, LM_INFO, db_res::n, module_exports::name, db_val_t::nul, NULL, db_func::query, ROW_VALUES, db_res::rows, _str::s, db_val_t::str_val, db_val_t::type, _imc_room::uri, db_func::use_table, and db_val_t::val.
Referenced by mod_init().
| static int child_init | ( | int | rank | ) | [static] |
child init
Definition at line 402 of file imc.c.
References db_func::init, _str::len, LM_DBG, LM_ERR, _str::s, and db_func::use_table.
| void destroy | ( | void | ) |
Module destroy function.
destroy module
destroy function of module
destroy function
Definition at line 594 of file imc.c.
References DB_INT, DB_STR, _imc_member::domain, _imc_room::domain, _imc_member::flags, _imc_room::flags, imc_hash_size, imc_htable_destroy(), db_func::insert, db_val_t::int_val, _str::len, LM_DBG, LM_ERR, _imc_room::members, _imc_room::name, _imc_room::next, _imc_member::next, db_val_t::nul, NULL, _imc_hentry::rooms, _str::s, db_val_t::str_val, db_val_t::type, _imc_room::uri, db_func::use_table, _imc_member::user, and db_val_t::val.
| static int imc_manager | ( | struct sip_msg * | msg, | |
| char * | str1, | |||
| char * | str2 | |||
| ) | [static] |
Definition at line 435 of file imc.c.
References sip_msg::content_length, to_body::error, sip_msg::first_line, sip_msg::from, get_body(), get_content_length, imc_cmd_start_char, IMC_CMDID_ACCEPT, IMC_CMDID_CREATE, IMC_CMDID_DENY, IMC_CMDID_DESTROY, IMC_CMDID_EXIT, IMC_CMDID_HELP, IMC_CMDID_INVITE, IMC_CMDID_JOIN, IMC_CMDID_LIST, IMC_CMDID_REMOVE, imc_handle_accept(), imc_handle_create(), imc_handle_deny(), imc_handle_destroy(), imc_handle_exit(), imc_handle_help(), imc_handle_invite(), imc_handle_join(), imc_handle_list(), imc_handle_message(), imc_handle_remove(), imc_handle_unknown(), imc_parse_cmd(), _str::len, LM_DBG, LM_ERR, sip_msg::new_uri, NULL, parse_from_header(), parse_sip_msg_uri(), parse_uri(), hdr_field::parsed, sip_msg::parsed_uri, msg_start::request, _str::s, _imc_cmd::type, msg_start::u, and to_body::uri.
Definition at line 743 of file imc.c.
References add_mi_attr(), add_mi_node_child(), free_mi_tree(), sip_uri::host, imc_get_room(), imc_release_room(), init_mi_tree(), int2str(), mi_node::kids, _str::len, len, LM_ERR, LM_INFO, _imc_room::members, MI_DUP_VALUE, MI_OK_LEN, MI_OK_S, _imc_member::next, mi_node::next, mi_root::node, NULL, parse_uri(), _str::s, _imc_member::uri, sip_uri::user, and mi_node::value.
Definition at line 689 of file imc.c.
References add_mi_attr(), add_mi_node_child(), free_mi_tree(), imc_hash_size, init_mi_tree(), int2str(), _str::len, len, lock, _imc_room::members, MI_DUP_VALUE, MI_OK_LEN, MI_OK_S, _imc_room::next, mi_root::node, _imc_room::nr_of_members, NULL, _imc_hentry::rooms, _str::s, _imc_member::uri, and _imc_room::uri.
| void inv_callback | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | ps | |||
| ) |
TM callback function
| static int mod_init | ( | void | ) | [static] |
module functions
Definition at line 337 of file imc.c.
References add_from_db(), db_func::close, db_bind_mod(), imc_cmd_start_char, imc_hash_size, imc_htable_init(), db_func::init, _str::len, LM_DBG, LM_ERR, load_tm_api(), NULL, _str::s, tmb, and ZSW.
| imc_hentry_p _imc_htable = NULL |
cmd_export_t cmds[] [static] |
Initial value:
{
{"imc_manager", (cmd_function)imc_manager, 0, 0, 0, REQUEST_ROUTE},
{0,0,0,0,0,0}
}
| struct module_exports exports |
| char imc_cmd_start_char |
| str imc_cmd_start_str = str_init(IMC_CMD_START_STR) |
str imc_col_domain = str_init("domain") [static] |
str imc_col_flag = str_init("flag") [static] |
str imc_col_name = str_init("name") [static] |
str imc_col_room = str_init("room") [static] |
str imc_col_username = str_init("username") [static] |
| int imc_hash_size = 4 |
Definition at line 78 of file imc.c.
Referenced by destroy(), imc_add_room(), imc_del_room(), imc_get_room(), imc_htable_destroy(), imc_htable_init(), imc_mi_list_rooms(), imc_release_room(), and mod_init().
str members_table = str_init("imc_members") [static] |
mi_export_t mi_cmds[] [static] |
Initial value:
{
{ "imc_list_rooms", imc_mi_list_rooms, MI_NO_INPUT_FLAG, 0, 0 },
{ "imc_list_members", imc_mi_list_members, 0, 0, 0 },
{ 0, 0, 0, 0, 0}
}
| str outbound_proxy = {NULL, 0} |
Definition at line 66 of file imc.c.
Referenced by imc_handle_help(), imc_handle_invite(), imc_handle_unknown(), imc_inv_callback(), imc_send_message(), and send_publish().
param_export_t params[] [static] |
str rooms_table = str_init("imc_rooms") [static] |
1.5.6