Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
XmlRpc::XmlRpcServer Class Reference

A class to handle XML RPC requests. More...

#include <XmlRpcServer.h>

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

Public Member Functions

void addMethod (XmlRpcServerMethod *method)
 Add a command to the RPC server. More...
 
bool bindAndListen (int port, int backlog=5)
 
void enableIntrospection (bool enabled=true)
 Specify whether introspection is enabled or not. Default is not enabled. More...
 
void exit ()
 Temporarily stop processing client requests and exit the work() method. More...
 
XmlRpcServerMethodfindMethod (const std::string &name) const
 Look up a method by name. More...
 
XmlRpcDispatchget_dispatch ()
 
int get_port ()
 
virtual unsigned handleEvent (unsigned eventType)
 Handle client connection requests. More...
 
void listMethods (XmlRpcValue &result)
 Introspection support. More...
 
virtual void removeConnection (XmlRpcServerConnection *)
 Remove a connection from the dispatcher. More...
 
void removeMethod (XmlRpcServerMethod *method)
 Remove a command from the RPC server. More...
 
void removeMethod (const std::string &methodName)
 Remove a command from the RPC server by name. More...
 
void shutdown ()
 Close all connections with clients and the socket file descriptor. More...
 
void work (double msTime)
 Process client requests for the specified time. More...
 
 XmlRpcServer ()
 Create a server object. More...
 
virtual ~XmlRpcServer ()
 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...
 

Protected Types

typedef std::map< std::string, XmlRpcServerMethod * > MethodMap
 

Protected Member Functions

virtual void acceptConnection ()
 Accept a client connection request. More...
 
virtual XmlRpcServerConnectioncreateConnection (int socket)
 Create a new connection object for processing requests from a specific client. More...
 

Protected Attributes

XmlRpcDispatch _disp
 
bool _introspectionEnabled
 
XmlRpcServerMethod_listMethods
 
XmlRpcServerMethod_methodHelp
 
MethodMap _methods
 
int _port
 

Detailed Description

A class to handle XML RPC requests.

Definition at line 37 of file XmlRpcServer.h.

Member Typedef Documentation

typedef std::map< std::string, XmlRpcServerMethod* > XmlRpc::XmlRpcServer::MethodMap
protected

Definition at line 102 of file XmlRpcServer.h.

Constructor & Destructor Documentation

XmlRpcServer::XmlRpcServer ( )

Create a server object.

Definition at line 16 of file XmlRpcServer.cpp.

XmlRpcServer::~XmlRpcServer ( )
virtual

Destructor.

Definition at line 25 of file XmlRpcServer.cpp.

Member Function Documentation

void XmlRpcServer::acceptConnection ( )
protectedvirtual

Accept a client connection request.

Definition at line 151 of file XmlRpcServer.cpp.

void XmlRpcServer::addMethod ( XmlRpcServerMethod method)

Add a command to the RPC server.

Definition at line 36 of file XmlRpcServer.cpp.

bool XmlRpcServer::bindAndListen ( int  port,
int  backlog = 5 
)

Create a socket, bind to the specified port, and set it in listen mode to make it available for clients.

Definition at line 74 of file XmlRpcServer.cpp.

XmlRpcServerConnection * XmlRpcServer::createConnection ( int  socket)
protectedvirtual

Create a new connection object for processing requests from a specific client.

Definition at line 175 of file XmlRpcServer.cpp.

void XmlRpcServer::enableIntrospection ( bool  enabled = true)

Specify whether introspection is enabled or not. Default is not enabled.

Definition at line 251 of file XmlRpcServer.cpp.

void XmlRpcServer::exit ( )

Temporarily stop processing client requests and exit the work() method.

Definition at line 191 of file XmlRpcServer.cpp.

XmlRpcServerMethod * XmlRpcServer::findMethod ( const std::string &  name) const

Look up a method by name.

Definition at line 62 of file XmlRpcServer.cpp.

XmlRpcDispatch* XmlRpc::XmlRpcServer::get_dispatch ( )
inline

Definition at line 85 of file XmlRpcServer.h.

int XmlRpc::XmlRpcServer::get_port ( )
inline

Definition at line 83 of file XmlRpcServer.h.

unsigned XmlRpcServer::handleEvent ( unsigned  eventType)
virtual

Handle client connection requests.

Implements XmlRpc::XmlRpcSource.

Definition at line 141 of file XmlRpcServer.cpp.

void XmlRpcServer::listMethods ( XmlRpcValue result)

Introspection support.

Definition at line 278 of file XmlRpcServer.cpp.

void XmlRpcServer::removeConnection ( XmlRpcServerConnection sc)
virtual

Remove a connection from the dispatcher.

Definition at line 183 of file XmlRpcServer.cpp.

void XmlRpcServer::removeMethod ( XmlRpcServerMethod method)

Remove a command from the RPC server.

Definition at line 43 of file XmlRpcServer.cpp.

void XmlRpcServer::removeMethod ( const std::string &  methodName)

Remove a command from the RPC server by name.

Definition at line 52 of file XmlRpcServer.cpp.

void XmlRpcServer::shutdown ( )

Close all connections with clients and the socket file descriptor.

Definition at line 199 of file XmlRpcServer.cpp.

void XmlRpcServer::work ( double  msTime)

Process client requests for the specified time.

Definition at line 130 of file XmlRpcServer.cpp.

Member Data Documentation

XmlRpcDispatch XmlRpc::XmlRpcServer::_disp
protected

Definition at line 99 of file XmlRpcServer.h.

bool XmlRpc::XmlRpcServer::_introspectionEnabled
protected

Definition at line 96 of file XmlRpcServer.h.

XmlRpcServerMethod* XmlRpc::XmlRpcServer::_listMethods
protected

Definition at line 106 of file XmlRpcServer.h.

XmlRpcServerMethod* XmlRpc::XmlRpcServer::_methodHelp
protected

Definition at line 107 of file XmlRpcServer.h.

MethodMap XmlRpc::XmlRpcServer::_methods
protected

Definition at line 103 of file XmlRpcServer.h.

int XmlRpc::XmlRpcServer::_port
protected

Definition at line 109 of file XmlRpcServer.h.


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


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley
autogenerated on Sun Aug 26 2018 03:03:28