From 3b427b7014ffe8d449a3a1336e483b4f949c9417 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 1 Oct 2008 11:35:51 -0300 Subject: Add signal handlers for Connected signals. --- 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 cb5ee354..ae414a70 100644 --- a/src/modules/bluetooth/module-bluetooth-discover.c +++ b/src/modules/bluetooth/module-bluetooth-discover.c @@ -843,6 +843,18 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *msg, void * load_module_for_device(u, d); } } + + } else if (dbus_message_is_signal(msg, "org.bluez.Headset", "Connected") || + dbus_message_is_signal(msg, "org.bluez.AudioSink", "Connected")) { + + if (!dbus_message_iter_init(msg, &arg_i)) + pa_log("dbus: message has no parameters"); + else { + struct device *d; + + if ((d = device_find(u, dbus_message_get_path(msg)))) + load_module_for_device(u, d); + } } dbus_error_free(&err); -- cgit