51 const char *
str, uint32_t uint)
102 static const char str[] =
"SIP/alligatormittens";
103 static const uint32_t uint = 0xb00bface;
107 info->name =
"ast_event_new_test";
108 info->category =
"/main/event/";
109 info->summary =
"Test event creation";
111 "This test exercises the API calls that allow allocation "
Asterisk main include file. File version handling, generic pbx functions.
struct ast_event * ast_event_new(enum ast_event_type event_type,...)
Create a new event.
size_t ast_event_get_size(const struct ast_event *event)
Get the size of an event.
uint32_t ast_event_get_ie_uint(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has an integer payload.
void ast_event_destroy(struct ast_event *event)
Destroy an event.
int ast_event_append_ie_str(struct ast_event **event, enum ast_event_ie_type ie_type, const char *str)
Append an information element that has a string payload.
const char * ast_event_get_ie_str(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has a string payload.
enum ast_event_type ast_event_get_type(const struct ast_event *event)
Get the type for an event.
int ast_event_append_ie_uint(struct ast_event **event, enum ast_event_ie_type ie_type, uint32_t data)
Append an information element that has an integer payload.
@ AST_EVENT_IE_CEL_CIDNAME
Channel Event CID name Used by: AST_EVENT_CEL Payload type: STR.
@ AST_EVENT_IE_CEL_AMAFLAGS
Channel Event AMA flags Used by: AST_EVENT_CEL Payload type: UINT.
@ AST_EVENT_IE_CEL_USEREVENT_NAME
Channel Event User Event Name Used by: AST_EVENT_CEL Payload type: STR.
@ AST_EVENT_IE_CEL_EVENT_TIME_USEC
Channel Event Time (micro-seconds) Used by: AST_EVENT_CEL Payload type: UINT.
@ AST_EVENT_IE_PLTYPE_UINT
@ AST_EVENT_IE_PLTYPE_STR
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
static int check_event(struct ast_event *event, struct ast_test *test, enum ast_event_type expected_type, const char *type_name, const char *str, uint32_t uint)
static int load_module(void)
static int unload_module(void)
AST_TEST_DEFINE(event_new_test)