[PATCHv1 03/47] android/hal-bluetooth: Add missing functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

Add missing HAL functions for new Android version
---
 android/hal-bluetooth.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 5b6e99d..bbbdc37 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -948,6 +948,35 @@ static int config_hci_snoop_log(uint8_t enable)
 	return BT_STATUS_SUCCESS;
 }
 
+#if ANDROID_VERSION > PLATFORM_VER(4, 4, 4)
+static int get_connection_state(const bt_bdaddr_t *bd_addr)
+{
+	DBG("bdaddr: %s", bdaddr2str(bd_addr));
+
+	/* TODO: implement */
+
+	return BT_STATUS_UNSUPPORTED;
+}
+
+static int set_os_callouts(bt_os_callouts_t *callouts)
+{
+	DBG("callouts: %p", callouts);
+
+	/* TODO: implement */
+
+	return BT_STATUS_SUCCESS;
+}
+
+static int read_energy_info(void)
+{
+	DBG("");
+
+	/* TODO: implement */
+
+	return BT_STATUS_UNSUPPORTED;
+}
+#endif
+
 static const bt_interface_t bluetooth_if = {
 	.size = sizeof(bt_interface_t),
 	.init = init,
@@ -974,6 +1003,11 @@ static const bt_interface_t bluetooth_if = {
 	.dut_mode_send = dut_mode_send,
 	.le_test_mode = le_test_mode,
 	.config_hci_snoop_log = config_hci_snoop_log,
+#if ANDROID_VERSION > PLATFORM_VER(4, 4, 4)
+	.get_connection_state = get_connection_state,
+	.set_os_callouts = set_os_callouts,
+	.read_energy_info = read_energy_info,
+#endif
 };
 
 static const bt_interface_t *get_bluetooth_interface(void)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux