summaryrefslogtreecommitdiffstats
path: root/src/ClonkInterface.hpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2017-04-06 17:22:23 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2017-04-06 17:22:52 +0200
commit21d4d5f0de6bd8ed1cdab4f7fe6b9596dd390252 (patch)
tree53af18c9eb2098721dca970f0316d832938b231e /src/ClonkInterface.hpp
parent3fe710cb029522b86ef27c322f0cb793b1368051 (diff)
downloadmanager-21d4d5f0de6bd8ed1cdab4f7fe6b9596dd390252.tar.gz
manager-21d4d5f0de6bd8ed1cdab4f7fe6b9596dd390252.zip
Move clonk control specific parts into ClonkControl
There are still many clonk commands hardcoded through the pass-CRSM-Commands
Diffstat (limited to 'src/ClonkInterface.hpp')
-rw-r--r--src/ClonkInterface.hpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ClonkInterface.hpp b/src/ClonkInterface.hpp
index 376acbe..a6961f3 100644
--- a/src/ClonkInterface.hpp
+++ b/src/ClonkInterface.hpp
@@ -4,15 +4,27 @@
#include "ClientInfo.hpp"
#include "CRSMSession.hpp"
+class ClonkControllerInterface {
+public:
+ virtual ~ClonkControllerInterface();
+
+ virtual void writeToServer(const QString& msg) = 0;
+};
+
class ClonkControlInterface {
- ClonkControlInterface() = delete;
- virtual ~ClonkControlInterface();
+protected:
+ ClonkControllerInterface* controller = nullptr;
+
public:
+ virtual ~ClonkControlInterface();
+
+ void setController(ClonkControllerInterface* controller);
+
virtual void serverMessage(const QString& msg, bool action = false) = 0;
virtual void setCountdown(unsigned int seconds) = 0;
virtual void abortCountdown() = 0;
virtual void setCommand(const QString& command) = 0; // split?
- virtual void kick(const ClientInfo& client) = 0;
+ virtual void kick(const ClientInfo& client, const QString& reason = "") = 0;
virtual void watchdog(const QString& id) = 0;
virtual void rawCommand(const QString& command) = 0;
virtual void alert() = 0; // specify client? (Clonk patch first)