Asterisk - The Open Source Telephony Project
18.5.0
|
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__) |
Functions | |
struct ast_channel * | __ast_channel_internal_alloc (void(*destructor)(void *obj), const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *file, int line, const char *function) |
void | ast_channel_internal_cleanup (struct ast_channel *chan) |
enum ast_channel_error | ast_channel_internal_errno (void) |
void | ast_channel_internal_errno_set (enum ast_channel_error error) |
void | ast_channel_internal_finalize (struct ast_channel *chan) |
int | ast_channel_internal_is_finalized (struct ast_channel *chan) |
void | ast_channel_internal_set_stream_topology (struct ast_channel *chan, struct ast_stream_topology *topology) |
void | ast_channel_internal_set_stream_topology_change_source (struct ast_channel *chan, void *change_source) |
int | ast_channel_internal_setup_topics (struct ast_channel *chan) |
void | ast_channel_internal_swap_stream_topology (struct ast_channel *chan1, struct ast_channel *chan2) |
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 1331 of file channel_internal_api.c.
References __ao2_alloc(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ast_atomic_fetchadd_int(), ast_channel_unref, ast_config_AST_SYSTEM_NAME, ast_copy_string(), AST_FLAGS_ALL, 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, ast_channel::linkedid, NULL, pvt_cause_cmp_fn(), pvt_cause_hash_fn(), tmp(), ast_channel_id::unique_id, ast_channel::uniqueid, and ast_assigned_ids::uniqueid.
Referenced by __ast_channel_alloc_ap(), and __ast_dummy_channel_alloc().
void ast_channel_internal_cleanup | ( | struct ast_channel * | chan | ) |
Definition at line 1471 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::dialed_causes, NULL, and stasis_forward_cancel().
Referenced by ast_channel_destructor(), and ast_dummy_channel_destructor().
enum ast_channel_error ast_channel_internal_errno | ( | void | ) |
Definition at line 1573 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 1563 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 1492 of file channel_internal_api.c.
Referenced by __ast_channel_alloc_ap().
int ast_channel_internal_is_finalized | ( | struct ast_channel * | chan | ) |
Definition at line 1497 of file channel_internal_api.c.
Referenced by ast_channel_destructor().
void ast_channel_internal_set_stream_topology | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Definition at line 658 of file channel_internal_api.c.
References ast_stream_topology_free(), and channel_set_default_streams().
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 666 of file channel_internal_api.c.
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 1527 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, NULL, stasis_forward_all(), stasis_topic_create(), 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 1628 of file channel_internal_api.c.
References ast_assert, channel_set_default_streams(), and NULL.
Referenced by channel_do_masquerade().