summaryrefslogtreecommitdiff
path: root/android/tester-main.h
diff options
context:
space:
mode:
authorMarcin Kraglak <marcin.kraglak@tieto.com>2014-10-02 14:34:07 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-10-02 15:25:16 +0200
commitc9889f54f063c251eae575a36ec271834c4578c0 (patch)
tree985dc91043ebb59c4edc0278227a4c058c7822fd /android/tester-main.h
parentee83025c5e7639d93e8332c3528d1f531c4024f0 (diff)
downloadbluez-c9889f54f063c251eae575a36ec271834c4578c0.tar.gz
android/tester: Add support for GATT Notification in tester
Service register_for_notification and notification callbacks.
Diffstat (limited to 'android/tester-main.h')
-rw-r--r--android/tester-main.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/android/tester-main.h b/android/tester-main.h
index c6662cab7..57b75082d 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
@@ -218,6 +218,22 @@ struct pdu_set {
.callback_result.write_params = cb_write_data, \
}
+#define CALLBACK_GATTC_REGISTER_FOR_NOTIF(cb_res, cb_conn_id, cb_char,\
+ cb_service, cb_registered) { \
+ .callback = CB_GATTC_REGISTER_FOR_NOTIFICATION, \
+ .callback_result.conn_id = cb_conn_id, \
+ .callback_result.status = cb_res, \
+ .callback_result.service = cb_service, \
+ .callback_result.characteristic = cb_char, \
+ .callback_result.notification_registered = cb_registered \
+ }
+
+#define CALLBACK_GATTC_NOTIFY(cb_conn_id, cb_notify) { \
+ .callback = CB_GATTC_NOTIFY, \
+ .callback_result.conn_id = cb_conn_id, \
+ .callback_result.notify_params = cb_notify \
+ }
+
#define CALLBACK_GATTC_DISCONNECT(cb_res, cb_prop, cb_conn_id, cb_client_id) { \
.callback = CB_GATTC_CLOSE, \
.callback_result.status = cb_res, \
@@ -473,6 +489,8 @@ struct bt_callback_data {
btgatt_srvc_id_t *included;
btgatt_read_params_t *read_params;
btgatt_write_params_t *write_params;
+ btgatt_notify_params_t *notify_params;
+ int notification_registered;
int char_prop;
btpan_control_state_t ctrl_state;