summaryrefslogtreecommitdiff
path: root/android/tester-hdp.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2014-08-06 16:41:50 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-08-08 16:33:38 +0300
commit06941720e44d3a4542591aef89131154f61f577c (patch)
treed69c3cae2ca405217525f5840c1284625adf0076 /android/tester-hdp.c
parent7463888f6b0f5f863276bf195a187ddb8f368126 (diff)
downloadbluez-06941720e44d3a4542591aef89131154f61f577c.tar.gz
android/tester: Add HDP App Unregister test case
Diffstat (limited to 'android/tester-hdp.c')
-rw-r--r--android/tester-hdp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/android/tester-hdp.c b/android/tester-hdp.c
index 1f5fee23e..9193609d1 100644
--- a/android/tester-hdp.c
+++ b/android/tester-hdp.c
@@ -162,6 +162,16 @@ static void hdp_register_source_stream_app_action(void)
free(reg);
}
+static void hdp_unregister_app_action(void)
+{
+ struct test_data *data = tester_get_data();
+ struct step *step = g_new0(struct step, 1);
+
+ step->action_status = data->if_hdp->unregister_application(1);
+
+ schedule_action_verification(step);
+}
+
static struct test_case test_cases[] = {
TEST_CASE_BREDRLE("HDP Init",
ACTION_SUCCESS(dummy_action, NULL),
@@ -186,6 +196,14 @@ static struct test_case test_cases[] = {
CALLBACK_HDP_APP_REG_STATE(CB_HDP_APP_REG_STATE, 1,
BTHL_APP_REG_STATE_REG_SUCCESS),
),
+ TEST_CASE_BREDRLE("HDP Unegister Application",
+ ACTION_SUCCESS(hdp_register_source_stream_app_action, NULL),
+ CALLBACK_HDP_APP_REG_STATE(CB_HDP_APP_REG_STATE, 1,
+ BTHL_APP_REG_STATE_REG_SUCCESS),
+ ACTION_SUCCESS(hdp_unregister_app_action, NULL),
+ CALLBACK_HDP_APP_REG_STATE(CB_HDP_APP_REG_STATE, 1,
+ BTHL_APP_REG_STATE_DEREG_SUCCESS),
+ ),
};
struct queue *get_hdp_tests(void)