Asterisk - The Open Source Telephony Project GIT-master-8f1982c
|
Internal channel functions for channel.c to use. More...
Go to the source code of this file.
Macros | |
#define | ast_channel_internal_alloc(destructor, assignedid, requestor) __ast_channel_internal_alloc(destructor, assignedid, requestor, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
Variables | |
const struct ast_channelstorage_driver * | current_channel_storage_driver |
The current channel storage driver. More... | |
struct ast_channelstorage_instance * | current_channel_storage_instance |
The current channel storage instance. More... | |
Internal channel functions for channel.c to use.
Definition in file channel_internal.h.
#define ast_channel_internal_alloc | ( | destructor, | |
assignedid, | |||
requestor | |||
) | __ast_channel_internal_alloc(destructor, assignedid, requestor, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
Definition at line 24 of file channel_internal.h.
struct ast_channel * __ast_channel_internal_alloc | ( | void(*)(void *obj) | destructor, |
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Definition at line 1267 of file channel_internal_api.c.
References __ast_channel_internal_alloc_with_initializers(), make_ari_stubs::file, and NULL.
Referenced by __ast_dummy_channel_alloc().
struct ast_channel * __ast_channel_internal_alloc_with_initializers | ( | void(*)(void *obj) | destructor, |
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const struct ast_channel_initializers * | initializers, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Definition at line 1190 of file channel_internal_api.c.
References __ao2_alloc(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ast_atomic_fetchadd_int(), AST_CHANNEL_INITIALIZERS_VERSION, ast_channel_unref, ast_config_AST_SYSTEM_NAME, ast_copy_string(), AST_FLAGS_ALL, ast_log, AST_MAX_FDS, ast_set_flag, ast_string_field_init, ast_strlen_zero(), AST_VECTOR_INIT, ast_channel_id::creation_time, ast_channel_id::creation_unique, ast_channel::dialed_causes, DIALED_CAUSES_BUCKETS, make_ari_stubs::file, ast_channel::linkedid, LOG_ERROR, NULL, pvt_cause_cmp_fn(), pvt_cause_hash_fn(), ast_channel::snapshot_segment_flags, ast_channel_id::tenant_id, ast_channel_initializers::tenantid, ast_channel_id::unique_id, ast_assigned_ids::uniqueid, ast_channel::uniqueid, uniqueint, and ast_channel_initializers::version.
Referenced by __ast_channel_alloc_ap(), and __ast_channel_internal_alloc().
void ast_channel_close_storage | ( | void | ) |
Definition at line 7939 of file channel.c.
References ast_channelstorage_close(), and current_channel_storage_instance.
void ast_channel_internal_cleanup | ( | struct ast_channel * | chan | ) |
Definition at line 1364 of file channel_internal_api.c.
References ao2_cleanup, ao2_t_ref, ast_channel_internal_set_stream_topology(), ast_string_field_free_memory, AST_VECTOR_FREE, ast_channel::channel_forward, ast_channel::dialed_causes, ast_channel::endpoint_forward, NULL, stasis_forward_cancel(), and ast_channel::topic.
Referenced by ast_channel_destructor(), and ast_dummy_channel_destructor().
enum ast_channel_error ast_channel_internal_errno | ( | void | ) |
Definition at line 1466 of file channel_internal_api.c.
References AST_CHANNEL_ERROR_UNKNOWN, ast_threadstorage_get(), and channel_errno.
Referenced by ast_channel_errno().
void ast_channel_internal_errno_set | ( | enum ast_channel_error | error | ) |
Definition at line 1456 of file channel_internal_api.c.
References ast_threadstorage_get(), channel_errno, and error().
Referenced by __ast_channel_alloc_ap().
void ast_channel_internal_finalize | ( | struct ast_channel * | chan | ) |
Definition at line 1385 of file channel_internal_api.c.
References ast_channel::finalized.
Referenced by __ast_channel_alloc_ap().
int ast_channel_internal_is_finalized | ( | struct ast_channel * | chan | ) |
Definition at line 1390 of file channel_internal_api.c.
References ast_channel::finalized.
Referenced by ast_channel_destructor().
void ast_channel_internal_set_stream_topology | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Definition at line 516 of file channel_internal_api.c.
References ast_stream_topology_free(), channel_set_default_streams(), and ast_channel::stream_topology.
Referenced by __ast_channel_alloc_ap(), ast_channel_internal_cleanup(), ast_channel_nativeformats_set(), and ast_channel_set_stream_topology().
void ast_channel_internal_set_stream_topology_change_source | ( | struct ast_channel * | chan, |
void * | change_source | ||
) |
Definition at line 524 of file channel_internal_api.c.
References ast_channel::stream_topology_change_source.
Referenced by ast_channel_request_stream_topology_change(), and ast_channel_stream_topology_changed_externally().
int ast_channel_internal_setup_topics | ( | struct ast_channel * | chan | ) |
Definition at line 1420 of file channel_internal_api.c.
References ao2_ref, ast_asprintf, ast_assert, ast_atomic_fetchadd_int(), ast_channel_topic(), ast_channel_topic_all(), ast_free, ast_strlen_zero(), ast_channel::channel_forward, NULL, stasis_forward_all(), stasis_topic_create(), ast_channel::topic, ast_channel_id::unique_id, and ast_channel::uniqueid.
Referenced by __ast_channel_alloc_ap(), and __ast_dummy_channel_alloc().
void ast_channel_internal_swap_stream_topology | ( | struct ast_channel * | chan1, |
struct ast_channel * | chan2 | ||
) |
Definition at line 1521 of file channel_internal_api.c.
References ast_assert, channel_set_default_streams(), NULL, and ast_channel::stream_topology.
Referenced by channel_do_masquerade().
int ast_channel_open_storage | ( | void | ) |
Definition at line 7957 of file channel.c.
References AST_CHANNELSTORAGE_DEFAULT_TYPE, ast_channelstorage_open(), ast_log, current_channel_storage_driver, current_channel_storage_instance, ast_channelstorage_driver::driver_name, internal_channel_set_current_storage_driver(), and LOG_ERROR.
Referenced by ast_channels_init().
|
extern |
The current channel storage driver.
Definition at line 55 of file channel_internal_api.c.
Referenced by ast_channel_get_current_storage_driver_name(), ast_channel_open_storage(), and internal_channel_set_current_storage_driver().
|
extern |
The current channel storage instance.
Definition at line 57 of file channel_internal_api.c.
Referenced by __ast_channel_alloc_ap(), ast_active_channels(), ast_change_name(), ast_channel_callback(), ast_channel_close_storage(), ast_channel_get_by_exten(), ast_channel_get_by_name(), ast_channel_get_by_name_prefix(), ast_channel_get_by_uniqueid(), ast_channel_iterator_all_new(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_by_name_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_open_storage(), ast_channel_unlink(), channel_do_masquerade(), channels_shutdown(), and do_ids_conflict().