summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@digia.com>2010-08-13 13:25:41 +0300
committerTanu Kaskinen <tanu.kaskinen@digia.com>2010-08-19 12:10:01 +0300
commit7ba22276d232270691dfb44328c6e794569a0c17 (patch)
treeaa61c64145f643f67c54009fb13fa8f96d87316d
parent614eef8331028f5b11c669b8656939cffb37537a (diff)
core: New function: pa_module_update_proplist().
-rw-r--r--src/pulsecore/module.c9
-rw-r--r--src/pulsecore/module.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index 5bcdd898..74e94da4 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -263,3 +263,12 @@ int pa_module_get_n_used(pa_module*m) {
return m->get_n_used(m);
}
+
+void pa_module_update_proplist(pa_module *m, pa_update_mode_t mode, pa_proplist *p) {
+ pa_assert(m);
+
+ if (p)
+ pa_proplist_update(m->proplist, mode, p);
+
+ pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_CHANGE, m->index);
+}
diff --git a/src/pulsecore/module.h b/src/pulsecore/module.h
index af89d793..0b6cb7c4 100644
--- a/src/pulsecore/module.h
+++ b/src/pulsecore/module.h
@@ -62,6 +62,8 @@ void pa_module_unload_all(pa_core *c);
int pa_module_get_n_used(pa_module*m);
+void pa_module_update_proplist(pa_module *m, pa_update_mode_t mode, pa_proplist *p);
+
#define PA_MODULE_AUTHOR(s) \
const char *pa__get_author(void) { return s; } \
struct __stupid_useless_struct_to_allow_trailing_semicolon