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 v1 14/16] adapter: Remove redundant Devices property
Date: Thu, 15 Nov 2012 16:09:17 +0100	[thread overview]
Message-ID: <1352992159-11559-15-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1352992159-11559-1-git-send-email-mikel.astiz.oss@gmail.com>

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

The ObjectManager interface already reports the list of devices, so the
the property can be entirely removed.
---
 doc/adapter-api.txt |  4 ----
 src/adapter.c       | 30 ------------------------------
 2 files changed, 34 deletions(-)

diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 132e60f..3582793 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -180,10 +180,6 @@ Properties	string Address [readonly]
 
 			Indicates that a device discovery procedure is active.
 
-		array{object} Devices [readonly]
-
-			List of device object paths.
-
 		array{string} UUIDs [readonly]
 
 			List of 128-bit UUIDs that represents the available
diff --git a/src/adapter.c b/src/adapter.c
index aa93785..eb82102 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1018,9 +1018,6 @@ static struct btd_device *adapter_create_device(struct btd_adapter *adapter,
 
 	adapter->devices = g_slist_append(adapter->devices, device);
 
-	g_dbus_emit_property_changed(btd_get_dbus_connection(),
-				adapter->path, ADAPTER_INTERFACE, "Devices");
-
 	return device;
 }
 
@@ -1073,9 +1070,6 @@ void adapter_remove_device(struct btd_adapter *adapter,
 		service_auth_cancel(auth);
 	}
 
-	g_dbus_emit_property_changed(btd_get_dbus_connection(),
-				adapter->path, ADAPTER_INTERFACE, "Devices");
-
 	device_remove(dev, remove_storage);
 }
 
@@ -1381,29 +1375,6 @@ static gboolean adapter_property_get_discovering(
 	return TRUE;
 }
 
-static gboolean adapter_property_get_devices(
-					const GDBusPropertyTable *property,
-					DBusMessageIter *iter, void *data)
-{
-	struct btd_adapter *adapter = data;
-	DBusMessageIter entry;
-	GSList *l;
-
-	dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
-				DBUS_TYPE_OBJECT_PATH_AS_STRING, &entry);
-
-	for (l = adapter->devices; l != NULL; l = l->next) {
-		const char *path = device_get_path(l->data);
-
-		dbus_message_iter_append_basic(&entry, DBUS_TYPE_OBJECT_PATH,
-								&path);
-	}
-
-	dbus_message_iter_close_container(iter, &entry);
-
-	return TRUE;
-}
-
 static gboolean adapter_property_get_uuids(const GDBusPropertyTable *property,
 					DBusMessageIter *iter, void *data)
 {
@@ -1688,7 +1659,6 @@ static const GDBusPropertyTable adapter_properties[] = {
 	{ "PairableTimeout", "u", adapter_property_get_pairable_timeout,
 				adapter_property_set_pairable_timeout },
 	{ "Discovering", "b", adapter_property_get_discovering },
-	{ "Devices", "ao", adapter_property_get_devices },
 	{ "UUIDs", "as", adapter_property_get_uuids },
 	{ }
 };
-- 
1.7.11.7


  parent reply	other threads:[~2012-11-15 15:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 15:09 [RFC v1 00/16] Manager/Adapter transition to ObjectManager Mikel Astiz
2012-11-15 15:09 ` [RFC v1 01/16] cups: Remove unnecessary code Mikel Astiz
2012-11-15 15:09 ` [RFC v1 02/16] doc: Add missing documentation in FindAdapter Mikel Astiz
2012-11-15 15:09 ` [RFC v1 03/16] manager: Extend FindAdapter with "default" pattern Mikel Astiz
2012-11-16 13:29   ` Luiz Augusto von Dentz
2012-11-15 15:09 ` [RFC v1 04/16] test: Avoid using DefaultAdapter() Mikel Astiz
2012-11-15 15:09 ` [RFC v1 05/16] manager: Move org.bluez.Manager to org/bluez Mikel Astiz
2012-11-15 15:09 ` [RFC v1 06/16] test: Update to new Manager path Mikel Astiz
2012-11-15 15:09 ` [RFC v1 07/16] test: Update monitor script to ObjectManager Mikel Astiz
2012-11-15 15:09 ` [RFC v1 08/16] manager: Expose default adapter using property Mikel Astiz
2012-11-15 15:09 ` [RFC v1 09/16] test: Update test-manager script to ObjectManager Mikel Astiz
2012-11-15 15:09 ` [RFC v1 10/16] manager: Remove AdapterAdded/AdapterRemoved signals Mikel Astiz
2012-11-15 15:09 ` [RFC v1 11/16] manager: Remove redundant Adapters property Mikel Astiz
2012-11-15 15:09 ` [RFC v1 12/16] test: Use ObjectManager instead of " Mikel Astiz
2012-11-15 15:09 ` [RFC v1 13/16] adapter: Remove DeviceCreated/DeviceRemoved signals Mikel Astiz
2012-11-15 15:09 ` Mikel Astiz [this message]
2012-11-15 15:09 ` [RFC v1 15/16] test: Use ObjectManager instead of Devices property Mikel Astiz
2012-11-15 15:09 ` [RFC v1 16/16] adapter: Remove FindDevice method from D-Bus API 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=1352992159-11559-15-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