31 #define SPA_DICT_ITEM_INIT(key,value) ((struct spa_dict_item) { (key), (value) })
34 #define SPA_DICT_FLAG_SORTED (1<<0)
40 #define SPA_DICT_INIT(items,n_items) ((struct spa_dict) { 0, (n_items), (items) })
41 #define SPA_DICT_INIT_ARRAY(items) ((struct spa_dict) { 0, SPA_N_ELEMENTS(items), (items) })
43 #define spa_dict_for_each(item, dict) \
44 for ((item) = (dict)->items; \
45 (item) < &(dict)->items[(dict)->n_items]; \
52 return strcmp(it1->
key, it2->key);
79 if (!strcmp(item->
key,
key))
89 return item ? item->
value : NULL;
static const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:95
#define SPA_DICT_ITEM_INIT(key, value)
Definition: utils/dict.h:37
static void spa_dict_qsort(struct spa_dict *dict)
Definition: utils/dict.h:64
static int spa_dict_item_compare(const void *i1, const void *i2)
Definition: utils/dict.h:57
#define SPA_DICT_FLAG_SORTED
items are sorted
Definition: utils/dict.h:41
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:52
static const struct spa_dict_item * spa_dict_lookup_item(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:72
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:79
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:76
Definition: utils/dict.h:31
const char * key
Definition: utils/dict.h:32
const char * value
Definition: utils/dict.h:33
Definition: utils/dict.h:39
const struct spa_dict_item * items
Definition: utils/dict.h:44
uint32_t n_items
Definition: utils/dict.h:43
uint32_t flags
Definition: utils/dict.h:42