Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Generated file - declares stubs to be implemented in res/ari/resource_events.c. More...
#include "asterisk/ari.h"
Go to the source code of this file.
Data Structures | |
struct | ast_ari_events_event_websocket_args |
struct | ast_ari_events_user_event_args |
Generated file - declares stubs to be implemented in res/ari/resource_events.c.
WebSocket resource
Definition in file resource_events.h.
void ast_ari_events_user_event | ( | struct ast_variable * | headers, |
struct ast_ari_events_user_event_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Generate a user event.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 532 of file resource_events.c.
References args, ast_ari_events_user_event_parse_body(), ast_ari_response_error(), ast_ari_response_no_content(), ast_json_object_get(), ast_strlen_zero(), NULL, STASIS_APP_USER_APP_NOT_FOUND, stasis_app_user_event(), STASIS_APP_USER_EVENT_SOURCE_BAD_SCHEME, STASIS_APP_USER_EVENT_SOURCE_NOT_FOUND, STASIS_APP_USER_INTERNAL_ERROR, STASIS_APP_USER_OK, and STASIS_APP_USER_USEREVENT_INVALID.
Referenced by ast_ari_events_user_event_cb().
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 241 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().
int ast_ari_websocket_events_event_websocket_attempted | ( | struct ast_tcptls_session_instance * | ser, |
struct ast_variable * | headers, | ||
struct ast_ari_events_event_websocket_args * | args, | ||
const char * | session_id | ||
) |
WebSocket connection for events.
ser | HTTP TCP/TLS Server Session |
headers | HTTP headers |
args | Swagger parameters |
session_id | The id of the current session. |
0 | success |
non-zero | error |
Definition at line 488 of file resource_events.c.
References args, ast_debug, event_session_alloc(), and event_session::session_id.
Referenced by ast_ari_events_event_websocket_ws_attempted_cb().
void ast_ari_websocket_events_event_websocket_dtor | ( | void | ) |
WebSocket connection for events.
Definition at line 465 of file resource_events.c.
References ao2_callback, ao2_cleanup, event_session_registry, event_session_shutdown_cb(), NULL, OBJ_MULTIPLE, and OBJ_NODATA.
Referenced by load_module(), and unload_module().
void ast_ari_websocket_events_event_websocket_established | ( | struct ast_ari_websocket_session * | session, |
struct ast_variable * | headers, | ||
struct ast_ari_events_event_websocket_args * | args | ||
) |
WebSocket connection for events.
session | ARI WebSocket. |
headers | HTTP headers. |
args | Swagger parameters. |
Definition at line 498 of file resource_events.c.
References ao2_find, ao2_ref, ao2_unlink, ast_ari_websocket_session_id(), ast_ari_websocket_session_read(), ast_assert, ast_debug, ast_json_unref(), ast_log, event_session_cleanup(), event_session_registry, event_session_update_websocket(), LOG_WARNING, NULL, OBJ_SEARCH_KEY, and session.
Referenced by ast_ari_events_event_websocket_ws_established_cb().
int ast_ari_websocket_events_event_websocket_init | ( | void | ) |
WebSocket connection for events.
0 | success |
-1 | error |
Definition at line 473 of file resource_events.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ast_log, event_session_compare(), event_session_hash(), EVENT_SESSION_NUM_BUCKETS, event_session_registry, LOG_WARNING, and NULL.
Referenced by load_module().