Diff between b6b6ab1e511a7cb04004099bd149fb9823cf1493 and 26d58e7767291469ab8bee4ba4a7624f9c48687e

Changed Files

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

Full Patch

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index e9fe7e3..9bd27da 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -249,10 +249,23 @@ static void execute_context(struct context *context)
 	destroy_context(context);
 }
 
+static bool handle_play(struct avrcp *session)
+{
+	return true;
+}
+
+static const struct avrcp_passthrough_handler passthrough_handlers[] = {
+		{ AVC_PLAY, handle_play },
+		{ },
+};
+
 static void test_server(gconstpointer data)
 {
 	struct context *context = create_context(0x0100, data);
 
+	avrcp_set_passthrough_handlers(context->session, passthrough_handlers,
+								context);
+
 	g_idle_add(send_pdu, context);
 
 	execute_context(context);
@@ -291,5 +304,11 @@ int main(int argc, char *argv[])
 			raw_pdu(0x02, 0x11, 0x0e, 0x0c, 0xf8, 0x31,
 				0x07, 0x48, 0xff, 0xff, 0xff));
 
+	define_test("/TP/PTT/BV-01-I", test_server,
+			raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, 0x7c,
+				0x44, 0x00),
+			raw_pdu(0x02, 0x11, 0x0e, 0x09, 0x48, 0x7c,
+				0x44, 0x00));
+
 	return g_test_run();
 }