From: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Jakub Tyszkowski <jakub.tyszkowski@tieto.com>
Subject: [PATCHv2 4/4] android/client: Add handshake callback
Date: Thu, 20 Nov 2014 12:18:51 +0100 [thread overview]
Message-ID: <1416482331-3766-4-git-send-email-jakub.tyszkowski@tieto.com> (raw)
In-Reply-To: <1416482331-3766-1-git-send-email-jakub.tyszkowski@tieto.com>
---
android/client/if-hh.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/android/client/if-hh.c b/android/client/if-hh.c
index b2bf8ca..25519e5 100644
--- a/android/client/if-hh.c
+++ b/android/client/if-hh.c
@@ -100,6 +100,18 @@ static void virtual_unplug_cb(bt_bdaddr_t *bd_addr, bthh_status_t hh_status)
bthh_status_t2str(hh_status));
}
+/* Callback for Android 5.0 handshake api. */
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+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\n", __func__,
+ bt_bdaddr_t2str(bd_addr, addr),
+ bthh_status_t2str(hh_status));
+}
+#endif
+
/*
* Callback for get hid info
* hid_info will contain attr_mask, sub_class, app_id, vendor_id, product_id,
@@ -163,7 +175,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.1
next prev parent reply other threads:[~2014-11-20 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 11:18 [PATCHv2 1/4] android/hal-ipc-api: Update HidHost with Android 5 API Jakub Tyszkowski
2014-11-20 11:18 ` [PATCHv2 2/4] android/hal: Update HidHost HAL for Android 5 Jakub Tyszkowski
2014-11-20 11:18 ` [PATCHv2 3/4] android/hid: Support handshake message Jakub Tyszkowski
2014-11-20 11:18 ` Jakub Tyszkowski [this message]
2014-11-20 15:23 ` [PATCHv2 1/4] android/hal-ipc-api: Update HidHost with Android 5 API Szymon Janc
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=1416482331-3766-4-git-send-email-jakub.tyszkowski@tieto.com \
--to=jakub.tyszkowski@tieto.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