Diff between 22eb6f6448f407bd0133b6ede112ab539bef88c4 and c63e06da658665d7603cb3a9a6546c46a6469b9b

Changed Files

File Additions Deletions Status
unit/test-avrcp.c +23 -0 modified

Full Patch

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 723d90d..ecaaeda 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -567,6 +567,17 @@ static int get_folder_items(struct avrcp *session, uint8_t transaction,
 	return -EAGAIN;
 }
 
+static int change_path(struct avrcp *session, uint8_t transaction,
+					uint16_t counter, uint8_t direction,
+					uint64_t uid, void *user_data)
+{
+	DBG("");
+
+	avrcp_change_path_rsp(session, transaction, 0);
+
+	return -EAGAIN;
+}
+
 static const struct avrcp_control_ind control_ind = {
 	.get_capabilities = get_capabilities,
 	.list_attributes = list_attributes,
@@ -580,6 +591,7 @@ static const struct avrcp_control_ind control_ind = {
 	.register_notification = register_notification,
 	.set_addressed = set_addressed,
 	.get_folder_items = get_folder_items,
+	.change_path = change_path,
 };
 
 static void test_server(gconstpointer data)
@@ -768,6 +780,17 @@ int main(int argc, char *argv[])
 				0x00, 0x00, 0x00, 0x00,
 				0x00, 0x00, 0x00, 0x01	/* Folder UID */));
 
+	/* ChangePath - TG */
+	define_test("/TP/MCN/CB/BV-05-C", test_server,
+			brs_pdu(0x00, 0x11, 0x0e, AVRCP_CHANGE_PATH,
+				0x00, 0x0b,
+				0xaa, 0xbb,		/* counter */
+				0x01,			/* direction */
+				0x00, 0x00, 0x00, 0x00,
+				0x00, 0x00, 0x00, 0x01	/* Folder UID */),
+			brs_pdu(0x02, 0x11, 0x0e, AVRCP_CHANGE_PATH,
+				0x00, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00));
+
 	/* GetItemAttributes - CT */
 	define_test("/TP/MCN/CB/BV-07-C", test_client,
 			raw_pdu(0x00, 0x11, 0x0e, AVRCP_GET_ITEM_ATTRIBUTES,