[pulseaudio-commits] r2089 - in /trunk/src/pulse: proplist.c proplist.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Dec 29 10:03:54 PST 2007


Author: lennart
Date: Sat Dec 29 19:03:53 2007
New Revision: 2089

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2089&root=pulseaudio&view=rev
Log:
add new function pa_proplist_contains()

Modified:
    trunk/src/pulse/proplist.c
    trunk/src/pulse/proplist.h

Modified: trunk/src/pulse/proplist.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/proplist.c?rev=2089&root=pulseaudio&r1=2088&r2=2089&view=diff
==============================================================================
--- trunk/src/pulse/proplist.c (original)
+++ trunk/src/pulse/proplist.c Sat Dec 29 19:03:53 2007
@@ -242,3 +242,16 @@
 
     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;
+}

Modified: trunk/src/pulse/proplist.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/proplist.h?rev=2089&root=pulseaudio&r1=2088&r2=2089&view=diff
==============================================================================
--- trunk/src/pulse/proplist.h (original)
+++ trunk/src/pulse/proplist.h Sat Dec 29 19:03:53 2007
@@ -85,4 +85,6 @@
 
 char *pa_proplist_to_string(pa_proplist *p);
 
+int pa_proplist_contains(pa_proplist *p, const char *key);
+
 #endif




More information about the pulseaudio-commits mailing list