From 1da5a89a6f6bf25edeb8f6d46cfaa25a6bfbc440 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 18 Dec 2012 12:28:09 +0200 Subject: [PATCH] core: Remove DisconnectRequested signal This signal is not needed anymore thanks to the RequestDisconnect callback of the Profile interface. --- doc/device-api.txt | 12 ------------ src/device.c | 12 +----------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/doc/device-api.txt b/doc/device-api.txt index 0c1051d76..36f251d21 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -38,12 +38,6 @@ Methods void Connect() this method should be restricted to administrator use. - A DisconnectRequested signal will be sent and the - actual disconnection will only happen 2 seconds later. - This enables upper-level applications to terminate - their connections gracefully before the ACL connection - is terminated. - Possible errors: org.bluez.Error.NotConnected void ConnectProfile(string uuid) @@ -95,12 +89,6 @@ Methods void Connect() This method can be used to cancel a pairing operation initiated by the Pair method. -Signals DisconnectRequested() - - This signal will be sent when a low level - disconnection to a remote device has been requested. - The actual disconnection will happen 2 seconds later. - Properties string Address [readonly] The Bluetooth device address of the remote device. diff --git a/src/device.c b/src/device.c index ade7583f0..3e57191fd 100644 --- a/src/device.c +++ b/src/device.c @@ -1072,11 +1072,6 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg) device->disconn_timer = g_timeout_add_seconds(DISCONNECT_TIMER, do_disconnect, device); - - g_dbus_emit_signal(btd_get_dbus_connection(), - device->path, - DEVICE_INTERFACE, "DisconnectRequested", - DBUS_TYPE_INVALID); } static DBusMessage *disconnect(DBusConnection *conn, DBusMessage *msg, @@ -1516,11 +1511,6 @@ static const GDBusMethodTable device_methods[] = { { } }; -static const GDBusSignalTable device_signals[] = { - { GDBUS_SIGNAL("DisconnectRequested", NULL) }, - { } -}; - static const GDBusPropertyTable device_properties[] = { { "Address", "s", dev_property_get_address }, { "Name", "s", dev_property_get_name, NULL, dev_property_exists_name }, @@ -1960,7 +1950,7 @@ static struct btd_device *device_new(struct btd_adapter *adapter, if (g_dbus_register_interface(btd_get_dbus_connection(), device->path, DEVICE_INTERFACE, - device_methods, device_signals, + device_methods, NULL, device_properties, device, device_free) == FALSE) { device_free(device); -- 2.47.3