summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-02-13 01:28:28 +0000
committerSadie Powell <sadie@witchery.services>2025-02-13 01:45:20 +0000
commitf8c1b8f4f9bcb06242aa7d7360ea610764565c75 (patch)
tree84eed97fb3781ff3b8c0ecbbd8f304cc3e7997ff /include/modules
parenteaa00c7c9e38f7f5633544a767876f2f6d57185d (diff)
Rework the RPC modules in preparation for the new JSON-RPC module.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/rpc.h (renamed from include/modules/xmlrpc.h)22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/modules/xmlrpc.h b/include/modules/rpc.h
index 833792888..b3c8afdb4 100644
--- a/include/modules/xmlrpc.h
+++ b/include/modules/rpc.h
@@ -10,7 +10,7 @@
#include "httpd.h"
-class XMLRPCRequest final
+class RPCRequest final
{
std::map<Anope::string, Anope::string> replies;
@@ -20,31 +20,31 @@ public:
std::deque<Anope::string> data;
HTTPReply &r;
- XMLRPCRequest(HTTPReply &_r) : r(_r) { }
+ RPCRequest(HTTPReply &_r) : r(_r) { }
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); }
inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
};
-class XMLRPCServiceInterface;
+class RPCServiceInterface;
-class XMLRPCEvent
+class RPCEvent
{
public:
- virtual ~XMLRPCEvent() = default;
- virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
+ virtual ~RPCEvent() = default;
+ virtual bool Run(RPCServiceInterface *iface, HTTPClient *client, RPCRequest &request) = 0;
};
-class XMLRPCServiceInterface
+class RPCServiceInterface
: public Service
{
public:
- XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
+ RPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "RPCServiceInterface", sname) { }
- virtual void Register(XMLRPCEvent *event) = 0;
+ virtual void Register(RPCEvent *event) = 0;
- virtual void Unregister(XMLRPCEvent *event) = 0;
+ virtual void Unregister(RPCEvent *event) = 0;
virtual Anope::string Sanitize(const Anope::string &string) = 0;
- virtual void Reply(XMLRPCRequest &request) = 0;
+ virtual void Reply(RPCRequest &request) = 0;
};