Asterisk - The Open Source Telephony Project
18.5.0
|
Configuration Option-handling. More...
#include "asterisk.h"
#include <regex.h>
#include "asterisk/_private.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
#include "asterisk/stringfields.h"
#include "asterisk/acl.h"
#include "asterisk/app.h"
#include "asterisk/frame.h"
#include "asterisk/xmldoc.h"
#include "asterisk/cli.h"
#include "asterisk/term.h"
#include "asterisk/format_cap.h"
Go to the source code of this file.
Data Structures | |
struct | aco_info_internal |
Bits of aco_info that shouldn't be assigned outside this file. More... | |
struct | aco_option |
struct | aco_type_internal |
Macros | |
#define | CONFIG_OPT_BUCKETS 53 |
#define | XMLDOC_STRICT 1 |
Functions | |
int | __aco_option_register (struct aco_info *info, const char *name, enum aco_matchtype matchtype, struct aco_type **types, const char *default_val, enum aco_option_type kind, aco_option_handler handler, unsigned int flags, unsigned int no_doc, size_t argc,...) |
register a config option More... | |
static int | acl_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default handler for ACLs. More... | |
static void | aco_deinit (void) |
void | aco_info_destroy (struct aco_info *info) |
Destroy an initialized aco_info struct. More... | |
int | aco_info_init (struct aco_info *info) |
Initialize an aco_info structure. More... | |
int | aco_init (void) |
struct ao2_container * | aco_option_container_alloc (void) |
Allocate a container to hold config options. More... | |
static struct aco_option * | aco_option_find (struct aco_type *type, const char *name) |
intptr_t | aco_option_get_argument (const struct aco_option *option, unsigned int position) |
Get the offset position for an argument within a config option. More... | |
unsigned int | aco_option_get_flags (const struct aco_option *option) |
Read the flags of a config option - useful when using a custom callback for a config option. More... | |
int | aco_option_register_deprecated (struct aco_info *info, const char *name, struct aco_type **types, const char *aliased_to) |
Register a deprecated (and aliased) config option. More... | |
void * | aco_pending_config (struct aco_info *info) |
Get pending config changes. More... | |
enum aco_process_status | aco_process_ast_config (struct aco_info *info, struct aco_file *file, struct ast_config *cfg) |
Process config info from an ast_config via options registered with an aco_info. More... | |
int | aco_process_category_options (struct aco_type *type, struct ast_config *cfg, const char *cat, void *obj) |
Parse each option defined in a config category. More... | |
enum aco_process_status | aco_process_config (struct aco_info *info, int reload) |
Process a config info via the options registered with an aco_info. More... | |
int | aco_process_var (struct aco_type *type, const char *cat, struct ast_variable *var, void *obj) |
Parse a single ast_variable and apply it to an object. More... | |
int | aco_set_defaults (struct aco_type *type, const char *category, void *obj) |
Set all default options of obj. More... | |
static int | apply_config (struct aco_info *info) |
static aco_option_handler | ast_config_option_default_handler (enum aco_option_type type) |
static int | bool_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for bools (ast_true/ast_false) More... | |
static int | boolflag_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for bools (ast_true/ast_false) that are stored as flags. More... | |
static regex_t * | build_regex (const char *text) |
static int | chararray_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default handler for character arrays. More... | |
static char * | cli_show_help (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | cli_show_module_options (struct ast_cli_args *a) |
static void | cli_show_module_type (struct ast_cli_args *a) |
static void | cli_show_module_types (struct ast_cli_args *a) |
static void | cli_show_modules (struct ast_cli_args *a) |
static int | codec_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for codec preferences/capabilities. More... | |
static char * | complete_config_module (const char *word) |
static char * | complete_config_option (const char *module, const char *option, const char *word) |
static char * | complete_config_type (const char *module, const char *word) |
static int | config_opt_cmp (void *obj, void *arg, int flags) |
static int | config_opt_hash (const void *obj, const int flags) |
static void | config_option_destroy (void *obj) |
static int | double_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for doubles. More... | |
static int | find_option_cb (void *obj, void *arg, int flags) |
static struct ast_xml_doc_item * | find_xmldoc_option (struct ast_xml_doc_item *config_info, struct aco_type **types, const char *name) |
static struct ast_xml_doc_item * | find_xmldoc_type (struct ast_xml_doc_item *config_info, const char *name) |
static int | int_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for signed integers. More... | |
static int | internal_aco_type_category_check (struct aco_type *match, const char *category) |
static struct aco_type * | internal_aco_type_find (struct aco_file *file, struct ast_config *cfg, const char *category) |
static void | internal_file_types_destroy (struct aco_file *file) |
static enum aco_process_status | internal_process_ast_config (struct aco_info *info, struct aco_file *file, struct ast_config *cfg) |
static void | internal_type_destroy (struct aco_type *type) |
static int | internal_type_init (struct aco_type *type) |
static int | is_preload (struct aco_file *file, const char *cat) |
static int | link_option_to_types (struct aco_info *info, struct aco_type **types, struct aco_option *opt) |
static int | noop_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default handler for doing nothing. More... | |
static int | process_category (struct ast_config *cfg, struct aco_info *info, struct aco_file *file, const char *cat, int preload) |
static int | sockaddr_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default handler for ast_sockaddrs. More... | |
static int | stringfield_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for stringfields. More... | |
static int | timelen_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for timelen signed integers. More... | |
static int | uint_handler_fn (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Default option handler for unsigned integers. More... | |
static int | xmldoc_update_config_option (struct aco_type **types, const char *module, const char *name, const char *object_name, const char *default_value, unsigned int regex, enum aco_option_type type) |
static int | xmldoc_update_config_type (const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, enum aco_category_op category_match) |
Variables | |
static char * | aco_option_type_string [] |
Value of the aco_option_type enum as strings. More... | |
static struct ast_cli_entry | cli_aco [] |
static struct ao2_container * | xmldocs |
Configuration Option-handling.
Definition in file config_options.c.
#define CONFIG_OPT_BUCKETS 53 |
Definition at line 47 of file config_options.c.
Referenced by aco_option_container_alloc().
#define XMLDOC_STRICT 1 |
Definition at line 1043 of file config_options.c.
Referenced by xmldoc_update_config_option(), and xmldoc_update_config_type().
int __aco_option_register | ( | struct aco_info * | info, |
const char * | name, | ||
enum aco_matchtype | match_type, | ||
struct aco_type ** | types, | ||
const char * | default_val, | ||
enum aco_option_type | type, | ||
aco_option_handler | handler, | ||
unsigned int | flags, | ||
unsigned int | no_doc, | ||
size_t | argc, | ||
... | |||
) |
register a config option
info | The aco_info holding this module's config information |
name | The name of the option |
match_type | |
types | An array of valid option types for matching categories to the correct struct type |
default_val | The default value of the option in the same format as defined in a config file |
type | The option type (only for default handlers) |
handler | The handler function for the option (only for non-default types) |
flags | a type specific flags, stored in the option and available to the handler |
no_doc | if non-zero, this option should not have documentation |
argc | The number for variadic arguments |
... | field offsets to store for default handlers |
0 | success |
-1 | failure |
Definition at line 300 of file config_options.c.
References ACO_REGEX, AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_ref, aco_option::argc, aco_option::args, ast_config_option_default_handler(), ast_log, build_regex(), config_option_destroy(), aco_option::default_val, aco_option::flags, handler(), aco_option::handler, link_option_to_types(), LOG_ERROR, aco_option::match_type, aco_option::name, name, aco_option::name_regex, aco_option::no_doc, OPT_CUSTOM_T, tmp(), and aco_option::type.
Referenced by __ast_sorcery_object_field_register(), and ast_sorcery_object_fields_register().
|
static |
Default handler for ACLs.
Definition at line 1501 of file config_options.c.
References aco_option::args, ast_append_ha(), error(), aco_option::flags, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 1373 of file config_options.c.
References ao2_cleanup, and ast_cli_unregister().
Referenced by aco_init().
void aco_info_destroy | ( | struct aco_info * | info | ) |
Destroy an initialized aco_info struct.
info | The address of the aco_info struct to destroy |
Definition at line 910 of file config_options.c.
References ast_free, aco_info::files, aco_info::internal, internal_file_types_destroy(), and NULL.
Referenced by aco_info_init(), ast_ari_config_destroy(), ast_ari_config_init(), AST_TEST_DEFINE(), cdr_engine_shutdown(), conf_destroy_config(), destroy_config(), load_module(), sorcery_object_type_destructor(), stasis_cleanup(), unload_features_config(), and unload_module().
int aco_info_init | ( | struct aco_info * | info | ) |
Initialize an aco_info structure.
info | The address of an aco_info struct to initialize |
0 | Success |
non-zero | Failure |
Definition at line 877 of file config_options.c.
References ACO_IGNORE, aco_info_destroy(), ast_calloc, aco_type::category, aco_type::category_match, error(), make_ari_stubs::file, aco_info::files, aco_type::hidden, aco_info::hidden, aco_info::internal, internal_type_init(), aco_type::matchfield, aco_type::matchvalue, aco_info::module, aco_type::name, type, aco_type::type, aco_file::types, and xmldoc_update_config_type().
Referenced by __ast_sorcery_object_register(), ast_ari_config_init(), AST_TEST_DEFINE(), conf_load_config(), load_config(), load_module(), process_config(), and stasis_init().
int aco_init | ( | void | ) |
Provided by config_options.c
Definition at line 1380 of file config_options.c.
References aco_deinit(), ARRAY_LEN, ast_cli_register_multiple, ast_log, ast_register_cleanup(), ast_xmldoc_build_documentation(), and LOG_ERROR.
Referenced by asterisk_daemon().
struct ao2_container* aco_option_container_alloc | ( | void | ) |
Allocate a container to hold config options.
Definition at line 406 of file config_options.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, CONFIG_OPT_BUCKETS, config_opt_cmp(), config_opt_hash(), and NULL.
Referenced by internal_type_init().
|
static |
Definition at line 389 of file config_options.c.
References ao2_callback, ast_log, find_option_cb(), aco_type::internal, LOG_NOTICE, NULL, OBJ_KEY, and aco_type_internal::opts.
Referenced by aco_process_var().
intptr_t aco_option_get_argument | ( | const struct aco_option * | option, |
unsigned int | position | ||
) |
Get the offset position for an argument within a config option.
option | Pointer to the aco_option struct |
arg | Argument number |
position | of the argument |
Definition at line 248 of file config_options.c.
References aco_option::args.
Referenced by timeval_str2struct().
unsigned int aco_option_get_flags | ( | const struct aco_option * | option | ) |
Read the flags of a config option - useful when using a custom callback for a config option.
option | Pointer to the aco_option struct |
value | of the flags on the config option |
Definition at line 243 of file config_options.c.
References aco_option::flags.
Referenced by option_handler_parkedfeature().
int aco_option_register_deprecated | ( | struct aco_info * | info, |
const char * | name, | ||
struct aco_type ** | types, | ||
const char * | aliased_to | ||
) |
Register a deprecated (and aliased) config option.
info | A pointer to the aco_info struct |
name | The name of the deprecated option |
types | An array of valid option types for matching categories to the correct struct type |
aliased_to | The name of the option that this deprecated option matches to |
0 | Success |
-1 | Failure |
Definition at line 217 of file config_options.c.
References ACO_EXACT, aco_option::aliased_to, AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_ref, ast_strlen_zero, config_option_destroy(), aco_option::deprecated, link_option_to_types(), aco_option::match_type, aco_option::name, and name.
Referenced by AST_TEST_DEFINE().
void* aco_pending_config | ( | struct aco_info * | info | ) |
Get pending config changes.
info | An initialized aco_info |
NULL | error |
non-NULL | A pointer to the user-defined config object with un-applied changes |
Definition at line 103 of file config_options.c.
References ast_log, aco_info::internal, LOG_ERROR, NULL, and aco_info_internal::pending.
Referenced by cel_pre_apply_config(), configure_parking_extensions(), features_pre_apply_config(), hepv3_config_pre_apply(), prometheus_config_pre_apply(), udptl_pre_apply_config(), unbound_config_preapply_callback(), verify_default_parking_lot(), and verify_default_profiles().
enum aco_process_status aco_process_ast_config | ( | struct aco_info * | info, |
struct aco_file * | file, | ||
struct ast_config * | cfg | ||
) |
Process config info from an ast_config via options registered with an aco_info.
info | The aco_info to be used for handling the config |
file | The file attached to aco_info that the config represents |
cfg | A pointer to a loaded ast_config to parse |
ACO_PROCESS_OK | Success |
ACO_PROCESS_ERROR | Failure |
Definition at line 617 of file config_options.c.
References ACO_PROCESS_ERROR, ACO_PROCESS_OK, ao2_cleanup, apply_config(), ast_log, error(), aco_file::filename, aco_info::internal, internal_process_ast_config(), LOG_ERROR, NULL, aco_info_internal::pending, aco_info::pre_apply_config, and aco_info::snapshot_alloc.
int aco_process_category_options | ( | struct aco_type * | type, |
struct ast_config * | cfg, | ||
const char * | cat, | ||
void * | obj | ||
) |
Parse each option defined in a config category.
type | The aco_type with the options for parsing |
cfg | The ast_config being parsed |
cat | The config category being parsed |
obj | The user-defined config object that will store the parsed config items |
0 | Success |
-1 | Failure |
Definition at line 805 of file config_options.c.
References aco_process_var(), ast_variable_browse(), ast_variable::next, and var.
Referenced by process_category().
enum aco_process_status aco_process_config | ( | struct aco_info * | info, |
int | reload | ||
) |
Process a config info via the options registered with an aco_info.
info | The config_options_info to be used for handling the config |
reload | Non-zero if this is for a reload. |
ACO_PROCESS_OK | Success |
ACO_PROCESS_ERROR | Failure |
ACO_PROCESS_UNCHANGED | No change due to unedited config file |
Definition at line 652 of file config_options.c.
References ACO_GLOBAL, ACO_IGNORE, ACO_PROCESS_ERROR, ACO_PROCESS_OK, ACO_PROCESS_UNCHANGED, aco_set_defaults(), aco_file::alias, ao2_cleanup, apply_config(), ast_clear_flag, ast_config_destroy(), ast_config_load, ast_debug, ast_log, aco_type::category, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, end, make_ari_stubs::file, aco_file::filename, aco_info::files, aco_info::internal, internal_process_ast_config(), aco_type::item_offset, LOG_ERROR, match(), aco_info::module, NULL, aco_info_internal::pending, aco_info::post_apply_config, aco_info::pre_apply_config, aco_info::snapshot_alloc, aco_type::type, and aco_file::types.
Referenced by __ast_udptl_reload(), AST_TEST_DEFINE(), conf_load_config(), conf_reload_config(), load_config(), load_module(), process_config(), reload(), reload_features_config(), reload_module(), and stasis_init().
int aco_process_var | ( | struct aco_type * | type, |
const char * | cat, | ||
struct ast_variable * | var, | ||
void * | obj | ||
) |
Parse a single ast_variable and apply it to an object.
type | The aco_type associated with the object |
cat | The category to use |
var | A variable to apply to the object |
obj | A pointer to the object to be configured |
0 | Success |
-1 | Failure |
Definition at line 769 of file config_options.c.
References aco_option_find(), aco_option::aliased_to, ao2_cleanup, ao2_ref, ast_log, ast_strdupa, ast_strlen_zero, aco_option::deprecated, aco_option::doc_unavailable, ast_variable::file, aco_option::handler, ast_variable::lineno, LOG_ERROR, LOG_WARNING, ast_variable::name, aco_type::name, RAII_VAR, and ast_variable::value.
Referenced by aco_process_category_options(), ast_sorcery_objectset_apply(), and func_confbridge_helper().
int aco_set_defaults | ( | struct aco_type * | type, |
const char * | category, | ||
void * | obj | ||
) |
Set all default options of obj.
type | The aco_type with the options |
category | The configuration category from which obj is being configured |
obj | The object being configured |
0 | Success |
-1 | Failure |
Definition at line 924 of file config_options.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_log, ast_strlen_zero, ast_variable_new, ast_variables_destroy(), aco_option::default_val, aco_option::handler, aco_type::internal, LOG_ERROR, aco_option::name, ast_variable::name, NULL, aco_type_internal::opts, RAII_VAR, and ast_variable::value.
Referenced by __ast_udptl_reload(), aco_process_config(), ast_sorcery_alloc(), conf_alloc(), load_config(), load_module(), process_category(), process_config(), stasis_init(), unbound_config_apply_default(), verify_default_parking_lot(), and verify_default_profiles().
|
static |
Definition at line 589 of file config_options.c.
References ao2_global_obj_replace_unref, aco_info::global_obj, aco_info::internal, and aco_info_internal::pending.
Referenced by aco_process_ast_config(), aco_process_config(), load_module(), and unload_module().
|
static |
Definition at line 139 of file config_options.c.
References acl_handler_fn(), bool_handler_fn(), boolflag_handler_fn(), chararray_handler_fn(), codec_handler_fn(), double_handler_fn(), int_handler_fn(), noop_handler_fn(), NULL, OPT_ACL_T, OPT_BOOL_T, OPT_BOOLFLAG_T, OPT_CHAR_ARRAY_T, OPT_CODEC_T, OPT_CUSTOM_T, OPT_DOUBLE_T, OPT_INT_T, OPT_NOOP_T, OPT_SOCKADDR_T, OPT_STRINGFIELD_T, OPT_TIMELEN_T, OPT_UINT_T, OPT_YESNO_T, sockaddr_handler_fn(), stringfield_handler_fn(), timelen_handler_fn(), and uint_handler_fn().
Referenced by __aco_option_register().
|
static |
Default option handler for bools (ast_true/ast_false)
Definition at line 1538 of file config_options.c.
References aco_option::args, ast_false(), ast_true(), aco_option::flags, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Default option handler for bools (ast_true/ast_false) that are stored as flags.
Definition at line 1549 of file config_options.c.
References aco_option::args, ast_false(), ast_true(), aco_option::flags, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 165 of file config_options.c.
References ast_free, ast_log, ast_malloc, buf, len(), LOG_ERROR, NULL, and regex().
Referenced by __aco_option_register(), internal_type_init(), and process_category().
|
static |
Default handler for character arrays.
Definition at line 1583 of file config_options.c.
References aco_option::args, ast_copy_string(), ast_strlen_zero, aco_option::flags, len(), and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 1313 of file config_options.c.
References ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, cli_show_module_options(), cli_show_module_type(), cli_show_module_types(), cli_show_modules(), CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_config_module(), complete_config_option(), complete_config_type(), NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 1270 of file config_options.c.
References ao2_cleanup, ao2_find, ast_cli_args::argc, ast_cli_args::argv, AS_OR, ast_assert, ast_cli(), AST_LIST_NEXT, ast_str_buffer(), ast_str_strlen(), ast_term_reset(), ast_xmldoc_printable(), COLOR_BLACK, COLOR_MAGENTA, ast_xml_doc_item::description, ast_cli_args::fd, item, match(), ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, OBJ_KEY, RAII_VAR, ast_xml_doc_item::ref, ast_xml_doc_item::seealso, ast_xml_doc_item::synopsis, ast_xml_doc_item::syntax, term_color(), tmp(), and ast_xml_doc_item::type.
Referenced by cli_show_help().
|
static |
Definition at line 1218 of file config_options.c.
References ao2_cleanup, ao2_find, ast_cli_args::argc, ast_cli_args::argv, ast_assert, ast_cli(), AST_LIST_NEXT, ast_str_buffer(), ast_str_strlen(), ast_xmldoc_printable(), COLOR_BLACK, COLOR_MAGENTA, ast_xml_doc_item::description, ast_cli_args::fd, item, match(), ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, OBJ_KEY, RAII_VAR, ast_xml_doc_item::ref, ast_xml_doc_item::synopsis, ast_xml_doc_item::syntax, term_color(), tmp(), and ast_xml_doc_item::type.
Referenced by cli_show_help().
|
static |
Definition at line 1186 of file config_options.c.
References ao2_cleanup, ao2_find, ast_cli_args::argc, ast_cli_args::argv, ast_assert, ast_cli(), AST_LIST_NEXT, ast_str_buffer(), ast_str_strlen(), ast_xmldoc_printable(), ast_cli_args::fd, item, ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, OBJ_KEY, RAII_VAR, ast_xml_doc_item::synopsis, tmp(), and ast_xml_doc_item::type.
Referenced by cli_show_help().
|
static |
Definition at line 1162 of file config_options.c.
References ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_args::argc, ast_assert, ast_cli(), ast_cli_args::fd, item, and ast_xml_doc_item::name.
Referenced by cli_show_help().
|
static |
Default option handler for codec preferences/capabilities.
Definition at line 1512 of file config_options.c.
References aco_option::args, ast_format_cap_update_by_allow_disallow(), aco_option::flags, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 965 of file config_options.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_completion_add(), ast_strdup, ast_xml_doc_item::name, and NULL.
Referenced by cli_show_help().
|
static |
Definition at line 1016 of file config_options.c.
References ao2_find, ao2_ref, ast_cli_completion_add(), AST_LIST_NEXT, ast_strdup, sip_to_pjsip::info(), ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, OBJ_KEY, ast_xml_doc_item::ref, and ast_xml_doc_item::type.
Referenced by cli_show_help().
|
static |
Definition at line 989 of file config_options.c.
References ao2_find, ao2_ref, ast_cli_completion_add(), AST_LIST_NEXT, ast_strdup, sip_to_pjsip::info(), ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, OBJ_KEY, and ast_xml_doc_item::type.
Referenced by cli_show_help().
|
static |
Definition at line 365 of file config_options.c.
References CMP_MATCH, CMP_STOP, aco_option::name, name, aco_option::obj, and OBJ_KEY.
Referenced by aco_option_container_alloc().
|
static |
Definition at line 358 of file config_options.c.
References ast_str_case_hash(), aco_option::name, name, aco_option::obj, and OBJ_KEY.
Referenced by aco_option_container_alloc().
|
static |
Definition at line 112 of file config_options.c.
References acl_handler_fn(), ACO_REGEX, ast_free, bool_handler_fn(), boolflag_handler_fn(), chararray_handler_fn(), codec_handler_fn(), double_handler_fn(), int_handler_fn(), aco_option::match_type, name, aco_option::name_regex, noop_handler_fn(), aco_option::obj, regex(), sockaddr_handler_fn(), stringfield_handler_fn(), timelen_handler_fn(), type, uint_handler_fn(), var, xmldoc_update_config_option(), and xmldoc_update_config_type().
Referenced by __aco_option_register(), and aco_option_register_deprecated().
|
static |
Default option handler for doubles.
Definition at line 1492 of file config_options.c.
References aco_option::args, ast_parse_arg(), aco_option::flags, PARSE_DOUBLE, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 372 of file config_options.c.
References ACO_EXACT, ACO_PREFIX, ACO_REGEX, ast_log, CMP_MATCH, CMP_STOP, LOG_ERROR, match(), aco_option::match_type, aco_option::name, name, aco_option::name_regex, NULL, and aco_option::obj.
Referenced by aco_option_find().
|
static |
Definition at line 257 of file config_options.c.
References AST_LIST_NEXT, ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, and ast_xml_doc_item::ref.
Referenced by xmldoc_update_config_option().
|
static |
Definition at line 283 of file config_options.c.
References AST_LIST_NEXT, ast_xml_doc_item::name, ast_xml_doc_item::next, NULL, and ast_xml_doc_item::type.
Referenced by xmldoc_update_config_type().
|
static |
Default option handler for signed integers.
Definition at line 1399 of file config_options.c.
References aco_option::args, ast_log, ast_parse_arg(), aco_option::flags, LOG_WARNING, ast_variable::name, PARSE_DEFAULT, PARSE_IN_RANGE, PARSE_INT32, PARSE_RANGE_DEFAULTS, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 412 of file config_options.c.
References ACO_BLACKLIST, ACO_BLACKLIST_ARRAY, ACO_BLACKLIST_EXACT, ACO_WHITELIST, ACO_WHITELIST_ARRAY, ACO_WHITELIST_EXACT, categories, aco_type::category, aco_type::category_match, aco_type::internal, NULL, and aco_type_internal::regex.
Referenced by internal_aco_type_find().
|
static |
Definition at line 451 of file config_options.c.
References ast_log, ast_strlen_zero, ast_variable_retrieve(), internal_aco_type_category_check(), LOG_ERROR, match(), aco_type::matchfield, aco_type::matchfunc, aco_type::matchvalue, NULL, and aco_file::types.
Referenced by process_category().
|
static |
Definition at line 837 of file config_options.c.
References internal_type_destroy(), NULL, and aco_file::types.
Referenced by aco_info_destroy().
|
static |
Definition at line 596 of file config_options.c.
References ACO_PROCESS_ERROR, ACO_PROCESS_OK, ast_category_browse(), ast_strlen_zero, NULL, aco_file::preload, and process_category().
Referenced by aco_process_ast_config(), and aco_process_config().
|
static |
Definition at line 818 of file config_options.c.
References ao2_cleanup, ast_free, aco_type::internal, NULL, aco_type_internal::opts, and aco_type_internal::regex.
Referenced by internal_file_types_destroy(), and internal_type_init().
|
static |
Definition at line 848 of file config_options.c.
References ACO_BLACKLIST, ACO_BLACKLIST_ARRAY, ACO_BLACKLIST_EXACT, aco_option_container_alloc(), ACO_WHITELIST, ACO_WHITELIST_ARRAY, ACO_WHITELIST_EXACT, ast_calloc, build_regex(), aco_type::category, aco_type::category_match, aco_type::internal, internal_type_destroy(), aco_type_internal::opts, and aco_type_internal::regex.
Referenced by aco_info_init().
|
static |
Definition at line 484 of file config_options.c.
References ast_strlen_zero, and aco_file::preload.
Referenced by process_category().
|
static |
Definition at line 186 of file config_options.c.
References ACO_REGEX, ao2_link, ao2_ref, ao2_unlink, ast_log, aco_option::default_val, aco_option::doc_unavailable, aco_info::hidden, aco_type::internal, LOG_ERROR, aco_option::match_type, aco_info::module, aco_option::name, aco_type::name, aco_option::no_doc, aco_type_internal::opts, aco_option::type, type, and xmldoc_update_config_option().
Referenced by __aco_option_register(), and aco_option_register_deprecated().
|
static |
Default handler for doing nothing.
Definition at line 1574 of file config_options.c.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 500 of file config_options.c.
References ACO_GLOBAL, ACO_IGNORE, ACO_ITEM, aco_process_category_options(), aco_set_defaults(), ao2_cleanup, ao2_link, ast_free, ast_log, ast_strlen_zero, build_regex(), aco_file::filename, aco_info::internal, internal_aco_type_find(), is_preload(), aco_type::item_alloc, aco_type::item_find, aco_type::item_offset, aco_type::item_pre_process, aco_type::item_prelink, LOG_ERROR, NULL, aco_info_internal::pending, RAII_VAR, aco_file::skip_category, type, and aco_type::type.
Referenced by internal_process_ast_config().
|
static |
Default handler for ast_sockaddrs.
Definition at line 1566 of file config_options.c.
References aco_option::args, ast_parse_arg(), aco_option::flags, PARSE_ADDR, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Default option handler for stringfields.
Definition at line 1521 of file config_options.c.
References aco_option::args, ast_string_field_ptr_set_by_fields, ast_strlen_zero, aco_option::flags, pool, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Default option handler for timelen signed integers.
Definition at line 1459 of file config_options.c.
References aco_option::args, ast_log, ast_parse_arg(), aco_option::flags, LOG_WARNING, ast_variable::name, PARSE_DEFAULT, PARSE_IN_RANGE, PARSE_RANGE_DEFAULTS, PARSE_TIMELEN, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Default option handler for unsigned integers.
Definition at line 1429 of file config_options.c.
References aco_option::args, ast_log, ast_parse_arg(), aco_option::flags, LOG_WARNING, ast_variable::name, PARSE_DEFAULT, PARSE_IN_RANGE, PARSE_RANGE_DEFAULTS, PARSE_UINT32, and ast_variable::value.
Referenced by ast_config_option_default_handler(), and config_option_destroy().
|
static |
Definition at line 1124 of file config_options.c.
References aco_option_type_string, ao2_cleanup, ao2_find, ARRAY_LEN, ast_assert, ast_log, ast_xml_set_attribute(), ast_xml_xpath_get_first_result(), ast_xml_xpath_results_free(), ast_xmldoc_query(), ast_xmldoc_regenerate_doc_item(), find_xmldoc_option(), LOG_ERROR, LOG_WARNING, NULL, OBJ_KEY, RAII_VAR, and XMLDOC_STRICT.
Referenced by config_option_destroy(), and link_option_to_types().
|
static |
Definition at line 1048 of file config_options.c.
References ACO_BLACKLIST, ACO_BLACKLIST_ARRAY, ACO_BLACKLIST_EXACT, ACO_WHITELIST, ACO_WHITELIST_ARRAY, ACO_WHITELIST_EXACT, ao2_cleanup, ao2_find, ast_log, ast_strlen_zero, ast_xml_new_child(), ast_xml_set_attribute(), ast_xml_set_text(), ast_xml_xpath_get_first_result(), ast_xml_xpath_results_free(), ast_xmldoc_query(), ast_xmldoc_regenerate_doc_item(), find_xmldoc_type(), LOG_WARNING, NULL, OBJ_KEY, RAII_VAR, tmp(), type, and XMLDOC_STRICT.
Referenced by aco_info_init(), and config_option_destroy().
|
static |
Value of the aco_option_type enum as strings.
Definition at line 85 of file config_options.c.
Referenced by xmldoc_update_config_option().
|
static |
Definition at line 1369 of file config_options.c.
|
static |
Definition at line 82 of file config_options.c.