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. More... | |
virtual | ~XmlRpcServerConnection () |
Destructor. More... | |
Public Member Functions inherited from XmlRpc::XmlRpcSource | |
virtual void | close () |
Close the owned fd. If deleteOnClose was specified at construction, the object is deleted. More... | |
int | getfd () const |
Return the file descriptor being monitored. More... | |
bool | getKeepOpen () const |
Return whether the file descriptor should be kept open if it is no longer monitored. More... | |
void | setfd (int fd) |
Specify the file descriptor to monitor. More... | |
void | setKeepOpen (bool b=true) |
Specify whether the file descriptor should be kept open if it is no longer monitored. More... | |
XmlRpcSource (int fd=-1, bool deleteOnClose=false) | |
virtual | ~XmlRpcSource () |
Destructor. More... | |
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.
|
protected |
Enumerator | |
---|---|
READ_HEADER | |
READ_REQUEST | |
WRITE_RESPONSE |
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.
|
virtual |
Destructor.
Definition at line 46 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 269 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 287 of file XmlRpcServerConnection.cpp.
|
protectedvirtual |
Definition at line 223 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 383 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 361 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 336 of file XmlRpcServerConnection.cpp.
|
virtual |
Handle IO on the client connection socket.
eventType | Type of IO event that occurred. |
Implements XmlRpc::XmlRpcSource.
Definition at line 57 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 247 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 74 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 154 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 192 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 96 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 81 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 87 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 84 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 99 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 90 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 93 of file XmlRpcServerConnection.h.
|
protected |
Definition at line 77 of file XmlRpcServerConnection.h.
|
static |
Definition at line 39 of file XmlRpcServerConnection.h.
|
static |
Definition at line 40 of file XmlRpcServerConnection.h.
|
static |
Definition at line 36 of file XmlRpcServerConnection.h.
|
static |
Definition at line 29 of file XmlRpcServerConnection.h.
|
static |
Definition at line 33 of file XmlRpcServerConnection.h.
|
static |
Definition at line 32 of file XmlRpcServerConnection.h.
|
static |
Definition at line 37 of file XmlRpcServerConnection.h.
|
static |
Definition at line 31 of file XmlRpcServerConnection.h.
|
static |
Definition at line 30 of file XmlRpcServerConnection.h.
|
static |
Definition at line 35 of file XmlRpcServerConnection.h.