97{
100
102 static const char str[] =
"SIP/alligatormittens";
103 static const uint32_t uint = 0xb00bface;
104
105 switch (cmd) {
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 "
112 "of an ast_event.";
115 break;
116 }
117
118
119
120
121
122
123
124
126
130 goto return_cleanup;
131 }
132
136 goto return_cleanup;
137 }
138
142 goto return_cleanup;
143 }
144
148 goto return_cleanup;
149 }
150
155
156 if (!event2) {
159 goto return_cleanup;
160 }
161
165 goto return_cleanup;
166 }
167
173 goto return_cleanup;
174 }
175
176return_cleanup:
180 }
181
182 if (event2) {
185 }
186
187 return res;
188}
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.
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.
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_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_PLTYPE_UINT
@ AST_EVENT_IE_PLTYPE_STR
#define ast_test_status_update(a, b, c...)
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)