#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | global_read (struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) |
static int | global_write (struct ast_channel *chan, char *cmd, char *data, const char *value) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT | AST_MODFLAG_BUILDSUM, .description = "Global variable dialplan 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 = "361d7bb937402d51e4658efb5b4d76e4" , .load = load_module, .unload = unload_module, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_custom_function | global_function |
Definition in file func_global.c.
static void __reg_module | ( | void | ) | [static] |
Definition at line 86 of file func_global.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 86 of file func_global.c.
static int global_read | ( | struct ast_channel * | chan, | |
char * | cmd, | |||
char * | data, | |||
char * | buf, | |||
size_t | len | |||
) | [static] |
Definition at line 41 of file func_global.c.
References ast_copy_string(), pbx_builtin_getvar_helper(), and var.
00042 { 00043 const char *var = pbx_builtin_getvar_helper(NULL, data); 00044 00045 *buf = '\0'; 00046 00047 if (var) 00048 ast_copy_string(buf, var, len); 00049 00050 return 0; 00051 }
static int global_write | ( | struct ast_channel * | chan, | |
char * | cmd, | |||
char * | data, | |||
const char * | value | |||
) | [static] |
Definition at line 53 of file func_global.c.
References pbx_builtin_setvar_helper().
00054 { 00055 pbx_builtin_setvar_helper(NULL, data, value); 00056 00057 return 0; 00058 }
static int load_module | ( | void | ) | [static] |
Definition at line 77 of file func_global.c.
References ast_custom_function_register(), and global_function.
00078 { 00079 int res = 0; 00080 00081 res |= ast_custom_function_register(&global_function); 00082 00083 return res; 00084 }
static int unload_module | ( | void | ) | [static] |
Definition at line 68 of file func_global.c.
References ast_custom_function_unregister(), and global_function.
00069 { 00070 int res = 0; 00071 00072 res |= ast_custom_function_unregister(&global_function); 00073 00074 return res; 00075 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT | AST_MODFLAG_BUILDSUM, .description = "Global variable dialplan 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 = "361d7bb937402d51e4658efb5b4d76e4" , .load = load_module, .unload = unload_module, } [static] |
Definition at line 86 of file func_global.c.
const struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 86 of file func_global.c.
struct ast_custom_function global_function [static] |