#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include <asterisk/config.h>
#include <asterisk/options.h>
#include <asterisk/logger.h>
#include <asterisk/utils.h>
#include "asterisk.h"
#include "astconf.h"
Include dependency graph for config.c:
Go to the source code of this file.
Data Structures | |
struct | ast_category |
struct | ast_config |
Defines | |
#define | MAX_INCLUDE_LEVEL 10 |
Functions | |
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 * | ast_load (char *configfile) |
Load a config file. | |
char * | ast_category_browse (struct ast_config *config, char *prev) |
Goes through categories. |
|
|
|
Goes through categories.
Definition at line 787 of file config.c. References ast_category::name, ast_category::next, and ast_config::root.
|
|
Check for category duplicates.
Definition at line 412 of file config.c. References ast_category::next, and ast_config::root.
|
|
Removes a config.
Definition at line 82 of file config.c. References free, ast_config::root, and ast_category::root. Referenced by ast_enum_init(), ast_load_resource(), ast_rtp_reload(), init_manager(), and load_modules().
|
|
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 132 of file config.c. References s.
|
|
Load a config file.
Definition at line 773 of file config.c. Referenced by ast_enum_init(), ast_load_resource(), ast_rtp_reload(), init_manager(), and load_modules().
|
|
Definition at line 627 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 118 of file config.c. References s. Referenced by ast_load_resource(), 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 146 of file config.c. References ast_variable::next, ast_config::root, and ast_category::root. Referenced by ast_enum_init(), ast_variable_retrieve(), and load_modules().
|
|
Gets a variable.
Definition at line 164 of file config.c. 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().
|