51 #define SPA_DICT_ITEM_INIT(key,value) ((struct spa_dict_item) { (key), (value) })
54 #define SPA_DICT_FLAG_SORTED (1<<0)
60 #define SPA_DICT_INIT(items,n_items) ((struct spa_dict) { 0, (n_items), (items) })
61 #define SPA_DICT_INIT_ARRAY(items) ((struct spa_dict) { 0, SPA_N_ELEMENTS(items), (items) })
63 #define spa_dict_for_each(item, dict) \
64 for ((item) = (dict)->items; \
65 (item) < &(dict)->items[(dict)->n_items]; \
72 return strcmp(it1->
key, it2->key);
99 if (!strcmp(item->
key,
key))
109 return item ? item->
value : NULL;
static const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: dict.h:115
#define SPA_DICT_ITEM_INIT(key, value)
Definition: dict.h:57
static void spa_dict_qsort(struct spa_dict *dict)
Definition: dict.h:84
static int spa_dict_item_compare(const void *i1, const void *i2)
Definition: dict.h:77
#define SPA_DICT_FLAG_SORTED
items are sorted
Definition: dict.h:61
#define spa_dict_for_each(item, dict)
Definition: dict.h:72
static const struct spa_dict_item * spa_dict_lookup_item(const struct spa_dict *dict, const char *key)
Definition: dict.h:92
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:95
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:92
const char * key
Definition: dict.h:52
const char * value
Definition: dict.h:53
const struct spa_dict_item * items
Definition: dict.h:64
uint32_t n_items
Definition: dict.h:63
uint32_t flags
Definition: dict.h:62