X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fprotocols%2Flegacy%2Flegacypeer.h;h=3bc93d31b50d396529fb669ab0fd2a26301386c6;hp=8d91c6b63d6cabd31290ea53954e526b8f10b392;hb=6f82edb27a2ed2c77b36591e492d8aa2671344ef;hpb=cf8ba1e2fc36cba287e74e06223060cdfd2cc538 diff --git a/src/common/protocols/legacy/legacypeer.h b/src/common/protocols/legacy/legacypeer.h index 8d91c6b6..3bc93d31 100644 --- a/src/common/protocols/legacy/legacypeer.h +++ b/src/common/protocols/legacy/legacypeer.h @@ -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,20 +66,18 @@ 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);