anope- supernets anope source code & configuration |
git clone git://git.acid.vegas/anope.git |
Log | Files | Refs | Archive | README |
xmlrpc.h (1182B)
1 /* 2 * 3 * (C) 2010-2022 Anope Team 4 * Contact us at team@anope.org 5 * 6 * Please read COPYING and README for further details. 7 */ 8 9 #include "httpd.h" 10 11 class XMLRPCRequest 12 { 13 std::map<Anope::string, Anope::string> replies; 14 15 public: 16 Anope::string name; 17 Anope::string id; 18 std::deque<Anope::string> data; 19 HTTPReply& r; 20 21 XMLRPCRequest(HTTPReply &_r) : r(_r) { } 22 inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); } 23 inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; } 24 }; 25 26 class XMLRPCServiceInterface; 27 28 class XMLRPCEvent 29 { 30 public: 31 virtual ~XMLRPCEvent() { } 32 virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0; 33 }; 34 35 class XMLRPCServiceInterface : public Service 36 { 37 public: 38 XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { } 39 40 virtual void Register(XMLRPCEvent *event) = 0; 41 42 virtual void Unregister(XMLRPCEvent *event) = 0; 43 44 virtual Anope::string Sanitize(const Anope::string &string) = 0; 45 46 virtual void Reply(XMLRPCRequest &request) = 0; 47 };