| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
WebSocket resource. More...
#include "asterisk.h"#include "asterisk/app.h"#include "asterisk/module.h"#include "asterisk/stasis_app.h"#include "ari/resource_events.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_events_user_event_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 /events/user/{eventName}. | |
| int | ast_ari_events_user_event_parse_body (struct ast_json *body, struct ast_ari_events_user_event_args *args) | 
| Body parsing function for /events/user/{eventName}. | |
| 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 - WebSocket resource" , .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,res_http_websocket", } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static struct stasis_rest_handlers | events | 
| REST handler for /api-docs/events.json. | |
| static struct stasis_rest_handlers | events_user | 
| REST handler for /api-docs/events.json. | |
| static struct stasis_rest_handlers | events_user_eventName | 
| REST handler for /api-docs/events.json. | |
WebSocket resource.
Definition in file res_ari_events.c.
| #define MAX_VALS 128 | 
Definition at line 52 of file res_ari_events.c.
| 
 | static | 
Definition at line 264 of file res_ari_events.c.
| 
 | static | 
Definition at line 264 of file res_ari_events.c.
| 
 | static | 
Parameter parsing callback for /events/user/{eventName}.
| 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 105 of file res_ari_events.c.
References args, ARRAY_LEN, ast_app_separate_args, ast_ari_events_user_event(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_validate_void(), 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_events_user_event_parse_body | ( | struct ast_json * | body, | 
| struct ast_ari_events_user_event_args * | args | ||
| ) | 
Body parsing function for /events/user/{eventName}.
| 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 54 of file res_ari_events.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_events_user_event().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 264 of file res_ari_events.c.
| 
 | static | 
Definition at line 244 of file res_ari_events.c.
References ast_ari_add_handler(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, events, stasis_rest_handlers::is_websocket, and unload_module().
| 
 | static | 
Definition at line 238 of file res_ari_events.c.
References ast_ari_remove_handler(), and events.
Referenced by load_module().
| 
 | static | 
Definition at line 264 of file res_ari_events.c.
| 
 | static | 
Definition at line 264 of file res_ari_events.c.
| 
 | static | 
REST handler for /api-docs/events.json.
Definition at line 230 of file res_ari_events.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
REST handler for /api-docs/events.json.
Definition at line 222 of file res_ari_events.c.
| 
 | static | 
REST handler for /api-docs/events.json.
Definition at line 212 of file res_ari_events.c.