From: "Frédéric Danis" <frederic.danis@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v18 15/16] adapter: Add API to get fast connectable mode
Date: Thu, 23 Aug 2012 16:39:04 +0200 [thread overview]
Message-ID: <1345732745-28706-16-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1345732745-28706-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 b642e37..9c3e5d2 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 5a0247e..4be513b 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
next prev parent reply other threads:[~2012-08-23 14:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 14:38 [PATCH v18 00/16] Add org.bluez.Telephony interface Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 01/16] doc: Add telephony interface design document Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 02/16] doc: Add telephony interface to audio-api.txt Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 03/16] doc: Add HSP HS channel to assigned numbers Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 04/16] audio: Remove telephony driver from headset.c Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 05/16] audio: Remove dummy telephony driver Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 06/16] audio: Remove maemo5 " Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 07/16] audio: Remove maemo6 " Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 08/16] audio: Remove oFono " Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 09/16] audio: Add org.bluez.Telephony interface Frédéric Danis
2012-08-23 14:38 ` [PATCH v18 10/16] audio: Add headset audio properties to MediaTransport Frédéric Danis
2012-08-23 14:39 ` [PATCH v18 11/16] audio: Move HFP/HSP AG servers to telephony.c Frédéric Danis
2012-08-23 14:39 ` [PATCH v18 12/16] audio: Move HFP HF server " Frédéric Danis
2012-08-23 14:39 ` [PATCH v18 13/16] audio: Add DUN GW to org.bluez.Telephony Frédéric Danis
2012-08-23 14:39 ` [PATCH v18 14/16] audio: Add SAP " Frédéric Danis
2012-08-23 14:39 ` Frédéric Danis [this message]
2012-08-23 14:39 ` [PATCH v18 16/16] 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=1345732745-28706-16-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).