Asterisk - The Open Source Telephony Project
18.5.0
|
Asterisk datastore objects. More...
#include "asterisk/linkedlists.h"
Go to the source code of this file.
Data Structures | |
struct | ast_datastore |
Structure for a data store object. More... | |
struct | ast_datastore_info |
Structure for a data store type. More... | |
Macros | |
#define | ast_datastore_alloc(info, uid) __ast_datastore_alloc(info, uid, AST_MODULE_SELF, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
Functions | |
struct ast_datastore * | __ast_datastore_alloc (const struct ast_datastore_info *info, const char *uid, struct ast_module *mod, const char *file, int line, const char *function) |
Create a data store object. More... | |
int | ast_datastore_free (struct ast_datastore *datastore) |
Free a data store object. More... | |
int | ast_datastores_add (struct ao2_container *datastores, struct ast_datastore *datastore) |
Add a data store to a container. More... | |
struct ao2_container * | ast_datastores_alloc (void) |
Allocate a specialized data stores container. More... | |
struct ast_datastore * | ast_datastores_alloc_datastore (const struct ast_datastore_info *info, const char *uid) |
Allocate a datastore for use with the datastores container. More... | |
struct ast_datastore * | ast_datastores_find (struct ao2_container *datastores, const char *name) |
Find a data store in a container. More... | |
void | ast_datastores_remove (struct ao2_container *datastores, const char *name) |
Remove a data store from a container. More... | |
Asterisk datastore objects.
Definition in file datastore.h.
#define ast_datastore_alloc | ( | info, | |
uid | |||
) | __ast_datastore_alloc(info, uid, AST_MODULE_SELF, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
Definition at line 89 of file datastore.h.
Referenced by __after_bridge_set_goto(), _macro_exec(), acf_curlopt_write(), acf_iaxvar_write(), acf_odbc_read(), add_features_datastore(), add_masquerade_store(), add_to_agi(), after_bridge_cb_setup(), apply_plc(), ast_cel_fabricate_channel_from_event(), ast_channel_cc_params_init(), ast_channel_datastore_inherit(), ast_channel_suppress(), ast_do_pickup(), ast_iax2_new(), ast_jb_create_framehook(), ast_setup_cc_recall_datastore(), ast_stir_shaken_add_verification(), audiohook_volume_get(), authenticate_reply(), bridge_channel_impart_add(), bridge_features_ds_set_full(), calendar_query_exec(), cc_interfaces_datastore_init(), channel_feature_hooks_set_full(), command_prestart_queue_command(), create_msg_q_chan(), create_parked_subscription_full(), create_transaction(), detect_write(), dial_masquerade_datastore_add(), do_notify(), dtmfstore_exec(), dundi_query_read(), enable_jack_hook(), enum_query_read(), find_or_create_details(), frame_drop_helper(), frame_trace_helper(), func_channel_write_real(), func_confbridge_helper(), get_feature_ds(), get_lock(), get_replace_channel_store(), gosub_exec(), handle_remb_set(), init_hook(), lua_get_state(), max_forwards_datastore_alloc(), msg_datastore_find_or_create(), MYSQL_exec(), pitchshift_helper(), raise_exception(), reload(), save_dialstring(), scramble_write(), set_hold_intercept(), set_internal_datastore(), set_talk_detect(), set_timeout(), setup_async_playback_datastore(), setup_bridge_roles_datastore(), setup_mixmonitor_ds(), setup_park_common_datastore(), shared_write(), smdi_msg_retrieve_read(), socket_process_helper(), speech_create(), speex_write(), srv_datastore_setup(), stasis_app_channel_set_stasis_end_published(), t38_attach_framehook(), and volume_write().
struct ast_datastore* __ast_datastore_alloc | ( | const struct ast_datastore_info * | info, |
const char * | uid, | ||
struct ast_module * | mod, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Create a data store object.
[in] | info | information describing the data store object |
[in] | uid | unique identifer |
[in] | mod | The module to hold until this datastore is freed. |
file,line,function |
Definition at line 39 of file datastore.c.
References __ast_calloc(), ast_free, ast_module_ref, ast_strdup, ast_strlen_zero, ast_datastore::info, sip_to_pjsip::info(), ast_datastore::mod, NULL, and ast_datastore::uid.
int ast_datastore_free | ( | struct ast_datastore * | datastore | ) |
Free a data store object.
[in] | datastore | datastore to free |
Definition at line 68 of file datastore.c.
References AO2_STRING_FIELD_CMP_FN(), AO2_STRING_FIELD_HASH_FN(), ast_free, ast_module_unref, ast_datastore::data, ast_datastore_info::destroy, ast_datastore::info, ast_datastore::mod, NULL, and ast_datastore::uid.
Referenced by __after_bridge_set_goto(), acf_curlopt_write(), acf_fetch(), acf_iaxvar_write(), acf_odbc_read(), add_features_datastore(), add_to_agi(), adjust_frame_for_plc(), after_bridge_cb_setup(), apply_plc(), ast_bridge_discard_after_goto(), ast_bridge_setup_after_goto(), ast_cel_fabricate_channel_from_event(), ast_channel_destructor(), ast_channel_unsuppress(), ast_do_pickup(), ast_dummy_channel_destructor(), ast_iax2_new(), ast_jb_create_framehook(), ast_setup_cc_recall_datastore(), audiohook_volume_get(), authenticate_reply(), bridge_channel_impart_add(), bridge_features_ds_set_full(), bridge_timeout(), cc_interfaces_datastore_init(), chan_cleanup(), channel_feature_hooks_set_full(), create_parked_subscription_full(), create_transaction(), detect_write(), dial_masquerade_datastore_add(), dial_masquerade_fixup(), disable_jack_hook(), dtmfstore_exec(), enable_jack_hook(), exec_odbcfinish(), fixup_callback(), frame_drop_helper(), frame_trace_helper(), func_confbridge_helper(), get_lock(), gosub_exec(), init_hook(), lua_get_state(), max_forwards_datastore_alloc(), mixmonitor_ds_remove_and_free(), msg_datastore_find_or_create(), pitchshift_helper(), raise_exception(), remove_detect(), remove_dial_masquerade(), remove_dial_masquerade_caller(), remove_dtmf_store(), remove_hold_intercept(), remove_masquerade_store(), remove_scrambler(), remove_stasis_end_published(), remove_talk_detect(), save_dialstring(), scramble_write(), session_destructor(), set_dial_masquerade(), set_hold_intercept(), set_talk_detect(), setup_async_playback_datastore(), setup_bridge_roles_datastore(), setup_park_common_datastore(), shared_write(), socket_process_helper(), speech_datastore_destroy(), speex_write(), srv_query_read(), stop_mixmonitor_full(), volume_write(), wipe_park_common_datastore(), and wipe_subscription_datastore().
int ast_datastores_add | ( | struct ao2_container * | datastores, |
struct ast_datastore * | datastore | ||
) |
Add a data store to a container.
[in] | datastores | container to store datastore in |
[in] | datastore | datastore to add |
0 | success |
-1 | failure |
Definition at line 101 of file datastore.c.
References ao2_link, ast_assert, ast_strlen_zero, ast_datastore::info, NULL, and ast_datastore::uid.
Referenced by ast_sip_publication_add_datastore(), ast_sip_subscription_add_datastore(), and dialog_info_generate_body_content().
struct ao2_container* ast_datastores_alloc | ( | void | ) |
Allocate a specialized data stores container.
Definition at line 95 of file datastore.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, DATASTORE_BUCKETS, and NULL.
Referenced by allocate_subscription(), publisher_start(), and sip_create_publication().
struct ast_datastore* ast_datastores_alloc_datastore | ( | const struct ast_datastore_info * | info, |
const char * | uid | ||
) |
Allocate a datastore for use with the datastores container.
[in] | info | information about the datastore |
[in] | uid | unique identifier for the datastore |
non-NULL | success |
NULL | failure |
Definition at line 138 of file datastore.c.
References ao2_alloc, ao2_ref, ast_strdup, ast_strlen_zero, ast_uuid_generate_str(), AST_UUID_STR_LEN, datastore_destroy(), ast_datastore::info, sip_to_pjsip::info(), NULL, and ast_datastore::uid.
Referenced by ast_sip_subscription_alloc_datastore(), and dialog_info_generate_body_content().
struct ast_datastore* ast_datastores_find | ( | struct ao2_container * | datastores, |
const char * | name | ||
) |
Find a data store in a container.
[in] | datastores | container to find datastore in |
[in] | name | name of the data store to find |
non-NULL | success |
NULL | failure |
Definition at line 119 of file datastore.c.
References ao2_find, and OBJ_SEARCH_KEY.
Referenced by ast_sip_publication_get_datastore(), ast_sip_subscription_get_datastore(), and dialog_info_generate_body_content().
void ast_datastores_remove | ( | struct ao2_container * | datastores, |
const char * | name | ||
) |
Remove a data store from a container.
[in] | datastores | container to remove datastore from |
[in] | name | name of the data store to remove |
Definition at line 114 of file datastore.c.
References ao2_find, OBJ_NODATA, OBJ_SEARCH_KEY, and OBJ_UNLINK.
Referenced by ast_sip_publication_remove_datastore(), and ast_sip_subscription_remove_datastore().