49 info->name = __func__;
51 info->summary =
"Test endpoint creation";
52 info->description =
"Test endpoint creation";
64 ast_test_validate(
test,
NULL != uut);
66 ast_test_validate(
test,
68 ast_test_validate(
test,
82 info->name = __func__;
84 info->summary =
"Test defaults for new endpoints";
85 info->description =
"Test defaults for new endpoints";
92 ast_test_validate(
test,
NULL != uut);
94 ast_test_validate(
test,
NULL != snapshot);
96 ast_test_validate(
test, 0 == strcmp(
"TEST/test_res", snapshot->id));
97 ast_test_validate(
test, 0 == strcmp(
"TEST", snapshot->tech));
98 ast_test_validate(
test, 0 == strcmp(
"test_res", snapshot->resource));
100 ast_test_validate(
test, -1 == snapshot->max_channels);
101 ast_test_validate(
test, 0 == snapshot->num_channels);
113 info->name = __func__;
115 info->summary =
"Test endpoint setters";
116 info->description =
"Test endpoint setters";
123 ast_test_validate(
test,
NULL != uut);
129 ast_test_validate(
test,
NULL != snapshot);
132 ast_test_validate(
test, 314159 == snapshot->max_channels);
Asterisk main include file. File version handling, generic pbx functions.
static int unload_module(void)
struct ast_endpoint * ast_endpoint_create(const char *tech, const char *resource)
Create an endpoint struct.
struct ast_endpoint_snapshot * ast_endpoint_snapshot_create(struct ast_endpoint *endpoint)
Create a snapshot of an endpoint.
const char * ast_endpoint_get_tech(const struct ast_endpoint *endpoint)
Gets the technology of the given endpoint.
static const char * test_category
#define AST_TEST_REGISTER(cb)
void ast_endpoint_set_state(struct ast_endpoint *endpoint, enum ast_endpoint_state state)
Updates the state of the given endpoint.
const char * ast_endpoint_get_resource(const struct ast_endpoint *endpoint)
Gets the resource name of the given endpoint.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
A snapshot of an endpoint's state.
#define AST_TEST_UNREGISTER(cb)
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
void ast_endpoint_set_max_channels(struct ast_endpoint *endpoint, int max_channels)
Updates the maximum number of channels an endpoint supports.
void ast_endpoint_shutdown(struct ast_endpoint *endpoint)
Shutsdown an ast_endpoint.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static int load_module(void)