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_H 8 #define TEST_RUNNER_PROVIDER_H 9 10 #include "components/rpc/common/endpoint/rpc_service_interface.h" 11 #include <service/common/provider/service_provider.h> 12 #include <service/test_runner/provider/serializer/test_runner_provider_serializer.h> 13 #include <protocols/rpc/common/packed-c/encoding.h> 14 #include "test_runner_backend.h" 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 /* test_runner_provider serice provider state */ 21 struct test_runner_provider 22 { 23 struct service_provider base_provider; 24 const struct test_runner_provider_serializer *serializers[TS_RPC_ENCODING_LIMIT]; 25 struct test_runner_backend *backend_list; 26 }; 27 28 struct rpc_service_interface *test_runner_provider_init(struct test_runner_provider *context); 29 30 void test_runner_provider_deinit(struct test_runner_provider *context); 31 32 void test_runner_provider_register_serializer(struct test_runner_provider *context, 33 unsigned int encoding, const struct test_runner_provider_serializer *serializer); 34 35 void test_runner_provider_register_backend(struct test_runner_provider *context, 36 struct test_runner_backend *backend); 37 38 #ifdef __cplusplus 39 } /* extern "C" */ 40 #endif 41 42 #endif /* CPPUTEST_TEST_RUNNER_PROVIDER_H */ 43