Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Sorcery Realtime Object Wizard. More...
Go to the source code of this file.
Data Structures | |
struct | sorcery_config |
Structure for storing configuration file sourced objects. More... | |
Macros | |
#define | UUID_FIELD "id" |
They key field used to store the unique identifier for the object. | |
Enumerations | |
enum | unqualified_fetch { UNQUALIFIED_FETCH_NO , UNQUALIFIED_FETCH_WARN , UNQUALIFIED_FETCH_YES , UNQUALIFIED_FETCH_ERROR } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_module (void) |
static void | sorcery_realtime_close (void *data) |
static int | sorcery_realtime_create (const struct ast_sorcery *sorcery, void *data, void *object) |
static int | sorcery_realtime_delete (const struct ast_sorcery *sorcery, void *data, void *object) |
static struct ast_variable * | sorcery_realtime_filter_objectset (struct ast_variable *objectset, struct ast_variable **id, const struct ast_sorcery *sorcery, const char *type) |
Internal helper function which returns a filtered objectset. | |
static void * | sorcery_realtime_open (const char *data) |
static void * | sorcery_realtime_retrieve_fields (const struct ast_sorcery *sorcery, void *data, const char *type, const struct ast_variable *fields) |
static void * | sorcery_realtime_retrieve_id (const struct ast_sorcery *sorcery, void *data, const char *type, const char *id) |
static void | sorcery_realtime_retrieve_multiple (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields) |
static void | sorcery_realtime_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_realtime_retrieve_regex (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex) |
static int | sorcery_realtime_update (const struct ast_sorcery *sorcery, void *data, void *object) |
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 Realtime Object Wizard" , .key = ASTERISK_GPL_KEY , .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_info * | ast_module_info = &__mod_info |
static struct ast_sorcery_wizard | realtime_object_wizard |
Sorcery Realtime Object Wizard.
Definition in file res_sorcery_realtime.c.
#define UUID_FIELD "id" |
They key field used to store the unique identifier for the object.
Definition at line 39 of file res_sorcery_realtime.c.
enum unqualified_fetch |
Enumerator | |
---|---|
UNQUALIFIED_FETCH_NO | |
UNQUALIFIED_FETCH_WARN | |
UNQUALIFIED_FETCH_YES | |
UNQUALIFIED_FETCH_ERROR |
Definition at line 41 of file res_sorcery_realtime.c.
|
static |
Definition at line 407 of file res_sorcery_realtime.c.
|
static |
Definition at line 407 of file res_sorcery_realtime.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 407 of file res_sorcery_realtime.c.
|
static |
Definition at line 387 of file res_sorcery_realtime.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_sorcery_wizard_register, and realtime_object_wizard.
|
static |
Definition at line 382 of file res_sorcery_realtime.c.
References ast_free.
|
static |
Definition at line 80 of file res_sorcery_realtime.c.
References ast_sorcery_object_get_id(), ast_sorcery_objectset_create, ast_store_realtime_fields(), ast_variable_new, ast_variables_destroy(), config, id, RAII_VAR, sorcery, and UUID_FIELD.
|
static |
Definition at line 322 of file res_sorcery_realtime.c.
References ast_destroy_realtime_fields(), ast_sorcery_object_get_id(), config, NULL, and UUID_FIELD.
|
static |
Internal helper function which returns a filtered objectset.
The following are filtered out of the objectset:
objectset | Objectset to filter. | |
[out] | id | The ID of the sorcery object, as found in the objectset. |
sorcery | The sorcery instance that is requesting an objectset. | |
type | The object type |
Definition at line 111 of file res_sorcery_realtime.c.
References ao2_cleanup, ast_debug, ast_log, ast_sorcery_get_object_type(), ast_sorcery_is_object_field_registered(), ast_variables_destroy(), LOG_WARNING, ast_sorcery_object_type::name, ast_variable::next, NULL, sorcery, type, and UUID_FIELD.
Referenced by sorcery_realtime_retrieve_fields(), and sorcery_realtime_retrieve_multiple().
|
static |
Definition at line 329 of file res_sorcery_realtime.c.
References ast_calloc, ast_log, ast_realtime_is_mapping_defined(), ast_strdupa, ast_strlen_zero(), config, sorcery_config::family, LOG_ERROR, name, NULL, strsep(), UNQUALIFIED_FETCH_ERROR, UNQUALIFIED_FETCH_NO, UNQUALIFIED_FETCH_WARN, UNQUALIFIED_FETCH_YES, and value.
|
static |
Definition at line 163 of file res_sorcery_realtime.c.
References ao2_cleanup, ast_load_realtime_fields(), ast_sorcery_alloc(), ast_sorcery_objectset_apply(), ast_variables_destroy(), config, id, NULL, RAII_VAR, sorcery, sorcery_realtime_filter_objectset(), and type.
Referenced by sorcery_realtime_retrieve_id().
|
static |
Definition at line 186 of file res_sorcery_realtime.c.
References ast_variable_new, ast_variables_destroy(), RAII_VAR, sorcery, sorcery_realtime_retrieve_fields(), type, and UUID_FIELD.
|
static |
Definition at line 193 of file res_sorcery_realtime.c.
References ao2_cleanup, ao2_link, ast_category_browse_filtered(), ast_category_detach_variables(), ast_config_destroy(), ast_load_realtime_multientry_fields(), ast_log, ast_sorcery_alloc(), ast_sorcery_objectset_apply(), ast_variable_new, ast_variables_destroy(), config, id, LOG_ERROR, LOG_WARNING, NULL, RAII_VAR, sorcery, sorcery_realtime_filter_objectset(), type, UNQUALIFIED_FETCH_ERROR, UNQUALIFIED_FETCH_NO, UNQUALIFIED_FETCH_WARN, UUID_FIELD, and value.
Referenced by sorcery_realtime_retrieve_prefix(), and sorcery_realtime_retrieve_regex().
|
static |
Definition at line 268 of file res_sorcery_realtime.c.
References ast_variable_new, ast_variables_destroy(), NULL, prefix, RAII_VAR, sorcery, sorcery_realtime_retrieve_multiple(), type, UUID_FIELD, and value.
|
static |
Definition at line 246 of file res_sorcery_realtime.c.
References ast_strlen_zero(), ast_variable_new, ast_variables_destroy(), NULL, RAII_VAR, regex(), sorcery, sorcery_realtime_retrieve_multiple(), type, UUID_FIELD, and value.
|
static |
Definition at line 285 of file res_sorcery_realtime.c.
References ast_sorcery_object_get_id(), ast_sorcery_objectset_create, ast_sorcery_update_or_create_on_update_miss, ast_store_realtime_fields(), ast_update_realtime_fields(), ast_variable_new, ast_variables_destroy(), config, id, RAII_VAR, sorcery, and UUID_FIELD.
|
static |
Definition at line 396 of file res_sorcery_realtime.c.
References ast_sorcery_wizard_unregister(), and realtime_object_wizard.
|
static |
Definition at line 407 of file res_sorcery_realtime.c.
|
static |
Definition at line 407 of file res_sorcery_realtime.c.
|
static |
Definition at line 66 of file res_sorcery_realtime.c.
Referenced by load_module(), and unload_module().