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 BlueZ 4/6] android/bluetooth: Add bt_is_device_le function
Date: Mon,  2 Jun 2014 20:50:05 +0300	[thread overview]
Message-ID: <1401731407-10352-4-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1401731407-10352-1-git-send-email-luiz.dentz@gmail.com>

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

---
 android/bluetooth.c | 11 +++++++++++
 android/bluetooth.h |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/android/bluetooth.c b/android/bluetooth.c
index 8ee2025..2d2e08c 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1340,6 +1340,17 @@ uint8_t bt_get_device_android_type(const bdaddr_t *addr)
 	return get_device_android_type(dev);
 }
 
+bool bt_is_device_le(const bdaddr_t *addr)
+{
+	struct device *dev;
+
+	dev = find_device(addr);
+	if (!dev)
+		return false;
+
+	return dev->le;
+}
+
 const char *bt_get_adapter_name(void)
 {
 	return adapter.name;
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 1c14377..6962626 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -54,6 +54,8 @@ bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb,
 							void *user_data);
 
 uint8_t bt_get_device_android_type(const bdaddr_t *addr);
+bool bt_is_device_le(const bdaddr_t *addr);
+
 const char *bt_get_adapter_name(void);
 bool bt_device_is_bonded(const bdaddr_t *bdaddr);
 
-- 
1.9.0


  parent reply	other threads:[~2014-06-02 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 17:50 [PATCH BlueZ 1/6] android/hog: Add copy to HoG implementation from input plugin Luiz Augusto von Dentz
2014-06-02 17:50 ` [PATCH BlueZ 2/6] android/hog: Strip dependencies " Luiz Augusto von Dentz
2014-06-02 17:50 ` [PATCH BlueZ 3/6] android/gatt: Make application API public Luiz Augusto von Dentz
2014-06-02 17:50 ` Luiz Augusto von Dentz [this message]
2014-06-02 17:50 ` [PATCH BlueZ 5/6] android/hog: Add support to auto discover primary if not set Luiz Augusto von Dentz
2014-06-02 17:50 ` [PATCH BlueZ 6/6] android/hidhost: Add support for HoG Luiz Augusto von Dentz

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=1401731407-10352-4-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).