5#ifndef MP_PROXY_TYPE_INTERFACE_H
6#define MP_PROXY_TYPE_INTERFACE_H
11template <
typename Interface,
typename Impl>
14 return kj::heap<ProxyServer<Interface>>(std::move(impl), context.
connection);
17template <
typename Interface,
typename Impl>
23template <
typename Impl,
typename Value,
typename Output>
29 typename Decay<
decltype(output.get())>::Calls* enable =
nullptr)
32 using Interface =
typename decltype(output.get())::Calls;
37template <
typename Impl,
typename Value,
typename Output>
43 typename Decay<
decltype(output.get())>::Calls* enable =
nullptr)
46 using Interface =
typename decltype(output.get())::Calls;
51template <
typename Impl,
typename Output>
57 typename decltype(output.get())::Calls* enable =
nullptr)
62 using Interface =
typename decltype(output.get())::Calls;
66template <
typename Interface,
typename Impl>
69 return std::make_unique<ProxyClient<Interface>>(
70 std::move(client), &context.
connection,
false);
73template <
typename Interface,
typename Impl>
79template <
typename LocalType,
typename Input,
typename ReadDest>
85 typename Decay<
decltype(input.get())>::Calls* enable =
nullptr)
87 using Interface =
typename Decay<
decltype(input.get())>::Calls;
89 return read_dest.construct(
92 return read_dest.construct();
95template <
typename LocalType,
typename Input,
typename ReadDest>
100 ReadDest&& read_dest,
101 typename Decay<
decltype(input.get())>::Calls* enable =
nullptr)
103 using Interface =
typename Decay<
decltype(input.get())>::Calls;
105 return read_dest.construct(
108 return read_dest.construct();
Functions to serialize / deserialize common bitcoin types.
std::unique_ptr< Impl > CustomMakeProxyClient(InvokeContext &context, typename Interface::Client &&client)
kj::Own< typename Interface::Server > MakeProxyServer(InvokeContext &context, std::shared_ptr< Impl > impl)
bool CustomHasField(TypeList< LocalTypes... >, InvokeContext &invoke_context, const Input &input)
std::decay_t< T > Decay
Type helper abbreviating std::decay.
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
kj::Own< typename Interface::Server > CustomMakeProxyServer(InvokeContext &context, std::shared_ptr< Impl > &&impl)
std::unique_ptr< Impl > MakeProxyClient(InvokeContext &context, typename Interface::Client &&client)
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Generic utility functions used by capnp code.