5 #ifndef SPA_PARAM_DICT_UTILS_H
6 #define SPA_PARAM_DICT_UTILS_H
26 #ifndef SPA_API_DICT_UTILS
28 #define SPA_API_DICT_UTILS SPA_API_IMPL
30 #define SPA_API_DICT_UTILS static inline
53 for (i = 0; i < n_items; i++) {
75 memset(info, 0, size);
87 const char *key, *value;
101 for (n = 0; n < n_items; n++) {
107 if (key == NULL || value == NULL)
110 items[n].
value = value;
#define SPA_API_DICT_UTILS
Definition: dict-utils.h:37
SPA_API_DICT_UTILS int spa_param_dict_info_parse(const struct spa_param_dict_info *info, size_t size, struct spa_dict *dict, struct spa_dict_item *items)
Definition: dict-utils.h:89
SPA_API_DICT_UTILS int spa_param_dict_parse(const struct spa_pod *dict, struct spa_param_dict_info *info, size_t size)
Definition: dict-utils.h:80
SPA_API_DICT_UTILS struct spa_pod * spa_param_dict_build_dict(struct spa_pod_builder *builder, uint32_t id, struct spa_dict *dict)
Definition: dict-utils.h:48
SPA_API_DICT_UTILS struct spa_pod * spa_param_dict_build_info(struct spa_pod_builder *builder, uint32_t id, struct spa_param_dict_info *info)
Definition: dict-utils.h:70
SPA_API_DICT_UTILS int spa_param_dict_compare(const struct spa_pod *a, const struct spa_pod *b)
Definition: dict-utils.h:42
@ SPA_PARAM_DICT_info
Struct( Int: n_items (String: key String: value)* )
Definition: dict.h:27
SPA_API_POD_BUILDER int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:296
#define SPA_POD_String(val)
Definition: vararg.h:102
SPA_API_POD_PARSER int spa_pod_parser_get_int(struct spa_pod_parser *parser, int32_t *value)
Definition: parser.h:236
SPA_API_POD_PARSER int spa_pod_parser_pop(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:204
SPA_API_POD_PARSER void spa_pod_parser_pod(struct spa_pod_parser *parser, const struct spa_pod *pod)
Definition: parser.h:60
SPA_API_POD_BUILDER int spa_pod_builder_string(struct spa_pod_builder *builder, const char *str)
Definition: builder.h:351
SPA_API_POD_BUILDER int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:462
SPA_API_POD_BUILDER int spa_pod_builder_add(struct spa_pod_builder *builder,...)
Definition: builder.h:713
SPA_API_POD_BUILDER int spa_pod_builder_push_object(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
Definition: builder.h:475
SPA_API_POD_PARSER int spa_pod_parser_push_struct(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:400
SPA_API_POD_PARSER int spa_pod_parser_get(struct spa_pod_parser *parser,...)
Definition: parser.h:849
SPA_API_POD_BUILDER int spa_pod_builder_primitive(struct spa_pod_builder *builder, const struct spa_pod *p)
Definition: builder.h:250
#define SPA_POD_PROP_FLAG_HINT_DICT
contains a dictionary struct as (Struct( Int : n_items, (String : key, String : value)*))
Definition: pod.h:235
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:935
SPA_API_POD_BUILDER void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:213
#define SPA_POD_PodStruct(val)
Definition: vararg.h:140
SPA_API_POD_COMPARE int spa_pod_memcmp(const struct spa_pod *a, const struct spa_pod *b)
Definition: compare.h:90
SPA_API_POD_BUILDER int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:490
@ SPA_TYPE_OBJECT_ParamDict
Definition: type.h:99
#define SPA_MIN(a, b)
Definition: defs.h:165
const char * key
Definition: dict.h:42
const char * value
Definition: dict.h:43
const struct spa_dict_item * items
Definition: dict.h:56
uint32_t n_items
Definition: dict.h:55
helper structure for managing info objects
Definition: dict.h:35
const struct spa_pod * info
Definition: dict.h:36