MOS Source Code
Loading...
Searching...
No Matches
services.service.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2// !! AUTOGENERATED FILE !!
3// This file is generated by protoc-gen-mosrpc, do not edit.
4// Any changes made to this file will be lost.
5
6#pragma once
7
8#if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_SERVER__)
9#define __rpc_have_cpp_server__
10#endif
11
12#if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_CLIENT__)
13#define __rpc_have_cpp_client__
14#endif
15
16// don't expose this to the kernel
17#ifdef __rpc_have_cpp_server__
19#endif
20
21#ifdef __rpc_have_cpp_client__
22#include <librpc/rpc_client.h>
23#include <string> // HACK
24#endif
25
26#include "proto/services.pb.h"
27
28// Service ServiceManager has a custom C name: service_manager
29// service_manager service
30#define SERVICE_MANAGER_SERVICE_X(ARGS, PB, xarg) \
31 PB(xarg, 1, get_units, GET_UNITS, GetUnitsRequest, GetUnitsResponse) \
32 PB(xarg, 2, get_templates, GET_TEMPLATES, GetTemplatesRequest, GetTemplatesResponse) \
33 PB(xarg, 3, get_unit_overrides, GET_UNIT_OVERRIDES, GetUnitOverridesRequest, GetUnitOverridesResponse) \
34 PB(xarg, 4, start_unit, START_UNIT, StartUnitRequest, StartUnitResponse) \
35 PB(xarg, 5, stop_unit, STOP_UNIT, StopUnitRequest, StopUnitResponse) \
36 PB(xarg, 6, instantiate_unit, INSTANTIATE_UNIT, InstantiateUnitRequest, InstantiateUnitResponse) \
37 /**/
38
39// Service stubs and interfaces for C++ clients and servers
40#ifdef __rpc_have_cpp_client__
42#endif
43
44#ifdef __rpc_have_cpp_server__
46#endif
47
48#ifdef __MOS_RPC_SERVER__
49#define MOS_RPC_SERVICE_MANAGER_SERVER(name) RPC_DECLARE_SERVER(name, SERVICE_MANAGER_SERVICE_X)
50#endif
51
52#ifdef __MOS_RPC_CLIENT__
53#define MOS_RPC_SERVICE_MANAGER_CLIENT(name) RPC_DECLARE_CLIENT(name, SERVICE_MANAGER_SERVICE_X)
54#endif
55
56// Service UnitStateReceiver has a custom C name: unit_state_receiver
57// unit_state_receiver service
58#define UNIT_STATE_RECEIVER_SERVICE_X(ARGS, PB, xarg) \
59 PB(xarg, 1, notify, NOTIFY, UnitStateNotifyRequest, UnitStateNotifyResponse) \
60 /**/
61
62// Service stubs and interfaces for C++ clients and servers
63#ifdef __rpc_have_cpp_client__
65#endif
66
67#ifdef __rpc_have_cpp_server__
69#endif
70
71#ifdef __MOS_RPC_SERVER__
72#define MOS_RPC_UNIT_STATE_RECEIVER_SERVER(name) RPC_DECLARE_SERVER(name, UNIT_STATE_RECEIVER_SERVICE_X)
73#endif
74
75#ifdef __MOS_RPC_CLIENT__
76#define MOS_RPC_UNIT_STATE_RECEIVER_CLIENT(name) RPC_DECLARE_CLIENT(name, UNIT_STATE_RECEIVER_SERVICE_X)
77#endif
78
79#undef __rpc_have_cpp_server__
80#undef __rpc_have_cpp_client__
#define RPC_DECL_SERVER_INTERFACE_CLASS(classname, X_MACRO)
#define RPC_CLIENT_DEFINE_STUB_CLASS(_class_name, X_MACRO)
#define SERVICE_MANAGER_SERVICE_X(ARGS, PB, xarg)
#define UNIT_STATE_RECEIVER_SERVICE_X(ARGS, PB, xarg)