73{
74 char *parse;
75 int x;
79 );
81
83 ast_log(
LOG_WARNING,
"UserEvent requires an argument (eventname,optional event body)\n");
84 return -1;
85 }
86
88
90
92 "eventname",
args.eventname);
93 if (!blob) {
94 return -1;
95 }
96
97 for (x = 0; x <
args.argc - 1; x++) {
100
103
104 continue;
105 }
106
109 if (!json_value) {
110 return -1;
111 }
112
113
115 return -1;
116 }
117 }
118
122 return 0;
123}
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_channel_lock(chan)
#define ast_channel_unlock(chan)
void ast_multi_object_blob_single_channel_publish(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
Create and publish a stasis message blob on a channel with it's snapshot.
struct stasis_message_type * ast_multi_user_event_type(void)
Message type for custom user defined events with multi object blobs.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
char * strsep(char **str, const char *delims)
struct ast_json * ast_json_string_create(const char *value)
Construct a JSON string from value.
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
int ast_json_object_set(struct ast_json *object, const char *key, struct ast_json *value)
Set a field in a JSON object.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
char * ast_strip(char *s)
Strip leading/trailing whitespace from a string.
Abstract JSON element (object, array, string, int, ...).
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.