linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Frédéric Danis" <frederic.danis@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v17 14/15] adapter: Add API to get fast connectable mode
Date: Fri,  3 Aug 2012 14:07:19 +0200	[thread overview]
Message-ID: <1343995640-19784-15-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1343995640-19784-1-git-send-email-frederic.danis@linux.intel.com>

---
 src/adapter.c |   15 ++++++++++++++-
 src/adapter.h |    1 +
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index b7691d0..24fa704 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -151,6 +151,8 @@ struct btd_adapter {
 	GSList *pin_callbacks;
 
 	GSList *loaded_drivers;
+
+	gboolean fast_connectable;
 };
 
 static void dev_info_free(void *data)
@@ -3391,10 +3393,21 @@ void btd_adapter_unregister_powered_callback(struct btd_adapter *adapter,
 int btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
 							gboolean enable)
 {
+	int ret;
+
 	if (!adapter->up)
 		return -EINVAL;
 
-	return mgmt_set_fast_connectable(adapter->dev_id, enable);
+	ret = mgmt_set_fast_connectable(adapter->dev_id, enable);
+	if (ret == 0)
+		adapter->fast_connectable = enable;
+
+	return ret;
+}
+
+gboolean btd_adapter_get_fast_connectable(struct btd_adapter *adapter)
+{
+	return adapter->fast_connectable;
 }
 
 int btd_adapter_read_clock(struct btd_adapter *adapter, bdaddr_t *bdaddr,
diff --git a/src/adapter.h b/src/adapter.h
index d8a1bb1..6e22dbc 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -185,6 +185,7 @@ void btd_adapter_unregister_powered_callback(struct btd_adapter *adapter,
  * type to default values. Valid for both connectable and discoverable modes. */
 int btd_adapter_set_fast_connectable(struct btd_adapter *adapter,
 							gboolean enable);
+gboolean btd_adapter_get_fast_connectable(struct btd_adapter *adapter);
 
 int btd_adapter_read_clock(struct btd_adapter *adapter, bdaddr_t *bdaddr,
 				int which, int timeout, uint32_t *clock,
-- 
1.7.9.5


  parent reply	other threads:[~2012-08-03 12:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 12:07 [PATCH v17 00/15] Add org.bluez.Telephony interface Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 01/15] doc: Add telephony interface documents Frédéric Danis
2012-08-05  4:37   ` Marcel Holtmann
2012-08-06 20:30     ` Luiz Augusto von Dentz
2012-08-09 10:03       ` Frederic Danis
2012-08-09 14:42         ` Luiz Augusto von Dentz
2012-08-10 10:09           ` Frederic Danis
2012-08-03 12:07 ` [PATCH v17 02/15] doc: Add HSP HS channel to assigned numbers Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 03/15] audio: Move telephony drivers to D-Bus interface Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 04/15] audio: Simplify org.bluez.Headset Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 05/15] audio: Remove dummy telephony driver Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 06/15] audio: Remove maemo5 " Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 07/15] audio: Remove maemo6 " Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 08/15] audio: Remove oFono " Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 09/15] audio: Move HFP/HSP AG servers to telephony.c Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 10/15] audio: Send transport path to telephony agent Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 11/15] audio: Move HFP HF server to telephony.c Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 12/15] audio: Add DUN GW to org.bluez.Telephony Frédéric Danis
2012-08-03 12:07 ` [PATCH v17 13/15] audio: Add SAP " Frédéric Danis
2012-08-03 12:07 ` Frédéric Danis [this message]
2012-08-03 12:07 ` [PATCH v17 15/15] audio: Add fast connectable to telephony interface Frédéric Danis

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=1343995640-19784-15-git-send-email-frederic.danis@linux.intel.com \
    --to=frederic.danis@linux.intel.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).