#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include <asterisk/config.h>
#include <asterisk/config_pvt.h>
#include <asterisk/cli.h>
#include <asterisk/lock.h>
#include <asterisk/options.h>
#include <asterisk/logger.h>
#include <asterisk/utils.h>
#include "asterisk.h"
#include "astconf.h"
Go to the source code of this file.
Functions | |
AST_MUTEX_DEFINE_STATIC (ast_cust_config_lock) | |
void | ast_destroy (struct ast_config *ast) |
Removes a config. | |
int | ast_true (char *s) |
Make sure something is true. | |
int | ast_false (char *s) |
Make sure something is false. | |
ast_variable * | ast_variable_browse (struct ast_config *config, char *category) |
Goes through variables. | |
char * | ast_variable_retrieve (struct ast_config *config, char *category, char *value) |
Gets a variable. | |
int | ast_category_exist (struct ast_config *config, char *category_name) |
Check for category duplicates. | |
int | ast_save (char *configfile, struct ast_config *cfg, char *generator) |
ast_config_reg * | get_ast_cust_config_keyword (char *name) |
ast_config_reg * | get_ast_cust_config (char *name) |
void | ast_config_destroy_all (void) |
ast_config_reg * | get_config_registrations (void) |
int | ast_config_register (struct ast_config_reg *new) |
int | ast_config_deregister (struct ast_config_reg *del) |
int | ast_cust_config_active (void) |
ast_config * | ast_load (char *configfile) |
Load a config file. | |
char * | ast_category_browse (struct ast_config *config, char *prev) |
Goes through categories. | |
ast_config * | ast_new_config (void) |
ast_category * | ast_new_category (char *name) |
ast_variable * | ast_new_variable (char *name, char *value) |
int | ast_cust_config_register (struct ast_config_reg *new) |
int | ast_cust_config_deregister (struct ast_config_reg *new) |
int | register_config_cli () |
int | read_ast_cust_config (void) |
Variables | |
ast_config *(* | global_load_func )(char *, struct ast_config *, struct ast_category **, struct ast_variable **, int) |
|
Goes through categories.
References ast_category::name, ast_category::next, and ast_config::root.
|
|
Check for category duplicates.
References ast_category::next, and ast_config::root.
|
|
Definition at line 892 of file config.c. References ast_mutex_lock, ast_mutex_unlock, and ast_config_reg::next. Referenced by ast_config_destroy_all(), and ast_cust_config_deregister().
|
|
Definition at line 860 of file config.c. References ast_config_deregister(), ast_mutex_lock, ast_mutex_unlock, and key().
|
|
Definition at line 876 of file config.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, LOG_NOTICE, ast_config_reg::name, and ast_config_reg::next. Referenced by ast_cust_config_register().
|
|
Definition at line 914 of file config.c.
|
|
Definition at line 1024 of file config.c. References ast_config_deregister(), and read_ast_cust_config().
|
|
Definition at line 1018 of file config.c. References ast_config_register(), and read_ast_cust_config().
|
|
Removes a config.
References free, ast_config::root, and ast_category::root. Referenced by ast_enum_init(), ast_load_resource(), ast_rtp_reload(), init_manager(), load_modules(), and read_ast_cust_config().
|
|
Make sure something is false. Determine falseness of a boolean value. This function checks to see whether a string passed to it is an indication of a negatirve value. It checks to see if the string is "no", "false", "n", "f", and "0". Returns 0 if the value of s is a NULL pointer, 0 on "truth", and -1 on falsehood. Definition at line 118 of file config.c. References s.
|
|
Load a config file.
Referenced by ast_enum_init(), ast_load_resource(), ast_rtp_reload(), init_manager(), load_modules(), and read_ast_cust_config().
|
|
|
|
Definition at line 979 of file config.c. References malloc.
|
|
Definition at line 969 of file config.c. References malloc.
|
|
Definition at line 991 of file config.c.
|
|
Definition at line 653 of file config.c. References AST_CONFIG_DIR, ast_verbose(), option_debug, option_verbose, ast_config::root, and VERBOSE_PREFIX_2.
|
|
Make sure something is true. Determine affermativeness of a boolean value. This function checks to see whether a string passed to it is an indication of an affirmitave value. It checks to see if the string is "yes", "true", "y", "t", and "1". Returns 0 if the value of s is a NULL pointer, 0 on "truth", and -1 on falsehood. Definition at line 103 of file config.c. References s. Referenced by ast_load_resource(), ast_rtp_reload(), init_manager(), and load_modules().
|
|
Goes through variables. Somewhat similar in intent as the ast_category_browse. The category MUST be an actual pointer to an actual category (such as one obtained by using ast_category_browse()). List variables of config file Returns ast_variable list on success, or NULL on failure Definition at line 133 of file config.c. References ast_variable::next, ast_config::root, and ast_category::root. Referenced by ast_enum_init(), ast_variable_retrieve(), load_modules(), and read_ast_cust_config().
|
|
Gets a variable.
References ast_variable_browse(), ast_config::root, ast_category::root, and ast_variable::value. Referenced by ast_load_resource(), ast_rtp_reload(), init_manager(), and load_modules().
|
|
Definition at line 848 of file config.c. References ast_mutex_lock, ast_mutex_unlock, and ast_config_reg::next. Referenced by read_ast_cust_config().
|
|
Definition at line 833 of file config.c. References ast_mutex_lock, ast_mutex_unlock, and ast_config_reg::next. Referenced by read_ast_cust_config().
|
|
Definition at line 871 of file config.c.
|
|
Definition at line 1072 of file config.c. References ast_destroy(), ast_load(), ast_log(), ast_variable_browse(), CONFIG_KEYWORD_ARRAYLEN, get_ast_cust_config(), get_ast_cust_config_keyword(), LOG_NOTICE, and LOG_WARNING. Referenced by ast_cust_config_deregister(), ast_cust_config_register(), ast_module_reload(), and main().
|
|
Definition at line 1067 of file config.c. References ast_cli_register(). Referenced by main().
|
|