X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fircevent.h;h=71e4ad2839998ee93a5cd21900a11b2094195a42;hp=5b93d61e7af5ab62d5f93c0205569205a207ac08;hb=6f38b6fdeb73e726c24b26a97b98c9cfe0fc8a0e;hpb=5c6de1b6613a99791be660bb19df18e3da507cd7 diff --git a/src/common/ircevent.h b/src/common/ircevent.h index 5b93d61e..71e4ad28 100644 --- a/src/common/ircevent.h +++ b/src/common/ircevent.h @@ -40,7 +40,12 @@ public: inline QStringList params() const { return _params; } inline void setParams(const QStringList ¶ms) { _params = params; } + static Event *create(EventManager::EventType type, QVariantMap &map, Network *network); + protected: + explicit IrcEvent(EventManager::EventType type, QVariantMap &map, Network *network); + void toVariantMap(QVariantMap &map) const; + virtual inline QString className() const { return "IrcEvent"; } virtual inline void debugInfo(QDebug &dbg) const { NetworkEvent::debugInfo(dbg); @@ -68,6 +73,9 @@ public: inline void setTarget(const QString &target) { _target = target; } protected: + explicit IrcEventNumeric(EventManager::EventType type, QVariantMap &map, Network *network); + void toVariantMap(QVariantMap &map) const; + virtual inline QString className() const { return "IrcEventNumeric"; } virtual inline void debugInfo(QDebug &dbg) const { dbg << ", num = " << number(); @@ -81,6 +89,7 @@ private: uint _number; QString _target; + friend class IrcEvent; }; class IrcEventRawMessage : public IrcEvent { @@ -101,6 +110,9 @@ public: inline void setRawMessage(const QByteArray &rawMessage) { _rawMessage = rawMessage; } protected: + explicit IrcEventRawMessage(EventManager::EventType type, QVariantMap &map, Network *network); + void toVariantMap(QVariantMap &map) const; + virtual inline QString className() const { return "IrcEventRawMessage"; } virtual inline void debugInfo(QDebug &dbg) const { NetworkEvent::debugInfo(dbg); @@ -112,6 +124,8 @@ protected: private: QByteArray _rawMessage; + + friend class IrcEvent; }; #endif