summaryrefslogtreecommitdiffstats
path: root/src/pulse
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/proplist.c12
-rw-r--r--src/pulse/proplist.h8
2 files changed, 19 insertions, 1 deletions
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 909df9a7..60a92d44 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
@@ -406,3 +406,15 @@ pa_proplist* pa_proplist_copy(pa_proplist *template) {
return p;
}
+
+unsigned pa_proplist_size(pa_proplist *p) {
+ pa_assert(p);
+
+ return pa_hashmap_size(MAKE_HASHMAP(p));
+}
+
+int pa_proplist_isempty(pa_proplist *p) {
+ pa_assert(p);
+
+ return pa_hashmap_isempty(MAKE_HASHMAP(p));
+}
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
index 4f1a1ec4..5d65ff3c 100644
--- a/src/pulse/proplist.h
+++ b/src/pulse/proplist.h
@@ -214,7 +214,7 @@ const char *pa_proplist_iterate(pa_proplist *p, void **state);
char *pa_proplist_to_string(pa_proplist *p);
/** Allocate a new property list and assign key/value from a human readable string. \since
- * 0.9.14 */
+ * 0.9.15 */
pa_proplist *pa_proplist_from_string(const char *str);
/** Returns 1 if an entry for the specified key is existant in the
@@ -228,6 +228,12 @@ void pa_proplist_clear(pa_proplist *p);
* the specific list. \since 0.9.11 */
pa_proplist* pa_proplist_copy(pa_proplist *t);
+/** Return the number of entries on the property list. \since 0.9.15 */
+unsigned pa_proplist_size(pa_proplist *t);
+
+/** Returns 0 when the proplist is empty, positive otherwise \since 0.9.15 */
+int pa_proplist_isempty(pa_proplist *t);
+
PA_C_DECL_END
#endif