19 #ifndef INCLUDE_RCF_JSONRPC_HPP
20 #define INCLUDE_RCF_JSONRPC_HPP
22 #include <RCF/ByteBuffer.hpp>
26 #include <boost/cstdint.hpp>
28 #include "json_spirit_reader_template.h"
29 #include "json_spirit_writer_template.h"
33 class RCF_EXPORT JsonRpcRequest
36 JsonRpcRequest(ByteBuffer message);
37 bool isNotification()
const;
38 const std::string & getMethodName()
const;
39 const json_spirit::Array & getJsonParams()
const;
40 boost::uint64_t getRequestId()
const;
44 ByteBuffer mMessageBuffer;
46 json_spirit::Value mJsonRequest;
47 json_spirit::Array mJsonParams;
49 std::string mMethodName;
51 boost::uint64_t mRequestId;
54 class RCF_EXPORT JsonRpcResponse
58 JsonRpcResponse(boost::uint64_t requestId);
59 json_spirit::mObject & getJsonResponse();
63 json_spirit::mObject mJsonResponse;
69 #endif // ! INCLUDE_RCF_JSONRPC_HPP