summaryrefslogtreecommitdiffstats
path: root/src/pulse/proplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/proplist.c')
-rw-r--r--src/pulse/proplist.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 1c2614a0..c27c9d84 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
@@ -242,3 +242,16 @@ char *pa_proplist_to_string(pa_proplist *p) {
return pa_strbuf_tostring_free(buf);
}
+
+int pa_proplist_contains(pa_proplist *p, const char *key) {
+ pa_assert(p);
+ pa_assert(key);
+
+ if (!property_name_valid(key))
+ return -1;
+
+ if (!(pa_hashmap_get(MAKE_HASHMAP(p), key)))
+ return 0;
+
+ return 1;
+}