From 3d374e9f678133638e661cadf73d4ef7ddcfe6eb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Aug 2004 00:11:12 +0000 Subject: add subscription subsystem git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@112 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/module.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'polyp/module.c') diff --git a/polyp/module.c b/polyp/module.c index 83bfa800..849afca4 100644 --- a/polyp/module.c +++ b/polyp/module.c @@ -32,6 +32,7 @@ #include "module.h" #include "xmalloc.h" +#include "subscribe.h" #define UNLOAD_POLL_TIME 10 @@ -92,6 +93,8 @@ struct pa_module* pa_module_load(struct pa_core *c, const char *name, const char assert(r >= 0 && m->index != PA_IDXSET_INVALID); fprintf(stderr, "module: loaded %u \"%s\" with argument \"%s\".\n", m->index, m->name, m->argument); + + pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_NEW, m->index); return m; @@ -117,6 +120,8 @@ static void pa_module_free(struct pa_module *m) { fprintf(stderr, "module: unloaded %u \"%s\".\n", m->index, m->name); + pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_REMOVE, m->index); + pa_xfree(m->name); pa_xfree(m->argument); pa_xfree(m); -- cgit