diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-10-01 11:35:51 -0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-10-03 18:07:07 -0300 |
commit | 3b427b7014ffe8d449a3a1336e483b4f949c9417 (patch) | |
tree | 6af631064a123eeeb9e58df64d9896e7f09f8afb /src/modules | |
parent | 443ea47ee07f990616f3a367842b16aa739c6283 (diff) |
Add signal handlers for Connected signals.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/bluetooth/module-bluetooth-discover.c | 12 |
1 files changed, 12 insertions, 0 deletions
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); |