X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fbasichandler.h;h=c276c96c3c914eb16a4e3b0cc6d5dbfc729e63d8;hp=f641a30bddf52a804a6fdada5e394546b50ce20a;hb=b55d0de3c731948432ddb2851fe728c4edff374c;hpb=cc7f376eb105f7bf931fb7f96c9601a7b3f69511 diff --git a/src/core/basichandler.h b/src/core/basichandler.h index f641a30b..c276c96c 100644 --- a/src/core/basichandler.h +++ b/src/core/basichandler.h @@ -29,8 +29,9 @@ #include "message.h" -class NetworkConnection; -class Network; +#include "networkconnection.h" + +class CoreSession; class BasicHandler : public QObject { Q_OBJECT @@ -56,13 +57,12 @@ public: signals: void displayMsg(Message::Type, BufferInfo::Type, QString target, QString text, QString sender = "", Message::Flags flags = Message::None); - void putCmd(const QString &cmd, const QVariantList ¶ms, const QByteArray &prefix); + void putCmd(const QString &cmd, const QList ¶ms, const QByteArray &prefix = QByteArray()); void putRawLine(const QByteArray &msg); protected: void displayMsg(Message::Type, QString target, QString text, QString sender = "", Message::Flags flags = Message::None); void putCmd(const QString &cmd, const QByteArray ¶m, const QByteArray &prefix = QByteArray()); - void putCmd(const QString &cmd, const QList ¶ms, const QByteArray &prefix = QByteArray()); virtual void handle(const QString &member, QGenericArgument val0 = QGenericArgument(0), QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(), @@ -71,8 +71,10 @@ protected: QGenericArgument val7 = QGenericArgument(), QGenericArgument val8 = QGenericArgument()); - Network * network() const; - NetworkConnection * networkConnection() const; + inline Network *network() const { return _networkConnection->network(); } + inline NetworkConnection *networkConnection() const { return _networkConnection; } + inline CoreSession *coreSession() const { return _networkConnection->coreSession(); } + BufferInfo::Type typeByTarget(const QString &target) const; private: