Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] android/bluetooth: Add function for getting bonded device list
@ 2014-05-12 14:38 Grzegorz Kolodziejczyk
  2014-05-12 14:38 ` [PATCH 2/2] android/gatt: Refresh device cache on disconnect if not bonded Grzegorz Kolodziejczyk
  2014-05-14 13:25 ` [PATCH 1/2] android/bluetooth: Add function for getting bonded device list Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-05-12 14:38 UTC (permalink / raw)
  To: linux-bluetooth

This will be used by GATT HAL.
---
 android/bluetooth.c | 8 ++++++++
 android/bluetooth.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/android/bluetooth.c b/android/bluetooth.c
index be7b47c..ecdbeac 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1218,6 +1218,14 @@ const char *bt_get_adapter_name(void)
 	return adapter.name;
 }
 
+bool bt_device_is_bonded(const bdaddr_t *bdaddr)
+{
+	if (g_slist_find_custom(bonded_devices, bdaddr, device_match))
+		return true;
+
+	return false;
+}
+
 static bool rssi_above_threshold(int old, int new)
 {
 	/* only 8 dBm or more */
diff --git a/android/bluetooth.h b/android/bluetooth.h
index dddbf20..3eef7a4 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -49,3 +49,4 @@ bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb,
 
 uint8_t bt_get_device_android_type(const bdaddr_t *addr);
 const char *bt_get_adapter_name(void);
+bool bt_device_is_bonded(const bdaddr_t *bdaddr);
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-14 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 14:38 [PATCH 1/2] android/bluetooth: Add function for getting bonded device list Grzegorz Kolodziejczyk
2014-05-12 14:38 ` [PATCH 2/2] android/gatt: Refresh device cache on disconnect if not bonded Grzegorz Kolodziejczyk
2014-05-14 13:25 ` [PATCH 1/2] android/bluetooth: Add function for getting bonded device list Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox