X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fremotepeer.h;h=7bf7944f850707a035d603662e7c67b4981fe477;hb=ab7ef4d24f62b5848b628482b7762ebfc0b53e1a;hp=b1c5bf4e9a2e97dc74f18f7e200d5e2ef534a94e;hpb=b2169e5f4cbd3ce724c4808b62ddc2b8941219a5;p=quassel.git diff --git a/src/common/remotepeer.h b/src/common/remotepeer.h index b1c5bf4e..7bf7944f 100644 --- a/src/common/remotepeer.h +++ b/src/common/remotepeer.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 * @@ -23,11 +23,11 @@ #include +#include "compressor.h" #include "peer.h" #include "protocol.h" #include "signalproxy.h" -class QTcpSocket; class QTimer; class AuthHandler; @@ -41,15 +41,17 @@ public: using Peer::handle; using Peer::dispatch; - RemotePeer(AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0); + RemotePeer(AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0); void setSignalProxy(SignalProxy *proxy); - virtual Protocol::Type protocol() const = 0; virtual QString protocolName() const = 0; virtual QString description() const; virtual quint16 enabledFeatures() const { return 0; } + virtual QString address() const; + virtual quint16 port() const; + bool isOpen() const; bool isSecure() const; bool isLocal() const; @@ -87,6 +89,7 @@ protected slots: private slots: void onReadyRead(); + void onCompressionError(Compressor::Error error); void sendHeartBeat(); void changeHeartBeatInterval(int secs); @@ -96,6 +99,7 @@ private: private: QTcpSocket *_socket; + Compressor *_compressor; SignalProxy *_signalProxy; QTimer *_heartBeatTimer; int _heartBeatCount;