X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fprotocols%2Flegacy%2Flegacypeer.h;h=5aeafcae136037b8d06ac2ae2c6b2857f284c8dc;hp=9234b332fed803e38ecf4b46fccb74d919adeb24;hb=208ccb6d91ebb3c26a67c35c11411ba3ab27708a;hpb=64cf9f9b8a737dad5f29447805d4004cfd03c454 diff --git a/src/common/protocols/legacy/legacypeer.h b/src/common/protocols/legacy/legacypeer.h index 9234b332..5aeafcae 100644 --- a/src/common/protocols/legacy/legacypeer.h +++ b/src/common/protocols/legacy/legacypeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,7 +42,8 @@ public: }; LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0); - ~LegacyPeer() {} + + Protocol::Type protocol() const { return Protocol::LegacyProtocol; } void setSignalProxy(SignalProxy *proxy); @@ -65,26 +66,27 @@ public: void dispatch(const Protocol::HeartBeat &msg); void dispatch(const Protocol::HeartBeatReply &msg); - // FIXME: this is only used for the auth phase and should be replaced by something more generic - void writeSocketData(const QVariant &item); - signals: void protocolError(const QString &errorString); // only used in compat mode void protocolVersionMismatch(int actual, int expected); -private slots: - void socketDataAvailable(); +protected slots: + void onSocketDataAvailable(); private: bool readSocketData(QVariant &item); + void writeSocketData(const QVariant &item); void handleHandshakeMessage(const QVariant &msg); void handlePackedFunc(const QVariant &packedFunc); void dispatchPackedFunc(const QVariantList &packedFunc); + void toLegacyIrcUsersAndChannels(QVariantMap &initData); + void fromLegacyIrcUsersAndChannels(QVariantMap &initData); + QDataStream _stream; - qint32 _blockSize; + quint32 _blockSize; bool _useCompression; };