62 if (data_destructor) {
119 .
type =
"stasis-command-prestart-queue",
137 command_queue = datastore->
data;
143 if (!command_queue) {
154 datastore->
data = command_queue;
Main Channel structure associated with a channel.
Asterisk locking-related definitions:
int command_prestart_queue_command(struct ast_channel *chan, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor)
Queue a Stasis() prestart command for a channel.
Asterisk main include file. File version handling, generic pbx functions.
void command_complete(struct stasis_app_command *command, int retval)
Internal API for the Stasis application commands.
static const struct ast_datastore_info command_queue_prestart
#define ao2_container_alloc_list(ao2_options, container_options, sort_fn, cmp_fn)
Structure for a data store type.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
struct ao2_container * command_prestart_get_container(struct ast_channel *chan)
Get the Stasis() prestart commands for a channel.
#define ast_mutex_lock(a)
Structure for a data store object.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
void command_invoke(struct stasis_app_command *command, struct stasis_app_control *control, struct ast_channel *chan)
command_data_destructor_fn data_destructor
#define ast_cond_signal(cond)
pthread_cond_t ast_cond_t
int(* stasis_app_command_cb)(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static void command_dtor(void *obj)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
void(* command_data_destructor_fn)(void *data)
Typedef for data destructor for stasis app commands.
Backend API for implementing components of res_stasis.
struct stasis_app_command * command_create(stasis_app_command_cb callback, void *data, command_data_destructor_fn data_destructor)
#define ast_cond_destroy(cond)
#define ao2_alloc(data_size, destructor_fn)
int command_join(struct stasis_app_command *command)
#define ast_datastore_alloc(info, uid)
#define ast_mutex_init(pmutex)
#define ast_mutex_destroy(a)
stasis_app_command_cb callback
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
Structure for mutex and tracking information.
#define ast_mutex_unlock(a)
static void command_queue_prestart_destroy(void *obj)
#define ao2_link(container, obj)