linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 09/10] Remove local cache for nrec and inband
Date: Mon, 13 Sep 2010 17:15:36 +0300	[thread overview]
Message-ID: <1284387337-18822-10-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1284387337-18822-1-git-send-email-luiz.dentz@gmail.com>

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

Those can be acessed directly from device/headset.
---
 audio/transport.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/audio/transport.c b/audio/transport.c
index 0da99e8..6d08677 100644
--- a/audio/transport.c
+++ b/audio/transport.c
@@ -72,8 +72,6 @@ struct media_transport {
 	uint16_t		imtu;		/* Transport input mtu */
 	uint16_t		omtu;		/* Transport output mtu */
 	uint16_t		delay;		/* Transport delay (a2dp only) */
-	gboolean		nrec;		/* Transport nrec (hfp only) */
-	gboolean		inband;		/* Transport inband ringtone support (hfp only) */
 	gboolean		read_lock;
 	gboolean		write_lock;
 	gboolean		in_use;
@@ -519,10 +517,13 @@ static void get_properties_a2dp(struct media_transport *transport,
 static void get_properties_headset(struct media_transport *transport,
 						DBusMessageIter *dict)
 {
-	dict_append_entry(dict, "NREC", DBUS_TYPE_BOOLEAN, &transport->nrec);
+	gboolean nrec, inband;
 
-	dict_append_entry(dict, "InbandRingtone", DBUS_TYPE_BOOLEAN,
-							&transport->inband);
+	nrec = headset_get_nrec(transport->device);
+	dict_append_entry(dict, "NREC", DBUS_TYPE_BOOLEAN, &nrec);
+
+	inband = headset_get_inband(transport->device);
+	dict_append_entry(dict, "InbandRingtone", DBUS_TYPE_BOOLEAN, &inband);
 }
 
 static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg,
-- 
1.7.1


  parent reply	other threads:[~2010-09-13 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 14:15 [PATCH 00/10] Media API Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 01/10] Add media API documentation Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 02/10] Add rule to enabling talking to org.bluez.MediaEndpoint Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 03/10] Add option to enable/disable unix ipc via audio.conf Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 04/10] Add support for media transport in gstreamer plugin Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 05/10] Add simple-endpoint test script Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 06/10] Add initial implementation of org.bluez.Media spec Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 07/10] Introduce headset_get_inband Luiz Augusto von Dentz
2010-09-13 14:15 ` [PATCH 08/10] Update a2dp transport delay when it changes Luiz Augusto von Dentz
2010-09-13 14:15 ` Luiz Augusto von Dentz [this message]
2010-09-13 14:15 ` [PATCH 10/10] Add proper checks for MediaTransport.SetProperty Luiz Augusto von Dentz
2010-09-15 13:35 ` [PATCH 00/10] Media API Johan Hedberg

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=1284387337-18822-10-git-send-email-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;
as well as URLs for NNTP newsgroup(s).