Return-Path: From: Mikel Astiz To: linux-bluetooth@vger.kernel.org Cc: Mikel Astiz Subject: [RFC BlueZ v2 11/13] dbus: Deprecate old profile-connecting API Date: Wed, 12 Jun 2013 09:06:53 +0200 Message-Id: <1371020815-22330-12-git-send-email-mikel.astiz.oss@gmail.com> In-Reply-To: <1371020815-22330-1-git-send-email-mikel.astiz.oss@gmail.com> References: <1371020815-22330-1-git-send-email-mikel.astiz.oss@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Mikel Astiz The new org.bluez.Service1 interface deprecates the old UUID-specific connect/disconnect methods in org.bluez.Device1. --- doc/device-api.txt | 4 ++-- src/device.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/device-api.txt b/doc/device-api.txt index 6201780..5329054 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -40,7 +40,7 @@ Methods void Connect() Possible errors: org.bluez.Error.NotConnected - void ConnectProfile(string uuid) + void ConnectProfile(string uuid) [Deprecated] This method connects a specific profile of this device. The UUID provided is the remote service @@ -50,7 +50,7 @@ Methods void Connect() org.bluez.Error.AlreadyConnected org.bluez.Error.ConnectFailed - void DisconnectProfile(string uuid) + void DisconnectProfile(string uuid) [Deprecated] This method disconnects a specific profile of this device. The profile needs to be registered diff --git a/src/device.c b/src/device.c index d2be46b..7c6f2c8 100644 --- a/src/device.c +++ b/src/device.c @@ -1728,9 +1728,11 @@ static DBusMessage *cancel_pairing(DBusConnection *conn, DBusMessage *msg, static const GDBusMethodTable device_methods[] = { { GDBUS_ASYNC_METHOD("Disconnect", NULL, NULL, dev_disconnect) }, { GDBUS_ASYNC_METHOD("Connect", NULL, NULL, dev_connect) }, - { GDBUS_ASYNC_METHOD("ConnectProfile", GDBUS_ARGS({ "UUID", "s" }), + { GDBUS_DEPRECATED_ASYNC_METHOD("ConnectProfile", + GDBUS_ARGS({ "UUID", "s" }), NULL, connect_profile) }, - { GDBUS_ASYNC_METHOD("DisconnectProfile", GDBUS_ARGS({ "UUID", "s" }), + { GDBUS_DEPRECATED_ASYNC_METHOD("DisconnectProfile", + GDBUS_ARGS({ "UUID", "s" }), NULL, disconnect_profile) }, { GDBUS_ASYNC_METHOD("Pair", NULL, NULL, pair_device) }, { GDBUS_METHOD("CancelPairing", NULL, NULL, cancel_pairing) }, -- 1.8.1.4