6 #ifndef _XMLRPCSERVER_H_
7 #define _XMLRPCSERVER_H_
12 # pragma warning(disable:4786) // identifier was truncated in debug info
20 #include "xmlrpcpp/XmlRpcDispatch.h"
21 #include "xmlrpcpp/XmlRpcSource.h"
22 #include "xmlrpcpp/XmlRpcDecl.h"
28 class XmlRpcServerMethod;
31 class XmlRpcServerConnection;
43 virtual ~XmlRpcServer();
46 void enableIntrospection(
bool enabled=
true);
49 void addMethod(XmlRpcServerMethod* method);
52 void removeMethod(XmlRpcServerMethod* method);
55 void removeMethod(
const std::string& methodName);
58 XmlRpcServerMethod* findMethod(
const std::string&
name)
const;
62 bool bindAndListen(
int port,
int backlog = 5);
65 void work(
double msTime);
74 void listMethods(XmlRpcValue& result);
79 virtual unsigned handleEvent(
unsigned eventType);
82 virtual void removeConnection(XmlRpcServerConnection*);
84 inline int get_port() {
return _port; }
86 XmlRpcDispatch *get_dispatch() {
return &_disp; }
91 virtual void acceptConnection();
94 virtual XmlRpcServerConnection* createConnection(
int socket);
97 bool _introspectionEnabled;
100 XmlRpcDispatch _disp;
103 typedef std::map< std::string, XmlRpcServerMethod* > MethodMap;
107 XmlRpcServerMethod* _listMethods;
108 XmlRpcServerMethod* _methodHelp;
115 #endif //_XMLRPCSERVER_H_