Anope IRC Services  Version 2.0
xmlrpc.h
Go to the documentation of this file.
1 #include "httpd.h"
2 
4 {
5  std::map<Anope::string, Anope::string> replies;
6 
7  public:
10  std::deque<Anope::string> data;
12 
13  XMLRPCRequest(HTTPReply &_r) : r(_r) { }
14  inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); }
15  inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
16 };
17 
19 
21 {
22  public:
23  virtual ~XMLRPCEvent() { }
24  virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
25 };
26 
28 {
29  public:
30  XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
31 
32  virtual void Register(XMLRPCEvent *event) = 0;
33 
34  virtual void Unregister(XMLRPCEvent *event) = 0;
35 
36  virtual Anope::string Sanitize(const Anope::string &string) = 0;
37 
38  virtual void Reply(XMLRPCRequest &request) = 0;
39 };
40 
const std::map< Anope::string, Anope::string > & get_replies()
Definition: xmlrpc.h:15
virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)=0
XMLRPCServiceInterface(Module *creator, const Anope::string &sname)
Definition: xmlrpc.h:30
void reply(const Anope::string &dname, const Anope::string &ddata)
Definition: xmlrpc.h:14
Anope::string name
Definition: xmlrpc.h:8
virtual Anope::string Sanitize(const Anope::string &string)=0
XMLRPCRequest(HTTPReply &_r)
Definition: xmlrpc.h:13
virtual void Reply(XMLRPCRequest &request)=0
Anope::string id
Definition: xmlrpc.h:9
virtual ~XMLRPCEvent()
Definition: xmlrpc.h:23
void Unregister()
Definition: service.h:108
HTTPReply & r
Definition: xmlrpc.h:11
void Register()
Definition: service.h:100
std::map< Anope::string, Anope::string > replies
Definition: xmlrpc.h:5
std::deque< Anope::string > data
Definition: xmlrpc.h:10