47 info->name = __func__;
49 info->summary =
"Test stasis app invocation.";
50 info->description =
"Test stasis app invocation.";
57 ast_test_validate(
test, -1 == res);
106 info->name = __func__;
108 info->summary =
"Test stasis app invocation.";
109 info->description =
"Test stasis app invocation.";
124 ast_test_validate(
test, 0 == res);
144 info->name = __func__;
146 info->summary =
"Test stasis app invocation.";
147 info->description =
"Test stasis app invocation.";
161 "type",
"ApplicationReplaced",
168 ast_test_validate(
test, 0 == res);
169 ast_test_validate(
test, 1 == app_data1->invocations);
174 ast_test_validate(
test, 1 == app_data2->invocations);
200 .
requires =
"res_stasis",
Asterisk main include file. File version handling, generic pbx functions.
#define ao2_alloc(data_size, destructor_fn)
struct ast_json * ast_json_null(void)
Get the JSON null value.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
int ast_json_equal(const struct ast_json *lhs, const struct ast_json *rhs)
Compare two JSON objects.
struct ast_json * ast_json_array_get(const struct ast_json *array, size_t index)
Get an element from an array.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
int ast_json_object_del(struct ast_json *object, const char *key)
Delete a field from a JSON object.
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
struct ast_json * ast_json_copy(const struct ast_json *value)
Copy a JSON value, but not its children.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
const char * app_name(struct ast_app *app)
Stasis Application API. See Stasis Application API for detailed documentation.
int stasis_app_send(const char *app_name, struct ast_json *message)
Send a message to the given Stasis application.
int stasis_app_register(const char *app_name, stasis_app_cb handler, void *data)
Register a new Stasis application.
void stasis_app_unregister(const char *app_name)
Unregister a Stasis application.
struct ast_json * messages
Abstract JSON element (object, array, string, int, ...).
#define AST_TEST_REGISTER(cb)
#define AST_TEST_UNREGISTER(cb)
static struct app_data * app_data_create(void)
static void test_handler(void *data, const char *app_name, struct ast_json *message)
AST_TEST_DEFINE(app_invoke_dne)
static int load_module(void)
static int unload_module(void)
static void app_data_dtor(void *obj)
static const char * test_category
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
char * ast_eid_to_str(char *s, int maxlen, struct ast_eid *eid)
Convert an EID to a string.
struct ast_eid ast_eid_default
Global EID.