Lines Matching defs:key

43     char *key, *value;
46 static int add_key_value(pa_modargs *ma, char *key, char *value, const char* const valid_keys[], bool ignore_dupes) {
53 pa_assert(key);
56 if (pa_hashmap_get(ma->unescaped, key)) {
57 pa_xfree(key);
69 if (pa_streq(*v, key))
73 pa_xfree(key);
82 e->key = key;
84 pa_hashmap_put(ma->unescaped, key, e);
90 e->key = pa_xstrdup(key);
92 pa_hashmap_put(ma->raw, key, e);
102 pa_xfree(e->key);
120 const char *p, *key = NULL, *value = NULL;
132 key = p;
158 pa_xstrndup(key, key_len),
178 pa_xstrndup(key, key_len),
199 pa_xstrndup(key, key_len),
220 pa_xstrndup(key, key_len),
241 if (add_key_value(ma, pa_xstrndup(key, key_len), pa_xstrdup(""), valid_keys, ignore_dupes) < 0)
244 if (add_key_value(ma, pa_xstrndup(key, key_len), pa_xstrdup(value), valid_keys, ignore_dupes) < 0)
275 int pa_modargs_remove_key(pa_modargs *ma, const char *key) {
276 if (pa_hashmap_remove_and_free(ma->unescaped, key) == 0) {
277 pa_hashmap_remove_and_free(ma->raw, key);
292 const char *pa_modargs_get_value(pa_modargs *ma, const char *key, const char *def) {
296 pa_assert(key);
298 if (!(e = pa_hashmap_get(ma->unescaped, key)))
304 static const char *modargs_get_value_raw(pa_modargs *ma, const char *key, const char *def) {
308 pa_assert(key);
310 if (!(e = pa_hashmap_get(ma->raw, key)))
311 if (!(e = pa_hashmap_get(ma->unescaped, key)))
317 int pa_modargs_get_value_u32(pa_modargs *ma, const char *key, uint32_t *value) {
322 if (!(v = pa_modargs_get_value(ma, key, NULL)))
331 int pa_modargs_get_value_s32(pa_modargs *ma, const char *key, int32_t *value) {
336 if (!(v = pa_modargs_get_value(ma, key, NULL)))
345 int pa_modargs_get_value_boolean(pa_modargs *ma, const char *key, bool *value) {
351 if (!(v = pa_modargs_get_value(ma, key, NULL)))
364 int pa_modargs_get_value_double(pa_modargs *ma, const char *key, double *value) {
369 if (!(v = pa_modargs_get_value(ma, key, NULL)))
378 int pa_modargs_get_value_volume(pa_modargs *ma, const char *key, pa_volume_t *value) {
383 if (!(v = pa_modargs_get_value(ma, key, NULL)))
554 return e->key;
559 const char *key, *value;
562 for (state = NULL, key = pa_modargs_iterate(src, &state); key; key = pa_modargs_iterate(src, &state)) {
563 value = pa_modargs_get_value(src, key, NULL);
564 if (value && add_key_value(dst, pa_xstrdup(key), pa_xstrdup(value), valid_keys, true) < 0) {
565 pa_log_warn("Failed to add module argument '%s=%s'", key, value);