properly rewind oidentd config file
[quassel.git] / src / core / coresessioneventprocessor.h
index b99a778..b2ba39c 100644 (file)
 #ifndef CORESESSIONEVENTPROCESSOR_H
 #define CORESESSIONEVENTPROCESSOR_H
 
+#include "basichandler.h"
 #include "corenetwork.h"
 #include "networkevent.h"
 
 class CoreSession;
+class CtcpEvent;
 class IrcEvent;
 class IrcEventNumeric;
 class Netsplit;
 
-class CoreSessionEventProcessor : public QObject {
+class CoreSessionEventProcessor : public BasicHandler {
   Q_OBJECT
 
 public:
@@ -43,10 +45,10 @@ public:
   Q_INVOKABLE void processIrcEventCap(IrcEvent *event);            // CAP framework
   Q_INVOKABLE void processIrcEventInvite(IrcEvent *event);
   Q_INVOKABLE void processIrcEventJoin(IrcEvent *event);
-  Q_INVOKABLE void processIrcEventKick(IrcEvent *event);
+  Q_INVOKABLE void lateProcessIrcEventKick(IrcEvent *event);
   Q_INVOKABLE void processIrcEventMode(IrcEvent *event);
-  Q_INVOKABLE void processIrcEventNick(IrcEvent *event);
-  Q_INVOKABLE void processIrcEventPart(IrcEvent *event);
+  Q_INVOKABLE void lateProcessIrcEventNick(IrcEvent *event);
+  Q_INVOKABLE void lateProcessIrcEventPart(IrcEvent *event);
   Q_INVOKABLE void processIrcEventPing(IrcEvent *event);
   Q_INVOKABLE void processIrcEventPong(IrcEvent *event);
   Q_INVOKABLE void processIrcEventQuit(IrcEvent *event);
@@ -82,6 +84,19 @@ public:
 
   // Q_INVOKABLE void processIrcEvent(IrcEvent *event);
 
+  /* CTCP handlers */
+  Q_INVOKABLE void processCtcpEvent(CtcpEvent *event);
+
+  Q_INVOKABLE void handleCtcpAction(CtcpEvent *event);
+  Q_INVOKABLE void handleCtcpClientinfo(CtcpEvent *event);
+  Q_INVOKABLE void handleCtcpPing(CtcpEvent *event);
+  Q_INVOKABLE void handleCtcpTime(CtcpEvent *event);
+  Q_INVOKABLE void handleCtcpVersion(CtcpEvent *event);
+  Q_INVOKABLE void defaultHandler(const QString &ctcpCmd, CtcpEvent *event);
+
+signals:
+  void newEvent(Event *event);
+
 protected:
   bool checkParamCount(IrcEvent *event, int minParams);
   inline CoreNetwork *coreNetwork(NetworkEvent *e) const { return qobject_cast<CoreNetwork *>(e->network()); }