Database access functions.
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Database Access Functions" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static const char | dt_app [] = "DBdeltree" |
|
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ deltree_exec()
static int deltree_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 66 of file app_db.c.
67{
68 char *argv, *family, *keytree;
69
71
72 if (strchr(argv, '/')) {
73 family =
strsep(&argv,
"/");
74 keytree =
strsep(&argv,
"\0");
75 if (!family || !keytree) {
76 ast_debug(1,
"Ignoring; Syntax error in argument\n");
77 return 0;
78 }
80 keytree = 0;
81 } else {
82 family = argv;
83 keytree = 0;
84 }
85
86 if (keytree) {
87 ast_verb(3,
"DBdeltree: family=%s, keytree=%s\n", family, keytree);
88 } else {
89 ast_verb(3,
"DBdeltree: family=%s\n", family);
90 }
91
93 ast_verb(3,
"DBdeltree: Error deleting key from database.\n");
94 }
95
96 return 0;
97}
int ast_db_deltree(const char *family, const char *keytree)
Delete one or more entries in astdb.
#define ast_strdupa(s)
duplicate a string in memory from the stack
char * strsep(char **str, const char *delims)
#define ast_debug(level,...)
Log a DEBUG message.
#define ast_verb(level,...)
static force_inline int attribute_pure ast_strlen_zero(const char *s)
References ast_db_deltree(), ast_debug, ast_strdupa, ast_strlen_zero(), ast_verb, and strsep().
Referenced by load_module().
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
Definition at line 104 of file app_db.c.
105{
107}
static const char dt_app[]
static int deltree_exec(struct ast_channel *chan, const char *data)
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
References ast_register_application_xml, deltree_exec(), and dt_app.
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Database Access Functions" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static |
◆ ast_module_info
◆ dt_app
const char dt_app[] = "DBdeltree" |
|
static |