X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=456f847255292e8615903d066bff1db46f0232c2;hp=f07f2a288ca1c0dcf6b7b7c2d0e56ca0c753299b;hb=4e40c486dea949244b73beaf73d5ceb1ef591b5b;hpb=53e50ab66a5b3fa00282545ebc22ce3433ecf42b diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index f07f2a28..456f8472 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,15 +22,10 @@ #include +#include +#include #include -#ifdef HAVE_SSL -# include -# include -#else -# include -#endif - #ifdef HAVE_QCA2 # include "cipher.h" #endif @@ -141,7 +136,7 @@ public: * * @returns True if in progress, otherwise false */ - inline bool capNegotiationInProgress() const { return (!_capsQueuedIndividual.empty() || !_capsQueuedBundled.empty()); } + inline bool capsPendingNegotiation() const { return (!_capsQueuedIndividual.empty() || !_capsQueuedBundled.empty()); } /** * Queues a capability to be requested. @@ -335,7 +330,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 @@ -418,21 +413,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); @@ -482,9 +471,7 @@ private slots: void sendAutoWho(); void startAutoWhoCycle(); -#ifdef HAVE_SSL void onSslErrors(const QList& errors); -#endif /** * Check the message token bucket @@ -508,14 +495,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: @@ -524,14 +506,11 @@ private: bool _debugLogRawIrc; ///< If true, include raw IRC socket messages in the debug log qint32 _debugLogRawNetId; ///< Network ID for logging raw IRC socket messages, or -1 for all -#ifdef HAVE_SSL QSslSocket socket; -#else - QTcpSocket socket; -#endif qint64 _socketId{0}; CoreUserInputHandler* _userInputHandler; + MetricsServer* _metricsServer; QHash _channelKeys; // stores persistent channels and their passwords, if any