From 443ea47ee07f990616f3a367842b16aa739c6283 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 1 Oct 2008 11:29:50 -0300 Subject: [PATCH] Add match rules for org.bluez.Headset and org.bluez.AudioSink. --- src/modules/bluetooth/module-bluetooth-discover.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c index 14944318..cb5ee354 100644 --- a/src/modules/bluetooth/module-bluetooth-discover.c +++ b/src/modules/bluetooth/module-bluetooth-discover.c @@ -918,6 +918,18 @@ int pa__init(pa_module* m) { goto fail; } + dbus_bus_add_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.Headset,member='Connected''", &err); + if (dbus_error_is_set(&err)) { + pa_log_error("Unable to subscribe to org.bluez.Headset signals: %s: %s", err.name, err.message); + goto fail; + } + + dbus_bus_add_match(pa_dbus_connection_get(u->conn), "type='signal',sender='org.bluez',interface='org.bluez.AudioSink,member='Connected''", &err); + if (dbus_error_is_set(&err)) { + pa_log_error("Unable to subscribe to org.bluez.AudioSink signals: %s: %s", err.name, err.message); + goto fail; + } + return 0; fail: -- 2.11.4.GIT