X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fprotocols%2Fdatastream%2Fdatastreampeer.h;h=1648c3a2866c09cf23496e8a63431d5f9c06375a;hp=687f2ee493b5ea3a638a1b8c81900ec5c7da2ba4;hb=e50ae7a06fc4e5d3a911c361d30953410deab609;hpb=2dca302472ee44923e164784191891711eff626a diff --git a/src/common/protocols/datastream/datastreampeer.h b/src/common/protocols/datastream/datastreampeer.h index 687f2ee4..1648c3a2 100644 --- a/src/common/protocols/datastream/datastreampeer.h +++ b/src/common/protocols/datastream/datastreampeer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,8 +21,6 @@ #ifndef DATASTREAMPEER_H #define DATASTREAMPEER_H -#include - #include "../../remotepeer.h" class QDataStream; @@ -41,9 +39,10 @@ public: HeartBeatReply }; - DataStreamPeer(AuthHandler *authHandler, QTcpSocket *socket, quint16 features, QObject *parent = 0); + DataStreamPeer(AuthHandler *authHandler, QTcpSocket *socket, quint16 features, Compressor::CompressionLevel level, QObject *parent = 0); Protocol::Type protocol() const { return Protocol::DataStreamProtocol; } + QString protocolName() const { return "the DataStream protocol"; } static quint16 supportedFeatures(); static bool acceptsFeatures(quint16 peerFeatures); @@ -71,18 +70,15 @@ public: signals: void protocolError(const QString &errorString); -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); + using RemotePeer::writeMessage; + void writeMessage(const QVariantMap &handshakeMsg); + void writeMessage(const QVariantList &sigProxyMsg); + void processMessage(const QByteArray &msg); - QDataStream _stream; - quint32 _blockSize; + void handleHandshakeMessage(const QVariantList &mapData); + void handlePackedFunc(const QVariantList &packedFunc); + void dispatchPackedFunc(const QVariantList &packedFunc); }; #endif