diff options
author | Colin Guthrie <cguthrie@mandriva.org> | 2009-09-20 13:57:10 +0100 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2009-10-01 09:08:29 +0100 |
commit | a64f0f719ff4154cbd3d8f78dbb41c8e816eb672 (patch) | |
tree | 996cbe1c5ed9d2b559284d98f464d2444d59cf7b /src/modules/module-device-manager.c | |
parent | f8ec8f382ff1e9a05296b5a656195d44e8d05b44 (diff) |
device-manager: Let subscribed clients know when something changes.
Diffstat (limited to 'src/modules/module-device-manager.c')
-rw-r--r-- | src/modules/module-device-manager.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c index 0a0c39dc..59aedd67 100644 --- a/src/modules/module-device-manager.c +++ b/src/modules/module-device-manager.c @@ -174,6 +174,22 @@ fail: } static void trigger_save(struct userdata *u) { + pa_native_connection *c; + uint32_t idx; + + for (c = pa_idxset_first(u->subscribed, &idx); c; c = pa_idxset_next(u->subscribed, &idx)) { + pa_tagstruct *t; + + t = pa_tagstruct_new(NULL, 0); + pa_tagstruct_putu32(t, PA_COMMAND_EXTENSION); + pa_tagstruct_putu32(t, 0); + pa_tagstruct_putu32(t, u->module->index); + pa_tagstruct_puts(t, u->module->name); + pa_tagstruct_putu32(t, SUBCOMMAND_EVENT); + + pa_pstream_send_tagstruct(pa_native_connection_get_pstream(c), t); + } + if (u->save_time_event) return; |