summaryrefslogtreecommitdiffstats
path: root/src/ClonkInterface.hpp
diff options
context:
space:
mode:
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)