Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Functions | Variables
res_sorcery_config.c File Reference

Sorcery Configuration File Object Wizard. More...

#include "asterisk.h"
#include <regex.h>
#include "asterisk/module.h"
#include "asterisk/sorcery.h"
#include "asterisk/astobj2.h"
#include "asterisk/config.h"
#include "asterisk/uuid.h"
#include "asterisk/hashtab.h"

Go to the source code of this file.

Data Structures

struct  sorcery_config
 Structure for storing configuration file sourced objects. More...
 
struct  sorcery_config_fields_cmp_params
 Structure used for fields comparison. More...
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int load_module (void)
 
static void sorcery_config_close (void *data)
 
static void sorcery_config_destructor (void *obj)
 Destructor function for sorcery config.
 
static int sorcery_config_fields_cmp (void *obj, void *arg, int flags)
 
static void sorcery_config_internal_load (void *data, const struct ast_sorcery *sorcery, const char *type, unsigned int reload)
 
static void sorcery_config_load (void *data, const struct ast_sorcery *sorcery, const char *type)
 
static void * sorcery_config_open (const char *data)
 
static void sorcery_config_reload (void *data, const struct ast_sorcery *sorcery, const char *type)
 
static void * sorcery_config_retrieve_fields (const struct ast_sorcery *sorcery, void *data, const char *type, const struct ast_variable *fields)
 
static void * sorcery_config_retrieve_id (const struct ast_sorcery *sorcery, void *data, const char *type, const char *id)
 
static void sorcery_config_retrieve_multiple (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields)
 
static void sorcery_config_retrieve_prefix (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *prefix, const size_t prefix_len)
 
static void sorcery_config_retrieve_regex (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex)
 
static int sorcery_is_configuration_met (const struct ast_sorcery *sorcery, const char *type, struct ast_category *category, struct sorcery_config *config)
 Internal function which determines if criteria has been met for considering an object set applicable.
 
static int sorcery_is_criteria_met (struct ast_category *category, struct sorcery_config *config)
 Internal function which determines if a category matches based on criteria.
 
static int sorcery_is_explicit_name_met (const struct ast_sorcery *sorcery, const char *type, struct ast_category *category, struct sorcery_config *config)
 Internal function which determines if a category matches based on explicit name.
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Sorcery Configuration File Object Wizard" , .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, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DRIVER, }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static struct ast_sorcery_wizard config_object_wizard
 

Detailed Description

Sorcery Configuration File Object Wizard.

Author
Joshua Colp jcolp.nosp@m.@dig.nosp@m.ium.c.nosp@m.om

Definition in file res_sorcery_config.c.