summaryrefslogtreecommitdiff
path: root/include/modules/xmlrpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/xmlrpc.h')
-rw-r--r--include/modules/xmlrpc.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h
index 87fa353ed..2e943f70f 100644
--- a/include/modules/xmlrpc.h
+++ b/include/modules/xmlrpc.h
@@ -1,11 +1,24 @@
/*
+ * Anope IRC Services
*
- * (C) 2010-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2010-2016 Anope Team <team@anope.org>
*
- * Please read COPYING and README for further details.
+ * This file is part of Anope. Anope is free software; you can
+ * redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software
+ * Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#include "httpd.h"
class XMLRPCRequest
@@ -17,7 +30,7 @@ class XMLRPCRequest
Anope::string id;
std::deque<Anope::string> data;
HTTPReply& r;
-
+
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); }
inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
@@ -29,19 +42,22 @@ class XMLRPCEvent
{
public:
virtual ~XMLRPCEvent() { }
- virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
+ virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) anope_abstract;
};
class XMLRPCServiceInterface : public Service
{
public:
- XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
+ static constexpr const char *NAME = "XMLRPCServiceInterface";
+
+ XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, NAME) { }
- virtual void Register(XMLRPCEvent *event) = 0;
+ virtual void Register(XMLRPCEvent *event) anope_abstract;
- virtual void Unregister(XMLRPCEvent *event) = 0;
+ virtual void Unregister(XMLRPCEvent *event) anope_abstract;
- virtual Anope::string Sanitize(const Anope::string &string) = 0;
+ virtual Anope::string Sanitize(const Anope::string &string) anope_abstract;
- virtual void Reply(XMLRPCRequest &request) = 0;
+ virtual void Reply(XMLRPCRequest &request) anope_abstract;
};
+