$search
A class to handle XML RPC requests from a particular client. More...
#include <XmlRpcServerConnection.h>
Public Member Functions | |
virtual unsigned | handleEvent (unsigned eventType) |
XmlRpcServerConnection (int fd, XmlRpcServer *server, bool deleteOnClose=false) | |
Constructor. | |
virtual | ~XmlRpcServerConnection () |
Destructor. | |
Static Public Attributes | |
static const std::string | FAULTCODE = "faultCode" |
static const std::string | FAULTSTRING = "faultString" |
static const std::string | METHODNAME = "methodName" |
static const char | METHODNAME_TAG [] = "<methodName>" |
static const char | PARAM_ETAG [] = "</param>" |
static const char | PARAM_TAG [] = "<param>" |
static const std::string | PARAMS = "params" |
static const char | PARAMS_ETAG [] = "</params>" |
static const char | PARAMS_TAG [] = "<params>" |
static const std::string | SYSTEM_MULTICALL = "system.multicall" |
Protected Types | |
enum | ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE } |
Protected Member Functions | |
bool | executeMethod (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
bool | executeMulticall (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
virtual void | executeRequest () |
void | generateFaultResponse (std::string const &msg, int errorCode=-1) |
std::string | generateHeader (std::string const &body) |
void | generateResponse (std::string const &resultXml) |
std::string | parseRequest (XmlRpcValue ¶ms) |
bool | readHeader () |
bool | readRequest () |
bool | writeResponse () |
Protected Attributes | |
int | _bytesWritten |
ServerConnectionState | _connectionState |
int | _contentLength |
std::string | _header |
bool | _keepAlive |
std::string | _request |
std::string | _response |
XmlRpcServer * | _server |
A class to handle XML RPC requests from a particular client.
Definition at line 26 of file XmlRpcServerConnection.h.
enum XmlRpc::XmlRpcServerConnection::ServerConnectionState [protected] |
Definition at line 80 of file XmlRpcServerConnection.h.
XmlRpcServerConnection::XmlRpcServerConnection | ( | int | fd, | |
XmlRpcServer * | server, | |||
bool | deleteOnClose = false | |||
) |
Constructor.
Definition at line 34 of file XmlRpcServerConnection.cpp.
XmlRpcServerConnection::~XmlRpcServerConnection | ( | ) | [virtual] |
Destructor.
Definition at line 44 of file XmlRpcServerConnection.cpp.
bool XmlRpcServerConnection::executeMethod | ( | const std::string & | methodName, | |
XmlRpcValue & | params, | |||
XmlRpcValue & | result | |||
) | [protected] |
Definition at line 257 of file XmlRpcServerConnection.cpp.
bool XmlRpcServerConnection::executeMulticall | ( | const std::string & | methodName, | |
XmlRpcValue & | params, | |||
XmlRpcValue & | result | |||
) | [protected] |
Definition at line 275 of file XmlRpcServerConnection.cpp.
void XmlRpcServerConnection::executeRequest | ( | ) | [protected, virtual] |
Definition at line 211 of file XmlRpcServerConnection.cpp.
void XmlRpcServerConnection::generateFaultResponse | ( | std::string const & | msg, | |
int | errorCode = -1 | |||
) | [protected] |
Definition at line 363 of file XmlRpcServerConnection.cpp.
std::string XmlRpcServerConnection::generateHeader | ( | std::string const & | body | ) | [protected] |
Definition at line 341 of file XmlRpcServerConnection.cpp.
void XmlRpcServerConnection::generateResponse | ( | std::string const & | resultXml | ) | [protected] |
Definition at line 324 of file XmlRpcServerConnection.cpp.
unsigned XmlRpcServerConnection::handleEvent | ( | unsigned | eventType | ) | [virtual] |
Handle IO on the client connection socket.
eventType | Type of IO event that occurred. |
Implements XmlRpc::XmlRpcSource.
Definition at line 55 of file XmlRpcServerConnection.cpp.
std::string XmlRpcServerConnection::parseRequest | ( | XmlRpcValue & | params | ) | [protected] |
Definition at line 235 of file XmlRpcServerConnection.cpp.
bool XmlRpcServerConnection::readHeader | ( | ) | [protected] |
Definition at line 72 of file XmlRpcServerConnection.cpp.
bool XmlRpcServerConnection::readRequest | ( | ) | [protected] |
Definition at line 149 of file XmlRpcServerConnection.cpp.
bool XmlRpcServerConnection::writeResponse | ( | ) | [protected] |
Definition at line 180 of file XmlRpcServerConnection.cpp.
int XmlRpc::XmlRpcServerConnection::_bytesWritten [protected] |
Definition at line 96 of file XmlRpcServerConnection.h.
Definition at line 81 of file XmlRpcServerConnection.h.
int XmlRpc::XmlRpcServerConnection::_contentLength [protected] |
Definition at line 87 of file XmlRpcServerConnection.h.
std::string XmlRpc::XmlRpcServerConnection::_header [protected] |
Definition at line 84 of file XmlRpcServerConnection.h.
bool XmlRpc::XmlRpcServerConnection::_keepAlive [protected] |
Definition at line 99 of file XmlRpcServerConnection.h.
std::string XmlRpc::XmlRpcServerConnection::_request [protected] |
Definition at line 90 of file XmlRpcServerConnection.h.
std::string XmlRpc::XmlRpcServerConnection::_response [protected] |
Definition at line 93 of file XmlRpcServerConnection.h.
XmlRpcServer* XmlRpc::XmlRpcServerConnection::_server [protected] |
Definition at line 77 of file XmlRpcServerConnection.h.
const std::string XmlRpcServerConnection::FAULTCODE = "faultCode" [static] |
Definition at line 39 of file XmlRpcServerConnection.h.
const std::string XmlRpcServerConnection::FAULTSTRING = "faultString" [static] |
Definition at line 40 of file XmlRpcServerConnection.h.
const std::string XmlRpcServerConnection::METHODNAME = "methodName" [static] |
Definition at line 36 of file XmlRpcServerConnection.h.
const char XmlRpcServerConnection::METHODNAME_TAG = "<methodName>" [static] |
Definition at line 29 of file XmlRpcServerConnection.h.
const char XmlRpcServerConnection::PARAM_ETAG = "</param>" [static] |
Definition at line 33 of file XmlRpcServerConnection.h.
const char XmlRpcServerConnection::PARAM_TAG = "<param>" [static] |
Definition at line 32 of file XmlRpcServerConnection.h.
const std::string XmlRpcServerConnection::PARAMS = "params" [static] |
Definition at line 37 of file XmlRpcServerConnection.h.
const char XmlRpcServerConnection::PARAMS_ETAG = "</params>" [static] |
Definition at line 31 of file XmlRpcServerConnection.h.
const char XmlRpcServerConnection::PARAMS_TAG = "<params>" [static] |
Definition at line 30 of file XmlRpcServerConnection.h.
const std::string XmlRpcServerConnection::SYSTEM_MULTICALL = "system.multicall" [static] |
Definition at line 35 of file XmlRpcServerConnection.h.