diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-11 00:11:12 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-11 00:11:12 +0000 |
commit | 3d374e9f678133638e661cadf73d4ef7ddcfe6eb (patch) | |
tree | 58f89c96e8e9fdbf027a407837ce1cd5f7d5e78a /polyp/client.c | |
parent | fc618e9f316a1ec2b48a7981db41a121c79f0c27 (diff) |
add subscription subsystem
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@112 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/client.c')
-rw-r--r-- | polyp/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/polyp/client.c b/polyp/client.c index 83a6264d..809f9761 100644 --- a/polyp/client.c +++ b/polyp/client.c @@ -30,6 +30,7 @@ #include "client.h" #include "xmalloc.h" +#include "subscribe.h" struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name, char *name) { struct pa_client *c; @@ -49,6 +50,7 @@ struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name, assert(c->index != PA_IDXSET_INVALID && r >= 0); fprintf(stderr, "client: created %u \"%s\"\n", c->index, c->name); + pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index); return c; } @@ -58,6 +60,7 @@ void pa_client_free(struct pa_client *c) { pa_idxset_remove_by_data(c->core->clients, c, NULL); fprintf(stderr, "client: freed %u \"%s\"\n", c->index, c->name); + pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index); pa_xfree(c->name); pa_xfree(c); } |