Linux bluetooth development
 help / color / mirror / Atom feed
From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [RFC v2 10/15] adapter: Remove DeviceCreated/DeviceRemoved signals
Date: Thu, 29 Nov 2012 13:47:31 +0100	[thread overview]
Message-ID: <1354193256-30610-11-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1354193256-30610-1-git-send-email-mikel.astiz.oss@gmail.com>

From: Mikel Astiz <mikel.astiz@bmw-carit.de>

The Adapter interface already reports changes in the device list in form
of property changes, so there is no need to keep these two signals.
---
 doc/adapter-api.txt |  8 --------
 src/adapter.c       | 17 -----------------
 2 files changed, 25 deletions(-)

diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index b638586..132e60f 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -116,14 +116,6 @@ Signals		DevicesFound(array{object path, dict values})
 			The dictionary contains the properties from the
 			org.bluez.Device interface.
 
-		DeviceCreated(object device)
-
-			Parameter is object path of created device.
-
-		DeviceRemoved(object device)
-
-			Parameter is object path of removed device.
-
 Properties	string Address [readonly]
 
 			The Bluetooth device address.
diff --git a/src/adapter.c b/src/adapter.c
index 89ba34d..683833d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1008,7 +1008,6 @@ static struct btd_device *adapter_create_device(struct btd_adapter *adapter,
 						uint8_t bdaddr_type)
 {
 	struct btd_device *device;
-	const char *path;
 
 	DBG("%s", address);
 
@@ -1020,12 +1019,6 @@ static struct btd_device *adapter_create_device(struct btd_adapter *adapter,
 
 	adapter->devices = g_slist_append(adapter->devices, device);
 
-	path = device_get_path(device);
-	g_dbus_emit_signal(btd_get_dbus_connection(), adapter->path,
-			ADAPTER_INTERFACE, "DeviceCreated",
-			DBUS_TYPE_OBJECT_PATH, &path,
-			DBUS_TYPE_INVALID);
-
 	g_dbus_emit_property_changed(btd_get_dbus_connection(),
 				adapter->path, ADAPTER_INTERFACE, "Devices");
 
@@ -1053,7 +1046,6 @@ void adapter_remove_device(struct btd_adapter *adapter,
 						struct btd_device *dev,
 						gboolean remove_storage)
 {
-	const gchar *dev_path = device_get_path(dev);
 	struct discovery *discovery = adapter->discovery;
 	GList *l;
 
@@ -1085,11 +1077,6 @@ void adapter_remove_device(struct btd_adapter *adapter,
 	g_dbus_emit_property_changed(btd_get_dbus_connection(),
 				adapter->path, ADAPTER_INTERFACE, "Devices");
 
-	g_dbus_emit_signal(btd_get_dbus_connection(), adapter->path,
-			ADAPTER_INTERFACE, "DeviceRemoved",
-			DBUS_TYPE_OBJECT_PATH, &dev_path,
-			DBUS_TYPE_INVALID);
-
 	device_remove(dev, remove_storage);
 }
 
@@ -1681,10 +1668,6 @@ static const GDBusMethodTable adapter_methods[] = {
 };
 
 static const GDBusSignalTable adapter_signals[] = {
-	{ GDBUS_SIGNAL("DeviceCreated",
-			GDBUS_ARGS({ "device", "o" })) },
-	{ GDBUS_SIGNAL("DeviceRemoved",
-			GDBUS_ARGS({ "device", "o" })) },
 	{ GDBUS_SIGNAL("DevicesFound",
 			GDBUS_ARGS({ "devices", "a{oa{sv}}" })) },
 	{ }
-- 
1.7.11.7


  parent reply	other threads:[~2012-11-29 12:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 12:47 [RFC v2 00/15] Manager/Adapter transition to ObjectManager Mikel Astiz
2012-11-29 12:47 ` [RFC v2 01/15] cups: Remove unnecessary code Mikel Astiz
2012-11-29 12:47 ` [RFC v2 02/15] test: Add utility library for python scripts Mikel Astiz
2012-11-30 12:28   ` Anderson Lizardo
2012-11-29 12:47 ` [RFC v2 03/15] test: Avoid using DefaultAdapter() Mikel Astiz
2012-11-29 12:47 ` [RFC v2 04/15] test: Update monitor script to ObjectManager Mikel Astiz
2012-11-29 12:47 ` [RFC v2 05/15] test: Update test-manager " Mikel Astiz
2012-11-29 12:47 ` [RFC v2 06/15] test: Use ObjectManager instead of Adapters property Mikel Astiz
2012-11-29 12:47 ` [RFC v2 07/15] dbus: Remove org.bluez.Manager Mikel Astiz
2012-11-29 12:47 ` [RFC v2 08/15] test: Use ObjectManager instead of Devices property Mikel Astiz
2012-11-29 12:47 ` [RFC v2 09/15] test: Add helper function to find devices Mikel Astiz
2012-11-29 12:47 ` Mikel Astiz [this message]
2012-11-29 12:47 ` [RFC v2 11/15] adapter: Remove redundant Devices property Mikel Astiz
2012-11-29 12:47 ` [RFC v2 12/15] test: Avoid using Adapter.FindDevice() Mikel Astiz
2012-11-29 12:47 ` [RFC v2 13/15] adapter: Remove FindDevice method from D-Bus API Mikel Astiz
2012-11-29 12:47 ` [RFC v2 14/15] dbus: Rename to org.bluez.Device1 Mikel Astiz
2012-11-29 12:47 ` [RFC v2 15/15] dbus: Rename to org.bluez.Adapter1 Mikel Astiz
2012-11-29 18:12 ` [RFC v2 00/15] Manager/Adapter transition to ObjectManager Lucas De Marchi
2012-11-30 11:38   ` Mikel Astiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354193256-30610-11-git-send-email-mikel.astiz.oss@gmail.com \
    --to=mikel.astiz.oss@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mikel.astiz@bmw-carit.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox