| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
#include "asterisk.h"#include "asterisk/test.h"#include "asterisk/module.h"#include "asterisk/file.h"#include "asterisk/http_websocket.h"#include "asterisk/json.h"#include "asterisk/res_aeap.h"#include "asterisk/res_aeap_message.h"
Go to the source code of this file.
| Macros | |
| #define | ADDR "127.0.0.1:8088" | 
| #define | AEAP_CONNECTION_TIMEOUT 2000 | 
| #define | AEAP_MESSAGE_ID "foo" | 
| #define | AEAP_REMOTE_PROTOCOL "echo" | 
| #define | AEAP_REMOTE_URL "ws://" ADDR "/ws" | 
| #define | AEAP_TRANSPORT_TYPE "ws" | 
| #define | CATEGORY "/res/aeap/" | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| AST_TEST_DEFINE (create_and_connect) | |
| AST_TEST_DEFINE (send_msg_handle_request) | |
| AST_TEST_DEFINE (send_msg_handle_response) | |
| AST_TEST_DEFINE (send_msg_handle_string) | |
| static int | handle_msg (struct ast_aeap *aeap, struct ast_aeap_message *message, void *data) | 
| static void | handle_string (struct ast_aeap *aeap, const char *buf, intmax_t size) | 
| static void | handle_timeout (struct ast_aeap *aeap, struct ast_aeap_message *message, void *data) | 
| 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 = "Asterisk External Application Protocol Object Tests" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_aeap", } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static const struct ast_aeap_message_handler | handlers [] | 
| static struct ast_http_server * | http_server | 
| #define ADDR "127.0.0.1:8088" | 
Definition at line 38 of file test_aeap.c.
| #define AEAP_CONNECTION_TIMEOUT 2000 | 
Definition at line 43 of file test_aeap.c.
| #define AEAP_MESSAGE_ID "foo" | 
Definition at line 42 of file test_aeap.c.
| #define AEAP_REMOTE_PROTOCOL "echo" | 
Definition at line 41 of file test_aeap.c.
| #define AEAP_REMOTE_URL "ws://" ADDR "/ws" | 
Definition at line 40 of file test_aeap.c.
| #define AEAP_TRANSPORT_TYPE "ws" | 
Definition at line 39 of file test_aeap.c.
| #define CATEGORY "/res/aeap/" | 
Definition at line 36 of file test_aeap.c.
| 
 | static | 
Definition at line 252 of file test_aeap.c.
| 
 | static | 
Definition at line 252 of file test_aeap.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 252 of file test_aeap.c.
| AST_TEST_DEFINE | ( | create_and_connect | ) | 
Definition at line 45 of file test_aeap.c.
References AEAP_CONNECTION_TIMEOUT, AEAP_REMOTE_PROTOCOL, AEAP_REMOTE_URL, AEAP_TRANSPORT_TYPE, ao2_cleanup, ast_aeap_create_and_connect(), AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
| AST_TEST_DEFINE | ( | send_msg_handle_request | ) | 
Definition at line 179 of file test_aeap.c.
References AEAP_CONNECTION_TIMEOUT, AEAP_MESSAGE_ID, AEAP_REMOTE_PROTOCOL, AEAP_REMOTE_URL, AEAP_TRANSPORT_TYPE, ao2_cleanup, ARRAY_LEN, ast_aeap_create_and_connect(), ast_aeap_message_create_request(), ast_aeap_message_type_json, ast_aeap_send_msg_tsx(), ast_aeap_user_data_register(), ast_aeap_user_data_unregister(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, handlers, ast_aeap_tsx_params::msg, ast_aeap_params::msg_type, name, NULL, ast_aeap_tsx_params::obj, RAII_VAR, ast_aeap_params::request_handlers, TEST_EXECUTE, TEST_INIT, ast_aeap_tsx_params::timeout, and ast_aeap_tsx_params::wait.
| AST_TEST_DEFINE | ( | send_msg_handle_response | ) | 
Definition at line 139 of file test_aeap.c.
References AEAP_CONNECTION_TIMEOUT, AEAP_MESSAGE_ID, AEAP_REMOTE_PROTOCOL, AEAP_REMOTE_URL, AEAP_TRANSPORT_TYPE, ao2_cleanup, ARRAY_LEN, ast_aeap_create_and_connect(), ast_aeap_message_create_response(), ast_aeap_message_type_json, ast_aeap_send_msg_tsx(), ast_aeap_user_data_register(), ast_aeap_user_data_unregister(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, handlers, ast_aeap_tsx_params::msg, ast_aeap_params::msg_type, name, NULL, ast_aeap_tsx_params::obj, RAII_VAR, ast_aeap_params::response_handlers, TEST_EXECUTE, TEST_INIT, ast_aeap_tsx_params::timeout, and ast_aeap_tsx_params::wait.
| AST_TEST_DEFINE | ( | send_msg_handle_string | ) | 
Definition at line 83 of file test_aeap.c.
References AEAP_CONNECTION_TIMEOUT, AEAP_MESSAGE_ID, AEAP_REMOTE_PROTOCOL, AEAP_REMOTE_URL, AEAP_TRANSPORT_TYPE, ao2_cleanup, ast_aeap_create_and_connect(), ast_aeap_message_create_request(), ast_aeap_message_type_json, ast_aeap_send_msg_tsx(), ast_aeap_user_data_register(), ast_aeap_user_data_unregister(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, handle_string(), handle_timeout(), ast_aeap_tsx_params::msg, NULL, ast_aeap_params::on_string, ast_aeap_tsx_params::on_timeout, RAII_VAR, TEST_EXECUTE, TEST_INIT, ast_aeap_tsx_params::timeout, and ast_aeap_tsx_params::wait.
| 
 | static | 
Definition at line 120 of file test_aeap.c.
References AEAP_MESSAGE_ID, ast_aeap_message_id(), ast_aeap_message_is_named(), ast_aeap_message_name(), ast_aeap_user_data_object_by_id(), ast_log, and LOG_ERROR.
| 
 | static | 
Definition at line 67 of file test_aeap.c.
References AEAP_MESSAGE_ID, ast_aeap_user_data_object_by_id(), and buf.
Referenced by AST_TEST_DEFINE().
| 
 | static | 
Definition at line 76 of file test_aeap.c.
References AEAP_MESSAGE_ID, and ast_aeap_user_data_object_by_id().
Referenced by AST_TEST_DEFINE().
| 
 | static | 
Definition at line 221 of file test_aeap.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_TEST_REGISTER, http_server, and NULL.
| 
 | static | 
Definition at line 235 of file test_aeap.c.
References AST_TEST_UNREGISTER, and http_server.
| 
 | static | 
Definition at line 252 of file test_aeap.c.
| 
 | static | 
Definition at line 252 of file test_aeap.c.
| 
 | static | 
Definition at line 135 of file test_aeap.c.
Referenced by ast_pbx_hangup_handler_destroy(), ast_pbx_hangup_handler_init(), ast_pbx_hangup_handler_pop(), ast_pbx_hangup_handler_push(), ast_pbx_hangup_handler_run(), ast_pbx_hangup_handler_show(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), channel_do_masquerade(), and raise_msg_handler().
| 
 | static | 
Definition at line 219 of file test_aeap.c.
Referenced by load_module(), and unload_module().