Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2 1/2] android/client: Add hidhost callback support for Android 5.0
@ 2014-11-17 16:04 Grzegorz Kolodziejczyk
  2014-11-17 16:04 ` [PATCH v2 2/2] android/client: Add gatt client callbacks " Grzegorz Kolodziejczyk
  0 siblings, 1 reply; 3+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-17 16:04 UTC (permalink / raw)
  To: linux-bluetooth

---
 android/client/if-hh.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/android/client/if-hh.c b/android/client/if-hh.c
index b2bf8ca..e11c13c 100644
--- a/android/client/if-hh.c
+++ b/android/client/if-hh.c
@@ -156,6 +156,21 @@ static void get_report_cb(bt_bdaddr_t *bd_addr, bthh_status_t hh_status,
 					bthh_status_t2str(hh_status), rpt_size);
 }
 
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+/*
+ * Callback for set_report/set_protocol api and if error
+ * occurs for get_report/get_protocol api.
+ */
+static void handshake_cb(bt_bdaddr_t *bd_addr, bthh_status_t hh_status)
+{
+	char addr[MAX_ADDR_STR_LEN];
+
+	haltest_info("%s: bd_addr=%s hh_status=%s", __func__,
+						bt_bdaddr_t2str(bd_addr, addr),
+						bthh_status_t2str(hh_status));
+}
+#endif
+
 static bthh_callbacks_t bthh_callbacks = {
 	.size = sizeof(bthh_callbacks),
 	.connection_state_cb = connection_state_cb,
@@ -163,7 +178,10 @@ static bthh_callbacks_t bthh_callbacks = {
 	.protocol_mode_cb = protocol_mode_cb,
 	.idle_time_cb = idle_time_cb,
 	.get_report_cb = get_report_cb,
-	.virtual_unplug_cb = virtual_unplug_cb
+	.virtual_unplug_cb = virtual_unplug_cb,
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+	.handshake_cb = handshake_cb,
+#endif
 };
 
 /* init */
-- 
1.9.3


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

end of thread, other threads:[~2014-11-21 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 16:04 [PATCH v2 1/2] android/client: Add hidhost callback support for Android 5.0 Grzegorz Kolodziejczyk
2014-11-17 16:04 ` [PATCH v2 2/2] android/client: Add gatt client callbacks " Grzegorz Kolodziejczyk
2014-11-21 10:55   ` Szymon Janc

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