Branch data Line data Source code
1 : : // Generated by mpgen from /tmp/cirrus-ci-build/bitcoin-core/src/ipc/capnp/init.capnp
2 : :
3 : : #ifndef CAPNP_INIT_CAPNP_PROXY_H
4 : : #define CAPNP_INIT_CAPNP_PROXY_H
5 : :
6 : : #include <capnp/init.capnp.h> // IWYU pragma: keep
7 : : #include "interfaces/echo.h" // IWYU pragma: export
8 : : #include "interfaces/init.h" // IWYU pragma: export
9 : : #include "interfaces/mining.h" // IWYU pragma: export
10 : : #include <mp/proxy.h>
11 : :
12 : : #if defined(__GNUC__)
13 : : #pragma GCC diagnostic push
14 : : #if !defined(__has_warning)
15 : : #pragma GCC diagnostic ignored "-Wsuggest-override"
16 : : #elif __has_warning("-Wsuggest-override")
17 : : #pragma GCC diagnostic ignored "-Wsuggest-override"
18 : : #endif
19 : : #endif
20 : : namespace mp {
21 : : template<>
22 : : struct ProxyMethod<ipc::capnp::messages::Init::MakeEchoParams>
23 : : {
24 : : static constexpr auto impl = &interfaces::Init::makeEcho;
25 : : };
26 : :
27 : : template<>
28 : : struct ProxyMethod<ipc::capnp::messages::Init::MakeMiningOld2Params>
29 : : {
30 : : static constexpr auto impl = &interfaces::Init::makeMiningOld2;
31 : : };
32 : :
33 : : template<>
34 : : struct ProxyMethod<ipc::capnp::messages::Init::MakeMiningParams>
35 : : {
36 : : static constexpr auto impl = &interfaces::Init::makeMining;
37 : : };
38 : :
39 : : namespace init_fields {
40 : : struct ThreadMap
41 : : {
42 : 12 : template<typename S> static auto get(S&& s) -> decltype(s.getThreadMap()) { return s.getThreadMap(); }
43 : : template<typename S> static bool has(S&& s) { return s.hasThreadMap(); }
44 [ + - ]: 24 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setThreadMap(std::forward<A>(a)); }
45 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initThreadMap(std::forward<A>(a)...); }
46 : : template<typename S> static bool getWant(S&& s) { return s.getWantThreadMap(); }
47 : : template<typename S> static void setWant(S&& s) { s.setWantThreadMap(true); }
48 : : template<typename S> static bool getHas(S&& s) { return s.getHasThreadMap(); }
49 : : template<typename S> static void setHas(S&& s) { s.setHasThreadMap(true); }
50 : : };
51 : : struct Context
52 : : {
53 : 12 : template<typename S> static auto get(S&& s) -> decltype(s.getContext()) { return s.getContext(); }
54 : : template<typename S> static bool has(S&& s) { return s.hasContext(); }
55 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setContext(std::forward<A>(a)); }
56 : 6 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initContext(std::forward<A>(a)...); }
57 : : template<typename S> static bool getWant(S&& s) { return s.getWantContext(); }
58 : : template<typename S> static void setWant(S&& s) { s.setWantContext(true); }
59 : : template<typename S> static bool getHas(S&& s) { return s.getHasContext(); }
60 : : template<typename S> static void setHas(S&& s) { s.setHasContext(true); }
61 : : };
62 : : struct Result
63 : : {
64 : 6 : template<typename S> static auto get(S&& s) -> decltype(s.getResult()) { return s.getResult(); }
65 : 6 : template<typename S> static bool has(S&& s) { return s.hasResult(); }
66 [ + - ]: 12 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setResult(std::forward<A>(a)); }
67 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initResult(std::forward<A>(a)...); }
68 : : template<typename S> static bool getWant(S&& s) { return s.getWantResult(); }
69 : : template<typename S> static void setWant(S&& s) { s.setWantResult(true); }
70 : : template<typename S> static bool getHas(S&& s) { return s.getHasResult(); }
71 : : template<typename S> static void setHas(S&& s) { s.setHasResult(true); }
72 : : };
73 : : } // namespace init_fields
74 : :
75 : : template<>
76 : : struct ProxyClient<ipc::capnp::messages::Init> final : public ProxyClientCustom<ipc::capnp::messages::Init, interfaces::Init>
77 : : {
78 : : public:
79 [ + - + - ]: 6 : using ProxyClientCustom::ProxyClientCustom;
80 : : ~ProxyClient();
81 : : using M0 = ProxyClientMethodTraits<ipc::capnp::messages::Init::ConstructParams>;
82 : : static typename M0::Result construct(Super& super);
83 : : using M1 = ProxyClientMethodTraits<ipc::capnp::messages::Init::MakeEchoParams>;
84 : : typename M1::Result makeEcho();
85 : : using M2 = ProxyClientMethodTraits<ipc::capnp::messages::Init::MakeMiningOld2Params>;
86 : : typename M2::Result makeMiningOld2();
87 : : using M3 = ProxyClientMethodTraits<ipc::capnp::messages::Init::MakeMiningParams>;
88 : : typename M3::Result makeMining();
89 : : };
90 : :
91 : : template<>
92 : : struct ProxyServer<ipc::capnp::messages::Init> : public ProxyServerCustom<ipc::capnp::messages::Init, interfaces::Init>
93 : : {
94 : : public:
95 : : using ProxyServerCustom::ProxyServerCustom;
96 : : ~ProxyServer();
97 : : kj::Promise<void> construct(ConstructContext call_context) override;
98 : : kj::Promise<void> makeEcho(MakeEchoContext call_context) override;
99 : : kj::Promise<void> makeMiningOld2(MakeMiningOld2Context call_context) override;
100 : : kj::Promise<void> makeMining(MakeMiningContext call_context) override;
101 : : };
102 : :
103 : : template<>
104 : : struct ProxyType<interfaces::Init>
105 : : {
106 : : using Type = interfaces::Init;
107 : : using Message = ipc::capnp::messages::Init;
108 : : using Client = ProxyClient<Message>;
109 : : using Server = ProxyServer<Message>;
110 : : };
111 : : } // namespace mp
112 : : #if defined(__GNUC__)
113 : : #pragma GCC diagnostic pop
114 : : #endif
115 : : #endif
|