[PATCH BlueZ 30/35] unit/test-avrcp: Add /TP/MCN/SRC/BV-02-C test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

To verify the Search response issued by the TG.
---
 unit/test-avrcp.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 9da8761..0450d37 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -606,6 +606,16 @@ static int play_item(struct avrcp *session, uint8_t transaction, uint8_t scope,
 	return -EAGAIN;
 }
 
+static int search(struct avrcp *session, uint8_t transaction,
+					const char *string, void *user_data)
+{
+	DBG("");
+
+	avrcp_search_rsp(session, transaction, 0xaabb, 0);
+
+	return -EAGAIN;
+}
+
 static const struct avrcp_control_ind control_ind = {
 	.get_capabilities = get_capabilities,
 	.list_attributes = list_attributes,
@@ -622,6 +632,7 @@ static const struct avrcp_control_ind control_ind = {
 	.change_path = change_path,
 	.get_item_attributes = get_item_attributes,
 	.play_item = play_item,
+	.search = search,
 };
 
 static void test_server(gconstpointer data)
@@ -911,6 +922,16 @@ int main(int argc, char *argv[])
 				0x00, 0x07,
 				0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79));
 
+	define_test("/TP/MCN/SRC/BV-02-C", test_server,
+			brs_pdu(0x00, 0x11, 0x0e, AVRCP_SEARCH,
+				0x00, 0x0b, 0x00, 0x6a,
+				0x00, 0x07,
+				0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79),
+			brs_pdu(0x02, 0x11, 0x0e, AVRCP_SEARCH,
+				0x00, 0x07, 0x04,
+				0xaa, 0xbb,		/* counter */
+				0x00, 0x00, 0x00, 0x00));
+
 	/* GetFolderItems - CT */
 	define_test("/TP/MCN/SRC/BV-03-C", test_client,
 			raw_pdu(0x00, 0x11, 0x0e, AVRCP_GET_FOLDER_ITEMS,
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux