1 /*
2  * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef TEST_RUNNER_PROVIDER_SERIALIZER_H
8 #define TEST_RUNNER_PROVIDER_SERIALIZER_H
9 
10 #include "rpc/common/endpoint/rpc_service_interface.h"
11 #include <service/test_runner/common/test_runner.h>
12 
13 /* Provides a common interface for parameter serialization operations
14  * for the test_runner service provider.  Allows alternative serialization
15  * protocols to be used without hard-wiring a particular protocol
16  * into the service provider code.  A concrete serializer must
17  * implement this interface.
18  */
19 struct test_runner_provider_serializer {
20 
21 	/* Operation: run_tests */
22 	rpc_status_t (*deserialize_run_tests_req)(const struct rpc_buffer *req_buf,
23 		struct test_spec *test_spec);
24 
25 	rpc_status_t (*serialize_run_tests_resp)(struct rpc_buffer *resp_buf,
26 		const struct test_summary *summary,
27 		const struct test_result *results);
28 
29 	/* Operation: list_tests */
30 	rpc_status_t (*deserialize_list_tests_req)(const struct rpc_buffer *req_buf,
31 		struct test_spec *test_spec);
32 
33 	rpc_status_t (*serialize_list_tests_resp)(struct rpc_buffer *resp_buf,
34 		const struct test_summary *summary,
35 		const struct test_result *results);
36 };
37 
38 #endif /* TEST_RUNNER_PROVIDER_SERIALIZER_H */
39