X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fremotepeer.h;h=5751dfb861542042ad1cc3b595361a34e551fbc4;hp=e41a6a3bc3d823a3631f59764860f7221ef6d1e7;hb=fd25e92f19d6afd4eb02844bcbf20ba132868303;hpb=c2fc6343afb7ac0bba9fc5a019fdadbefc35f546 diff --git a/src/common/remotepeer.h b/src/common/remotepeer.h index e41a6a3b..5751dfb8 100644 --- a/src/common/remotepeer.h +++ b/src/common/remotepeer.h @@ -22,14 +22,15 @@ #define REMOTEPEER_H #include -#include +#include "peer.h" #include "protocol.h" #include "signalproxy.h" +class QTcpSocket; class QTimer; -class RemotePeer : public SignalProxy::AbstractPeer +class RemotePeer : public Peer { Q_OBJECT @@ -62,9 +63,6 @@ signals: // this is only used for the auth phase and should be replaced by something more generic void dataReceived(const QVariant &item); - void disconnected(); - void error(QAbstractSocket::SocketError); - void transferProgress(int current, int max); protected: @@ -91,18 +89,11 @@ private: int _lag; }; -// Template methods we need in the header + template inline void RemotePeer::handle(const T &protoMessage) { - if (!signalProxy()) { - qWarning() << Q_FUNC_INFO << "Cannot handle messages without a SignalProxy!"; - return; - } - - // _heartBeatCount = 0; - - signalProxy()->handle(this, protoMessage); + Peer::handle(protoMessage); }