/************************************************************************** libjson-rpc-cpp************************************************************************** @file testserver.h* @date 08.03.2013* @author Peter Spiess-Knafl <dev@spiessknafl.at>* @license See attached LICENSE.txt************************************************************************/#ifndef JSONRPC_CPP_SERVER_H#define JSONRPC_CPP_SERVER_H#include <jsonrpccpp/client.h>#include <jsonrpccpp/server.h>// Methodsnamespace jsonrpc {class TestServer : public jsonrpc::AbstractServer<TestServer> {public:TestServer(jsonrpc::AbstractServerConnector &connector, jsonrpc::serverVersion_t type = jsonrpc::JSONRPC_SERVER_V2);void sayHello(const Json::Value &request, Json::Value &response);void getCounterValue(const Json::Value &request, Json::Value &response);void add(const Json::Value &request, Json::Value &response);void sub(const Json::Value &request, Json::Value &response);void exceptionMethod(const Json::Value &request, Json::Value &response);// Notificationsvoid initCounter(const Json::Value &request);void incrementCounter(const Json::Value &request);void initZero(const Json::Value &request);int getCnt();virtual bool bindAndAddMethod(const Procedure &proc, methodPointer_t pointer);virtual bool bindAndAddNotification(const Procedure &proc, notificationPointer_t pointer);private:int cnt;};} // namespace jsonrpc#endif // JSONRPC_CPP_SERVER_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。