30                    {
   31
   33
   35};
   36 
   38{
   40 
   42 
   43    return msg->json ? 0 : -1;
   44}
   45 
   47    const char *
name, 
const char *
id, 
const void *params)
 
   48{
   50    int res;
   51 
   53 
   56        return -1;
   57    }
   58 
   62        return -1;
   63    }
   64 
   67    return res;
   68}
   69 
   71{
   73 
   75}
   76 
   78{
   80 
   82 
   83    return msg->json ? 0 : -1;
   84}
   85 
   87{
   89 
   92        *size = 0;
   93        return -1;
   94    }
   95 
   97 
   98    return 0;
   99}
  100 
  102{
  104 
  106}
  107 
  109{
  111 
  113        return -1;
  114    }
  115 
  116    return 0;
  117}
  118 
  120{
  123 
  125    if (!iter) {
  127    }
  128 
  130}
  131 
  133{
  135 
  136    return msg->json;
  137}
  138 
  140{
  142 
  144}
  145 
  147{
  149 
  151}
  152 
  154{
  156 
  158}
  159 
  161{
  163 
  165        return -1;
  166    }
  167 
  168    return 0;
  169}
  170 
  173    .type_name = "json",
  188};
  189 
#define ast_json_object_string_get(object, key)
Get a string field from a JSON object.
struct ast_json * ast_json_object_iter_value(struct ast_json_iter *iter)
Get the value from an iterator.
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_object_create(void)
Create a new JSON object.
#define ast_json_dump_string(root)
Encode a JSON value to a compact string.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
struct ast_json_iter * ast_json_object_iter_at(struct ast_json *object, const char *key)
Get an iterator pointing to a specified key in object.
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
int ast_json_object_set(struct ast_json *object, const char *key, struct ast_json *value)
Set a field in a JSON object.
struct ast_json * ast_json_load_buf(const char *buffer, size_t buflen, struct ast_json_error *error)
Parse buffer with known length into a JSON object or array.
const char * ast_json_string_get(const struct ast_json *string)
Get the value of a JSON string.
int ast_json_object_update(struct ast_json *object, struct ast_json *other)
Update object with all of the fields of other.
static void message_json_destruct(struct ast_aeap_message *self)
static int message_json_is_request(const struct ast_aeap_message *self)
static int message_json_serialize(const struct ast_aeap_message *self, void **buf, intmax_t *size)
static int message_json_error_msg_set(struct ast_aeap_message *self, const char *error_msg)
static int message_json_construct1(struct ast_aeap_message *self, const void *params)
const struct ast_aeap_message_type * ast_aeap_message_type_json
Asterisk external application JSON message type.
#define JSON_MSG(lvalue, rvalue)
static const char * message_json_id(const struct ast_aeap_message *self)
static const char * message_json_error_msg(const struct ast_aeap_message *self)
static const char * message_json_name(const struct ast_aeap_message *self)
static int message_json_id_set(struct ast_aeap_message *self, const char *id)
static int message_json_construct2(struct ast_aeap_message *self, const char *msg_type, const char *name, const char *id, const void *params)
static int message_json_deserialize(struct ast_aeap_message *self, const void *buf, intmax_t size)
static const struct ast_aeap_message_type message_type_json
static void * message_json_data(struct ast_aeap_message *self)
static int message_json_is_response(const struct ast_aeap_message *self)
@ AST_AEAP_DATA_TYPE_STRING
Message type virtual method table.
Asterisk external application base message.
Iterator for JSON object key/values.
Abstract JSON element (object, array, string, int, ...).