/usr/include/jsonrpccpp/server/abstractserverconnector.h is in libjsonrpccpp-dev 0.6.0-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | /*************************************************************************
* libjson-rpc-cpp
*************************************************************************
* @file abstractserverconnector.h
* @date 31.12.2012
* @author Peter Spiess-Knafl <peter.knafl@gmail.com>
* @license See attached LICENSE.txt
************************************************************************/
#ifndef JSONRPC_CPP_SERVERCONNECTOR_H_
#define JSONRPC_CPP_SERVERCONNECTOR_H_
#include <string>
#include "iclientconnectionhandler.h"
namespace jsonrpc
{
class AbstractServerConnector
{
public:
AbstractServerConnector();
virtual ~AbstractServerConnector();
/**
* This method should signal the Connector to start waiting for requests, in any way that is appropriate for the derived connector class.
* If something went wrong, this method should return false, otherwise true.
*/
virtual bool StartListening() = 0;
/**
* This method should signal the Connector to stop waiting for requests, in any way that is appropriate for the derived connector class.
* If something went wrong, this method should return false, otherwise true.
*/
virtual bool StopListening() = 0;
/**
* This method should send a response to the client in any way that is appropriate for the derived connector class.
* @param response - the response that should be send to the client
* @param addInfo - additional Info, that the Connector might need for responding.
* @return returns true on success, false otherwise
*/
bool virtual SendResponse(const std::string& response, void* addInfo = NULL) = 0;
/**
* This method must be called, when a request is recognised. It will do everything else for you (including sending the response).
* @param request - the request that has been recognised.
* @param addInfo - additional Info, that the Connector might need for responding.
*/
bool OnRequest(const std::string& request, void* addInfo = NULL);
void SetHandler(IClientConnectionHandler* handler);
IClientConnectionHandler* GetHandler();
private:
IClientConnectionHandler *handler;
};
} /* namespace jsonrpc */
#endif /* JSONRPC_CPP_ERVERCONNECTOR_H_ */
|