Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk.h"
#include "asterisk/http.h"
#include "asterisk/test.h"
#include "asterisk/module.h"
#include "../res/res_aeap/transport.h"
Go to the source code of this file.
Macros | |
#define | ADDR "127.0.0.1:8088" |
#define | CATEGORY "/res/aeap/transport/" |
#define | TRANSPORT_PROTOCOL "echo" |
#define | TRANSPORT_PROTOCOL_INVALID "invalid" |
#define | TRANSPORT_TIMEOUT 2000 |
#define | TRANSPORT_URL "ws://" ADDR "/ws" |
#define | TRANSPORT_URL_INVALID "ws://" ADDR "/invalid" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (transport_binary) | |
AST_TEST_DEFINE (transport_connect) | |
AST_TEST_DEFINE (transport_connect_fail) | |
AST_TEST_DEFINE (transport_create) | |
AST_TEST_DEFINE (transport_create_invalid) | |
AST_TEST_DEFINE (transport_string) | |
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 Transport Tests" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .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 struct ast_http_server * | http_server |
#define ADDR "127.0.0.1:8088" |
Definition at line 35 of file test_aeap_transport.c.
#define CATEGORY "/res/aeap/transport/" |
Definition at line 33 of file test_aeap_transport.c.
#define TRANSPORT_PROTOCOL "echo" |
Definition at line 38 of file test_aeap_transport.c.
#define TRANSPORT_PROTOCOL_INVALID "invalid" |
Definition at line 39 of file test_aeap_transport.c.
#define TRANSPORT_TIMEOUT 2000 |
Definition at line 40 of file test_aeap_transport.c.
#define TRANSPORT_URL "ws://" ADDR "/ws" |
Definition at line 36 of file test_aeap_transport.c.
#define TRANSPORT_URL_INVALID "ws://" ADDR "/invalid" |
Definition at line 37 of file test_aeap_transport.c.
|
static |
Definition at line 249 of file test_aeap_transport.c.
|
static |
Definition at line 249 of file test_aeap_transport.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 249 of file test_aeap_transport.c.
AST_TEST_DEFINE | ( | transport_binary | ) |
Definition at line 150 of file test_aeap_transport.c.
References aeap_transport_create_and_connect(), aeap_transport_destroy(), aeap_transport_read(), aeap_transport_write(), AST_AEAP_DATA_TYPE_BINARY, AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, TRANSPORT_PROTOCOL, TRANSPORT_TIMEOUT, and TRANSPORT_URL.
AST_TEST_DEFINE | ( | transport_connect | ) |
Definition at line 86 of file test_aeap_transport.c.
References aeap_transport_create_and_connect(), aeap_transport_destroy(), aeap_transport_disconnect(), aeap_transport_is_connected(), AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, TRANSPORT_PROTOCOL, TRANSPORT_TIMEOUT, and TRANSPORT_URL.
AST_TEST_DEFINE | ( | transport_connect_fail | ) |
Definition at line 113 of file test_aeap_transport.c.
References aeap_transport_connect(), aeap_transport_create(), aeap_transport_destroy(), aeap_transport_is_connected(), AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, TRANSPORT_PROTOCOL, TRANSPORT_PROTOCOL_INVALID, TRANSPORT_TIMEOUT, TRANSPORT_URL, and TRANSPORT_URL_INVALID.
AST_TEST_DEFINE | ( | transport_create | ) |
Definition at line 64 of file test_aeap_transport.c.
References aeap_transport_create(), aeap_transport_destroy(), AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, and TRANSPORT_URL.
AST_TEST_DEFINE | ( | transport_create_invalid | ) |
Definition at line 42 of file test_aeap_transport.c.
References aeap_transport_create(), aeap_transport_destroy(), AST_TEST_NOT_RUN, AST_TEST_PASS, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | transport_string | ) |
Definition at line 181 of file test_aeap_transport.c.
References aeap_transport_create_and_connect(), aeap_transport_destroy(), aeap_transport_read(), aeap_transport_write(), AST_AEAP_DATA_TYPE_STRING, AST_TEST_NOT_RUN, AST_TEST_PASS, buf, CATEGORY, sip_to_pjsip::info(), NULL, RAII_VAR, TEST_EXECUTE, TEST_INIT, TRANSPORT_PROTOCOL, TRANSPORT_TIMEOUT, and TRANSPORT_URL.
|
static |
Definition at line 214 of file test_aeap_transport.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_TEST_REGISTER, http_server, NULL, and transport_create().
|
static |
Definition at line 230 of file test_aeap_transport.c.
References AST_TEST_UNREGISTER, http_server, and transport_create().
|
static |
Definition at line 249 of file test_aeap_transport.c.
|
static |
Definition at line 249 of file test_aeap_transport.c.
|
static |
Definition at line 212 of file test_aeap_transport.c.
Referenced by load_module(), and unload_module().