Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Sorcery In-Memory Object Wizard. More...
#include "asterisk.h"
#include <regex.h>
#include "asterisk/module.h"
#include "asterisk/sorcery.h"
#include "asterisk/astobj2.h"
Go to the source code of this file.
Data Structures | |
struct | sorcery_memory_fields_cmp_params |
Structure used for fields comparison. More... | |
Macros | |
#define | OBJECT_BUCKETS 53 |
Number of buckets for sorcery objects. More... | |
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_memory_close (void *data) |
static int | sorcery_memory_cmp (void *obj, void *arg, int flags) |
Comparator function for sorcery objects. More... | |
static int | sorcery_memory_create (const struct ast_sorcery *sorcery, void *data, void *object) |
static int | sorcery_memory_delete (const struct ast_sorcery *sorcery, void *data, void *object) |
static int | sorcery_memory_fields_cmp (void *obj, void *arg, int flags) |
static int | sorcery_memory_hash (const void *obj, const int flags) |
Hashing function for sorcery objects. More... | |
static void * | sorcery_memory_open (const char *data) |
static void * | sorcery_memory_retrieve_fields (const struct ast_sorcery *sorcery, void *data, const char *type, const struct ast_variable *fields) |
static void * | sorcery_memory_retrieve_id (const struct ast_sorcery *sorcery, void *data, const char *type, const char *id) |
static void | sorcery_memory_retrieve_multiple (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const struct ast_variable *fields) |
static void | sorcery_memory_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_memory_retrieve_regex (const struct ast_sorcery *sorcery, void *data, const char *type, struct ao2_container *objects, const char *regex) |
static int | sorcery_memory_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 In-Memory 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_info * | ast_module_info = &__mod_info |
static struct ast_sorcery_wizard | memory_object_wizard |
Sorcery In-Memory Object Wizard.
Definition in file res_sorcery_memory.c.
#define OBJECT_BUCKETS 53 |
Number of buckets for sorcery objects.
Definition at line 40 of file res_sorcery_memory.c.
|
static |
Definition at line 282 of file res_sorcery_memory.c.
|
static |
Definition at line 282 of file res_sorcery_memory.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 282 of file res_sorcery_memory.c.
|
static |
Definition at line 262 of file res_sorcery_memory.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_sorcery_wizard_register, and memory_object_wizard.
|
static |
Definition at line 257 of file res_sorcery_memory.c.
References ao2_ref.
|
static |
Comparator function for sorcery objects.
Definition at line 98 of file res_sorcery_memory.c.
References ast_sorcery_object_get_id(), CMP_MATCH, CMP_STOP, and OBJ_KEY.
Referenced by sorcery_memory_open().
|
static |
Definition at line 105 of file res_sorcery_memory.c.
References ao2_find, ao2_link_flags, ao2_lock, ao2_ref, ao2_unlock, ast_sorcery_object_get_id(), OBJ_KEY, and OBJ_NOLOCK.
|
static |
Definition at line 244 of file res_sorcery_memory.c.
References ao2_cleanup, ao2_find, ast_sorcery_object_get_id(), OBJ_KEY, OBJ_UNLINK, and RAII_VAR.
|
static |
Definition at line 125 of file res_sorcery_memory.c.
References ao2_link, ast_sorcery_object_get_id(), ast_sorcery_objectset_create, ast_variable_lists_match(), ast_variables_destroy(), CMP_MATCH, CMP_STOP, sorcery_memory_fields_cmp_params::container, sorcery_memory_fields_cmp_params::fields, NULL, sorcery_memory_fields_cmp_params::prefix, sorcery_memory_fields_cmp_params::prefix_len, RAII_VAR, sorcery_memory_fields_cmp_params::regex, and sorcery_memory_fields_cmp_params::sorcery.
Referenced by sorcery_memory_retrieve_fields(), sorcery_memory_retrieve_multiple(), sorcery_memory_retrieve_prefix(), and sorcery_memory_retrieve_regex().
|
static |
Hashing function for sorcery objects.
Definition at line 90 of file res_sorcery_memory.c.
References ast_sorcery_object_get_id(), ast_str_hash(), and OBJ_KEY.
Referenced by sorcery_memory_open().
|
static |
Definition at line 251 of file res_sorcery_memory.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, NULL, OBJECT_BUCKETS, sorcery_memory_cmp(), and sorcery_memory_hash().
|
static |
Definition at line 161 of file res_sorcery_memory.c.
References ao2_callback, sorcery_memory_fields_cmp_params::fields, NULL, sorcery, sorcery_memory_fields_cmp_params::sorcery, and sorcery_memory_fields_cmp().
|
static |
|
static |
Definition at line 182 of file res_sorcery_memory.c.
References ao2_callback, sorcery_memory_fields_cmp_params::fields, sorcery, sorcery_memory_fields_cmp_params::sorcery, and sorcery_memory_fields_cmp().
|
static |
Definition at line 214 of file res_sorcery_memory.c.
References ao2_callback, prefix, sorcery_memory_fields_cmp_params::prefix_len, sorcery, sorcery_memory_fields_cmp_params::sorcery, and sorcery_memory_fields_cmp().
|
static |
Definition at line 193 of file res_sorcery_memory.c.
References ao2_callback, ast_strlen_zero(), regex(), sorcery, sorcery_memory_fields_cmp_params::sorcery, and sorcery_memory_fields_cmp().
|
static |
Definition at line 226 of file res_sorcery_memory.c.
References ao2_cleanup, ao2_find, ao2_link, ao2_lock, ao2_unlock, ast_sorcery_object_get_id(), NULL, OBJ_KEY, OBJ_UNLINK, and RAII_VAR.
|
static |
Definition at line 271 of file res_sorcery_memory.c.
References ast_sorcery_wizard_unregister(), and memory_object_wizard.
|
static |
Definition at line 282 of file res_sorcery_memory.c.
|
static |
Definition at line 282 of file res_sorcery_memory.c.
|
static |
Definition at line 54 of file res_sorcery_memory.c.
Referenced by load_module(), and unload_module().