projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement peer-specific signal sending
[quassel.git]
/
src
/
common
/
peer.h
diff --git
a/src/common/peer.h
b/src/common/peer.h
index
2bdcc56
..
32ee0b5
100644
(file)
--- a/
src/common/peer.h
+++ b/
src/common/peer.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
4
by the Quassel Project *
+ * Copyright (C) 2005-201
6
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-22,6
+22,7
@@
#define PEER_H
#include <QAbstractSocket>
#define PEER_H
#include <QAbstractSocket>
+#include <QDataStream>
#include <QPointer>
#include "authhandler.h"
#include <QPointer>
#include "authhandler.h"
@@
-35,6
+36,7
@@
class Peer : public QObject
public:
Peer(AuthHandler *authHandler, QObject *parent = 0);
public:
Peer(AuthHandler *authHandler, QObject *parent = 0);
+ virtual Protocol::Type protocol() const = 0;
virtual QString description() const = 0;
virtual SignalProxy *signalProxy() const = 0;
virtual QString description() const = 0;
virtual SignalProxy *signalProxy() const = 0;
@@
-48,6
+50,15
@@
public:
virtual int lag() const = 0;
virtual int lag() const = 0;
+ virtual QString address() const = 0;
+ virtual quint16 port() const = 0;
+
+ int _id = -1;
+
+ QDateTime _connectedSince;
+ QString _buildDate;
+ QString _clientVersion;
+
public slots:
/* Handshake messages */
virtual void dispatch(const Protocol::RegisterClient &) = 0;
public slots:
/* Handshake messages */
virtual void dispatch(const Protocol::RegisterClient &) = 0;
@@
-86,6
+97,9
@@
private:
typedef Peer * PeerPtr;
Q_DECLARE_METATYPE(PeerPtr)
typedef Peer * PeerPtr;
Q_DECLARE_METATYPE(PeerPtr)
+QDataStream &operator<<(QDataStream &out, PeerPtr ptr);
+QDataStream &operator>>(QDataStream &in, PeerPtr &ptr);
+
// Template method needed in the header
template<typename T> inline
// Template method needed in the header
template<typename T> inline