From 35f99c6e31d90439f2bfbefb8b45cff323b40661 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 7 Jun 2011 12:18:17 +0200 Subject: device-restore: Add a new protocol extension for device-restore. This simply exposes the formats that a device supports via a simple protocol extension that will allow clients to setup what a connected receiver supports format wise. --- src/pulse/context.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/pulse/context.c') diff --git a/src/pulse/context.c b/src/pulse/context.c index 1480af53..5dd780bd 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -124,6 +124,9 @@ static void reset_callbacks(pa_context *c) { c->ext_device_manager.callback = NULL; c->ext_device_manager.userdata = NULL; + c->ext_device_restore.callback = NULL; + c->ext_device_restore.userdata = NULL; + c->ext_stream_restore.callback = NULL; c->ext_stream_restore.userdata = NULL; } @@ -1425,10 +1428,12 @@ void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_t goto finish; } - if (!strcmp(name, "module-stream-restore")) - pa_ext_stream_restore_command(c, tag, t); - else if (!strcmp(name, "module-device-manager")) + if (pa_streq(name, "module-device-manager")) pa_ext_device_manager_command(c, tag, t); + else if (pa_streq(name, "module-device-restore")) + pa_ext_device_manager_command(c, tag, t); + else if (pa_streq(name, "module-stream-restore")) + pa_ext_stream_restore_command(c, tag, t); else pa_log(_("Received message for unknown extension '%s'"), name); -- cgit