1 /*
2  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef STANDALONE_FWU_SERVICE_CONTEXT_H
8 #define STANDALONE_FWU_SERVICE_CONTEXT_H
9 
10 #include "service/locator/standalone/standalone_service_context.h"
11 
12 class fwu_service_context : public standalone_service_context {
13 public:
14 	explicit fwu_service_context(const char *sn);
15 	virtual ~fwu_service_context();
16 
17 	static void set_provider(struct rpc_service_interface *iface);
18 
19 private:
20 	void do_init();
21 	void do_deinit();
22 
23 	static struct rpc_service_interface *m_provider_iface;
24 };
25 
26 /*
27  * Export function to set the service provider
28  */
29 #ifdef EXPORT_PUBLIC_INTERFACE_FWU_SERVICE_CONTEXT
30 #define FWU_SERVICE_CONTEXT_EXPORTED __attribute__((__visibility__("default")))
31 #else
32 #define FWU_SERVICE_CONTEXT_EXPORTED
33 #endif
34 
35 FWU_SERVICE_CONTEXT_EXPORTED void fwu_service_context_set_provider(struct rpc_service_interface *iface);
36 
37 #endif /* STANDALONE_FWU_SERVICE_CONTEXT_H */
38