diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2015-02-13 14:17:40 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-19 11:02:15 +0100 |
commit | a980d1569eaf1074f728fc1c41d6a85e58c1f5af (patch) | |
tree | de6dbb6f408382a989afe8cfc87627df5feacc45 /android/tester-main.c | |
parent | 89f820abe487185f7503b0714844404fed1e2685 (diff) | |
download | bluez-a980d1569eaf1074f728fc1c41d6a85e58c1f5af.tar.gz |
android/tester: Add test for GATT server app indication confirmation
This adds checking if sent indication or notification has been confirmed
over HAL.
Diffstat (limited to 'android/tester-main.c')
-rw-r--r-- | android/tester-main.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/android/tester-main.c b/android/tester-main.c index c13f056d7..25065482f 100644 --- a/android/tester-main.c +++ b/android/tester-main.c @@ -121,6 +121,7 @@ static struct { DBG_CB(CB_GATTS_REQUEST_WRITE), DBG_CB(CB_GATTS_REQUEST_EXEC_WRITE), DBG_CB(CB_GATTS_RESPONSE_CONFIRMATION), + DBG_CB(CB_GATTS_INDICATION_SEND), /* Map client */ DBG_CB(CB_MAP_CLIENT_REMOTE_MAS_INSTANCES), @@ -2000,6 +2001,18 @@ static void gatts_request_write_cb(int conn_id, int trans_id, bt_bdaddr_t *bda, schedule_callback_verification(step); } +static void gatts_indication_send_cb(int conn_id, int status) +{ + struct step *step = g_new0(struct step, 1); + + step->callback = CB_GATTS_INDICATION_SEND; + + step->callback_result.conn_id = conn_id; + step->callback_result.status = status; + + schedule_callback_verification(step); +} + static const btgatt_server_callbacks_t btgatt_server_callbacks = { .register_server_cb = gatts_register_server_cb, .connection_cb = gatts_connection_cb, @@ -2013,7 +2026,9 @@ static const btgatt_server_callbacks_t btgatt_server_callbacks = { .request_read_cb = gatts_request_read_cb, .request_write_cb = gatts_request_write_cb, .request_exec_write_cb = NULL, - .response_confirmation_cb = NULL + .response_confirmation_cb = NULL, + .indication_sent_cb = gatts_indication_send_cb, + .congestion_cb = NULL, }; static const btgatt_callbacks_t btgatt_callbacks = { |