diff options
author | Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com> | 2014-10-29 14:13:32 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-29 14:40:00 +0200 |
commit | c7e65ffa0ea37b1557fa3098e2c17e77cdb4723f (patch) | |
tree | ef9682c66196eb55631c82fe239a109eef6cc2ac /android/tester-main.c | |
parent | 3676ae7b92b0fe8231027d9e63f043a29a6d2f26 (diff) | |
download | bluez-c7e65ffa0ea37b1557fa3098e2c17e77cdb4723f.tar.gz |
android/tester: Add AVRCP GetElementAttributes test case
Diffstat (limited to 'android/tester-main.c')
-rw-r--r-- | android/tester-main.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/android/tester-main.c b/android/tester-main.c index a416914a1..515c69ead 100644 --- a/android/tester-main.c +++ b/android/tester-main.c @@ -700,6 +700,22 @@ static bool match_data(struct step *step) return false; } + if (exp->callback_result.num_of_attrs != + step->callback_result.num_of_attrs) { + tester_debug("Callback rc num of attrs mismatch"); + return false; + } + + if (exp->callback_result.attrs) { + if (memcmp(step->callback_result.attrs, + exp->callback_result.attrs, + exp->callback_result.num_of_attrs * + sizeof(btrc_element_attr_val_t))) { + tester_debug("Callback rc element attributes doesn't match"); + return false; + } + } + if (exp->callback_result.pairing_variant != step->callback_result.pairing_variant) { tester_debug("Callback pairing result mismatch: %d vs %d", @@ -1947,10 +1963,20 @@ static void avrcp_register_notification_cb(btrc_event_id_t event_id, schedule_callback_verification(step); } +static void avrcp_get_element_attr_cb(uint8_t num_attr, + btrc_media_attr_t *p_attrs) +{ + struct step *step = g_new0(struct step, 1); + + step->callback = CB_AVRCP_GET_ATTR_REQ; + schedule_callback_verification(step); +} + static btrc_callbacks_t btavrcp_callbacks = { .size = sizeof(btavrcp_callbacks), .get_play_status_cb = avrcp_get_play_status_cb, .register_notification_cb = avrcp_register_notification_cb, + .get_element_attr_cb = avrcp_get_element_attr_cb, }; static const btgatt_client_callbacks_t btgatt_client_callbacks = { |