X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fprotocols%2Flegacy%2Flegacypeer.h;h=803b2b3af25bb0300b0ae7c25fac137a54acb490;hp=a4c7a490b87aaea78a11d1679713d1b125a72341;hb=35ca85f1c4371ee28d00d5ff0195a5b44aadb299;hpb=2e9855c688c827b2159fbb548bf816de360e3ae3 diff --git a/src/common/protocols/legacy/legacypeer.h b/src/common/protocols/legacy/legacypeer.h index a4c7a490..803b2b3a 100644 --- a/src/common/protocols/legacy/legacypeer.h +++ b/src/common/protocols/legacy/legacypeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,12 +21,8 @@ #ifndef LEGACYPEER_H #define LEGACYPEER_H -#include - #include "../../remotepeer.h" -class QDataStream; - class LegacyPeer : public RemotePeer { Q_OBJECT @@ -41,7 +37,7 @@ public: HeartBeatReply }; - LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0); + LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0); Protocol::Type protocol() const { return Protocol::LegacyProtocol; } QString protocolName() const { return "the legacy protocol"; } @@ -73,12 +69,11 @@ signals: // only used in compat mode void protocolVersionMismatch(int actual, int expected); -protected slots: - void onSocketDataAvailable(); - private: - bool readSocketData(QVariant &item); - void writeSocketData(const QVariant &item); + using RemotePeer::writeMessage; + void writeMessage(const QVariant &item); + void processMessage(const QByteArray &msg); + void handleHandshakeMessage(const QVariant &msg); void handlePackedFunc(const QVariant &packedFunc); void dispatchPackedFunc(const QVariantList &packedFunc); @@ -86,8 +81,6 @@ private: void toLegacyIrcUsersAndChannels(QVariantMap &initData); void fromLegacyIrcUsersAndChannels(QVariantMap &initData); - QDataStream _stream; - quint32 _blockSize; bool _useCompression; };