Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
XmlRpc::XmlRpcServerConnection Class Reference

A class to handle XML RPC requests from a particular client. More...

#include <XmlRpcServerConnection.h>

Inheritance diagram for XmlRpc::XmlRpcServerConnection:
Inheritance graph
[legend]

List of all members.

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 &params, XmlRpcValue &result)
bool executeMulticall (const std::string &methodName, XmlRpcValue &params, 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 &params)
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

Detailed Description

A class to handle XML RPC requests from a particular client.

Definition at line 26 of file XmlRpcServerConnection.h.


Member Enumeration Documentation

Enumerator:
READ_HEADER 
READ_REQUEST 
WRITE_RESPONSE 

Definition at line 80 of file XmlRpcServerConnection.h.


Constructor & Destructor Documentation

XmlRpcServerConnection::XmlRpcServerConnection ( int  fd,
XmlRpcServer server,
bool  deleteOnClose = false 
)

Constructor.

Definition at line 34 of file XmlRpcServerConnection.cpp.

Destructor.

Definition at line 44 of file XmlRpcServerConnection.cpp.


Member Function Documentation

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.

Parameters:
eventTypeType of IO event that occurred.
See also:
XmlRpcDispatch::EventType.

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.

Definition at line 149 of file XmlRpcServerConnection.cpp.

Definition at line 180 of file XmlRpcServerConnection.cpp.


Member Data Documentation

Definition at line 96 of file XmlRpcServerConnection.h.

Definition at line 81 of file XmlRpcServerConnection.h.

Definition at line 87 of file XmlRpcServerConnection.h.

std::string XmlRpc::XmlRpcServerConnection::_header [protected]

Definition at line 84 of file XmlRpcServerConnection.h.

Definition at line 99 of file XmlRpcServerConnection.h.

Definition at line 90 of file XmlRpcServerConnection.h.

Definition at line 93 of file XmlRpcServerConnection.h.

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.


The documentation for this class was generated from the following files:


xmlrpcpp
Author(s): Chris Morley and Konstantin Pilipchuk, slight modifications and ROS wrapping by Morgan Quigley
autogenerated on Sat Dec 28 2013 17:42:59