X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=bcab1df7408d99d9273e410bb38541f94c9075b6;hp=b185264b98313329a6778bd4dd5264a64e538253;hb=edc55b1f86cf613a332eeeb5d85537a54120dfa5;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index b185264b..bcab1df7 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,15 +20,10 @@ #pragma once -#include "coreircchannel.h" -#include "coreircuser.h" -#include "network.h" +#include -// IRCv3 capabilities #include -#include "irccap.h" - #ifdef HAVE_SSL # include # include @@ -40,9 +35,12 @@ # include "cipher.h" #endif -#include - +#include "coreircchannel.h" +#include "coreircuser.h" #include "coresession.h" +#include "irccap.h" +#include "irctag.h" +#include "network.h" class CoreIdentity; class CoreUserInputHandler; @@ -280,7 +278,7 @@ public slots: * maintain PING/PONG replies, the other side will close the connection. * @endparmblock */ - void putCmd(const QString& cmd, const QList& params, const QByteArray& prefix = {}, bool prepend = false); + void putCmd(const QString& cmd, const QList& params, const QByteArray& prefix = {}, const QHash &tags = {}, bool prepend = false); /** * Sends the command for each set of encoded parameters, with optional prefix or high priority. @@ -299,7 +297,7 @@ public slots: * cannot maintain PING/PONG replies, the other side will close the connection. * @endparmblock */ - void putCmd(const QString& cmd, const QList>& params, const QByteArray& prefix = {}, bool prependAll = false); + void putCmd(const QString& cmd, const QList>& params, const QByteArray& prefix = {}, const QHash &tags = {}, bool prependAll = false); void setChannelJoined(const QString& channel); void setChannelParted(const QString& channel); @@ -337,7 +335,7 @@ public slots: * set by the user. Use with caution and remember to re-enable configured limits when done. * @endparmblock */ - void updateRateLimiting(const bool forceUnlimited = false); + void updateRateLimiting(bool forceUnlimited = false); /** * Resets the token bucket up to the maximum @@ -420,21 +418,15 @@ public slots: */ inline void resetPongReplyPending() { _pongReplyPending = false; } - void onDisplayMsg(Message::Type msgType, - BufferInfo::Type bufferType, - const QString& target, - const QString& text, - const QString& sender, - Message::Flags flags) + void onDisplayMsg(const NetworkInternalMessage& msg) { - emit displayMsg(networkId(), msgType, bufferType, target, text, sender, flags); + emit displayMsg(RawMessage(networkId(), msg)); } signals: - void recvRawServerMsg(QString); - void displayStatusMsg(QString); - void displayMsg( - NetworkId, Message::Type, BufferInfo::Type, const QString& target, const QString& text, const QString& sender, Message::Flags flags); + void recvRawServerMsg(const QString&); + void displayStatusMsg(const QString&); + void displayMsg(const RawMessage& msg); void disconnected(NetworkId networkId); void connectionError(const QString& errorMsg); @@ -510,14 +502,9 @@ private slots: void writeToSocket(const QByteArray& data); private: - void showMessage(Message::Type msgType, - BufferInfo::Type bufferType, - const QString& target, - const QString& text, - const QString& sender = "", - Message::Flags flags = Message::None) + void showMessage(const NetworkInternalMessage& msg) { - emit displayMsg(networkId(), msgType, bufferType, target, text, sender, flags); + emit displayMsg(RawMessage(networkId(), msg)); } private: