Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v2 8/8] a2dp: Add implementation of MediaEndpoint.Device
Date: Tue, 15 Jan 2019 11:10:23 -0300	[thread overview]
Message-ID: <20190115141023.353-8-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20190115141023.353-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds the implementation of MediaEndpoint.Device property so the
clints don't need to guess what device the endpoint belongs.
---
 profiles/audio/a2dp.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 6975682c9..ff384cd23 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -1718,6 +1718,19 @@ static gboolean get_capabilities(const GDBusPropertyTable *property,
 	return TRUE;
 }
 
+static gboolean get_device(const GDBusPropertyTable *property,
+					DBusMessageIter *iter, void *data)
+{
+	struct a2dp_remote_sep *sep = data;
+	const char *path;
+
+	path = device_get_path(sep->chan->device);
+
+	dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
+
+	return TRUE;
+}
+
 static const GDBusPropertyTable sep_properties[] = {
 	{ "UUID", "s", get_uuid, NULL, NULL,
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
@@ -1725,6 +1738,8 @@ static const GDBusPropertyTable sep_properties[] = {
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
 	{ "Capabilities", "ay", get_capabilities, NULL, NULL,
 					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Device", "o", get_device, NULL, NULL,
+					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
 	{ }
 };
 
-- 
2.17.2


  parent reply	other threads:[~2019-01-15 14:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 14:10 [PATCH v2 1/8] doc/media-api: Enable MediaEndpoint to expose remote SEP Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 2/8] a2dp: Expose " Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 3/8] doc/media-api: Add Endpoint property to MediaTransport Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 4/8] a2dp: Implement MediaTransport.Endpoint Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 5/8] doc/settings-storage: Add Endpoint group to cache Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 6/8] a2dp: Cache remote endpoints Luiz Augusto von Dentz
2019-01-15 14:10 ` [PATCH v2 7/8] doc/media-api: Add Device property to MediaEndpoint Luiz Augusto von Dentz
2019-01-15 14:10 ` Luiz Augusto von Dentz [this message]
2019-01-21 18:25 ` [PATCH v2 1/8] doc/media-api: Enable MediaEndpoint to expose remote SEP Luiz Augusto von Dentz
2019-01-21 18:30   ` Pali Rohár
2019-01-22 12:35     ` Luiz Augusto von Dentz
2019-01-22 12:38       ` Pali Rohár
2019-01-22 12:54         ` Luiz Augusto von Dentz
2019-01-22 12:59           ` Pali Rohár

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=20190115141023.353-8-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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