15 #ifndef PKG_RPC_DETAIL_JSON_RPC_IMPL_H_INCLUDED
16 #define PKG_RPC_DETAIL_JSON_RPC_IMPL_H_INCLUDED
22 template <
typename Stub,
typename Connector,
typename ConnectorInitializer>
24 const ConnectorInitializer& oInitializer)
25 : Connector(oInitializer), Stub(*static_cast<jsonrpc::IClientConnector*>(this))
29 template <
typename Stub,
typename Connector,
typename ConnectorInitializer>
32 return *
const_cast<Stub*
>(
static_cast<const Stub*
>(
this));
35 template <
typename Stub,
typename Interface,
typename Connector,
typename ConnectorInitializer>
42 template <
typename Stub,
typename Interface,
typename Connector,
typename ConnectorInitializer>
46 return *
const_cast<Stub*
>(
static_cast<const Stub*
>(
this));
49 template <
typename ServerStub,
typename Connector>
51 : ServerStub(*static_cast<jsonrpc::AbstractServerConnector*>(this))
55 template <
typename ServerStub,
typename Connector>
57 const char* strRequest,
size_t nRequestSize,
IResponse& oResponse)
60 std::string strRequestHelper(strRequest, nRequestSize);
61 if (!Connector::OnRequest(strRequestHelper, &oResponse)) {
A common result class usable as return value throughout.
Interface for returning a response to a remote call.
virtual a_util::result::Result HandleCall(const char *strRequest, size_t nRequestSize, IResponse &oResponse)
Handles an RPC call.
jsonrpc_object_server()
CTOR.
Stub & GetStub() const
Access the rpc stub.
jsonrpc_remote_interface(const ConnectorInitializer &oInitializer)
Constructor.
Template for direct usage of the stub methods.
Stub & GetStub() const
Access the rpc stub.
jsonrpc_remote_object(const ConnectorInitializer &oInitializer)
Constructor.
RPC Protocol declaration.