diff --git a/android/tester-hidhost.c b/android/tester-hidhost.c
index 8da5d32..be840b0 100644
--- a/android/tester-hidhost.c
+++ b/android/tester-hidhost.c
/* Successfully verify sending data step */
step = g_new0(struct step, 1);
- step->action_status = BT_STATUS_SUCCESS;
+ step->callback = CB_EMU_CONFIRM_SEND_DATA;
- schedule_action_verification(step);
+ schedule_callback_verification(step);
break;
}
}
/* Successfully verify sending data step */
step = g_new0(struct step, 1);
- step->action_status = BT_STATUS_SUCCESS;
+ step->callback = CB_EMU_CONFIRM_SEND_DATA;
- schedule_action_verification(step);
+ schedule_callback_verification(step);
break;
}
}
{
struct test_data *data = tester_get_data();
const uint8_t *hid_addr = hciemu_get_client_bdaddr(data->hciemu);
+ struct step *step = g_new0(struct step, 1);
char *buf = "fe0201";
bt_bdaddr_t bdaddr;
- int status;
bdaddr2android((const bdaddr_t *) hid_addr, &bdaddr);
- /* Successfull result should be verified on the other end (hook) */
- status = data->if_hid->send_data(&bdaddr, buf);
- if (status) {
- struct step *step = g_new0(struct step, 1);
-
- step->action_status = status;
- schedule_action_verification(step);
- }
+ step->action_status = data->if_hid->send_data(&bdaddr, buf);
+ schedule_action_verification(step);
}
static void hidhost_send_data_action(void)
{
struct test_data *data = tester_get_data();
const uint8_t *hid_addr = hciemu_get_client_bdaddr(data->hciemu);
+ struct step *step = g_new0(struct step, 1);
char *buf = "010101";
bt_bdaddr_t bdaddr;
- int status;
bdaddr2android((const bdaddr_t *) hid_addr, &bdaddr);
- /* Successfull result should be verified on the other end (hook) */
- status = data->if_hid->set_report(&bdaddr, BTHH_INPUT_REPORT, buf);
- if (status) {
- struct step *step = g_new0(struct step, 1);
-
- step->action_status = status;
- schedule_action_verification(step);
- }
+ step->action_status = data->if_hid->set_report(&bdaddr,
+ BTHH_INPUT_REPORT, buf);
+ schedule_action_verification(step);
}
static struct test_case test_cases[] = {
CALLBACK_STATE(CB_HH_CONNECTION_STATE,
BTHH_CONN_STATE_CONNECTED),
ACTION_SUCCESS(hidhost_set_report_action, NULL),
+ CALLBACK(CB_EMU_CONFIRM_SEND_DATA),
),
TEST_CASE_BREDRLE("HidHost SendData Success",
ACTION_SUCCESS(bluetooth_enable_action, NULL),
CALLBACK_STATE(CB_HH_CONNECTION_STATE,
BTHH_CONN_STATE_CONNECTED),
ACTION_SUCCESS(hidhost_send_data_action, NULL),
+ CALLBACK(CB_EMU_CONFIRM_SEND_DATA),
),
};
diff --git a/android/tester-main.c b/android/tester-main.c
index 5d66fe1..c637fd5 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
DBG_CB(CB_GATTS_REQUEST_WRITE),
DBG_CB(CB_GATTS_REQUEST_EXEC_WRITE),
DBG_CB(CB_GATTS_RESPONSE_CONFIRMATION),
+
+ /* Emulator callbacks */
+ DBG_CB(CB_EMU_CONFIRM_SEND_DATA),
};
static gboolean check_callbacks_called(gpointer user_data)
diff --git a/android/tester-main.h b/android/tester-main.h
index 3e5c27d..6245381 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
CB_GATTS_REQUEST_WRITE,
CB_GATTS_REQUEST_EXEC_WRITE,
CB_GATTS_RESPONSE_CONFIRMATION,
+
+ /* Emulator callbacks */
+ CB_EMU_CONFIRM_SEND_DATA,
} expected_bt_callback_t;
struct test_data {