Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Stasis application resources. More...
#include "asterisk.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/stasis_app.h"
#include "ari/resource_applications.h"
Go to the source code of this file.
Macros | |
#define | MAX_VALS 128 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | ast_ari_applications_filter_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /applications/{applicationName}/eventFilter. | |
int | ast_ari_applications_filter_parse_body (struct ast_json *body, struct ast_ari_applications_filter_args *args) |
Body parsing function for /applications/{applicationName}/eventFilter. | |
static void | ast_ari_applications_get_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /applications/{applicationName}. | |
static void | ast_ari_applications_list_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /applications. | |
static void | ast_ari_applications_subscribe_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /applications/{applicationName}/subscription. | |
int | ast_ari_applications_subscribe_parse_body (struct ast_json *body, struct ast_ari_applications_subscribe_args *args) |
Body parsing function for /applications/{applicationName}/subscription. | |
static void | ast_ari_applications_unsubscribe_cb (struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response) |
Parameter parsing callback for /applications/{applicationName}/subscription. | |
int | ast_ari_applications_unsubscribe_parse_body (struct ast_json *body, struct ast_ari_applications_unsubscribe_args *args) |
Body parsing function for /applications/{applicationName}/subscription. | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "RESTful API module - Stasis application resources" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_ari,res_ari_model,res_stasis", } |
static struct stasis_rest_handlers | applications |
REST handler for /api-docs/applications.json. | |
static struct stasis_rest_handlers | applications_applicationName |
REST handler for /api-docs/applications.json. | |
static struct stasis_rest_handlers | applications_applicationName_eventFilter |
REST handler for /api-docs/applications.json. | |
static struct stasis_rest_handlers | applications_applicationName_subscription |
REST handler for /api-docs/applications.json. | |
static const struct ast_module_info * | ast_module_info = &__mod_info |
Stasis application resources.
Definition in file res_ari_applications.c.
#define MAX_VALS 128 |
Definition at line 51 of file res_ari_applications.c.
|
static |
Definition at line 605 of file res_ari_applications.c.
|
static |
Definition at line 605 of file res_ari_applications.c.
|
static |
Parameter parsing callback for /applications/{applicationName}/eventFilter.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 487 of file res_ari_applications.c.
References args, ast_ari_applications_filter(), ast_ari_response_error(), ast_ari_validate_application(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
int ast_ari_applications_filter_parse_body | ( | struct ast_json * | body, |
struct ast_ari_applications_filter_args * | args | ||
) |
Body parsing function for /applications/{applicationName}/eventFilter.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 470 of file res_ari_applications.c.
|
static |
Parameter parsing callback for /applications/{applicationName}.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 114 of file res_ari_applications.c.
References args, ast_ari_applications_get(), ast_ari_response_error(), ast_ari_validate_application(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /applications.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 62 of file res_ari_applications.c.
References args, ast_ari_applications_list(), ast_ari_response_error(), ast_ari_validate_application_fn(), ast_ari_validate_list(), ast_log, LOG_ERROR, ast_ari_response::message, NULL, and ast_ari_response::response_code.
|
static |
Parameter parsing callback for /applications/{applicationName}/subscription.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 212 of file res_ari_applications.c.
References args, ARRAY_LEN, ast_app_separate_args, ast_ari_applications_subscribe(), ast_ari_applications_subscribe_parse_body(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_validate_application(), ast_free, ast_log, ast_malloc, ast_strdup, LOG_ERROR, MAX_VALS, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
int ast_ari_applications_subscribe_parse_body | ( | struct ast_json * | body, |
struct ast_ari_applications_subscribe_args * | args | ||
) |
Body parsing function for /applications/{applicationName}/subscription.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 165 of file res_ari_applications.c.
References args, ast_free, AST_JSON_ARRAY, ast_json_array_get(), ast_json_array_size(), ast_json_object_get(), ast_json_string_get(), ast_json_typeof(), and ast_malloc.
Referenced by ast_ari_applications_subscribe_cb().
|
static |
Parameter parsing callback for /applications/{applicationName}/subscription.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 364 of file res_ari_applications.c.
References args, ARRAY_LEN, ast_app_separate_args, ast_ari_applications_unsubscribe(), ast_ari_applications_unsubscribe_parse_body(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_validate_application(), ast_free, ast_log, ast_malloc, ast_strdup, LOG_ERROR, MAX_VALS, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_response::response_code, and ast_variable::value.
int ast_ari_applications_unsubscribe_parse_body | ( | struct ast_json * | body, |
struct ast_ari_applications_unsubscribe_args * | args | ||
) |
Body parsing function for /applications/{applicationName}/subscription.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 317 of file res_ari_applications.c.
References args, ast_free, AST_JSON_ARRAY, ast_json_array_get(), ast_json_array_size(), ast_json_object_get(), ast_json_string_get(), ast_json_typeof(), and ast_malloc.
Referenced by ast_ari_applications_unsubscribe_cb().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 605 of file res_ari_applications.c.
|
static |
Definition at line 586 of file res_ari_applications.c.
References applications, ast_ari_add_handler(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and unload_module().
|
static |
Definition at line 580 of file res_ari_applications.c.
References applications, and ast_ari_remove_handler().
Referenced by load_module().
|
static |
Definition at line 605 of file res_ari_applications.c.
|
static |
REST handler for /api-docs/applications.json.
Definition at line 571 of file res_ari_applications.c.
Referenced by load_module(), and unload_module().
|
static |
REST handler for /api-docs/applications.json.
Definition at line 561 of file res_ari_applications.c.
|
static |
REST handler for /api-docs/applications.json.
Definition at line 552 of file res_ari_applications.c.
|
static |
REST handler for /api-docs/applications.json.
Definition at line 542 of file res_ari_applications.c.
|
static |
Definition at line 605 of file res_ari_applications.c.