diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-05-15 02:20:16 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-05-15 02:20:16 +0400 |
commit | 9f7ef74e4a3ba022e0cb634d081f4cb460f64ead (patch) | |
tree | 4f0efc3543bcf441e062d79aae84b0055c7e9544 /src/Connection.h | |
parent | 03ef639699beb15e1b248cd8445e179a9d7869ba (diff) |
Updated Ban Editor
Diffstat (limited to 'src/Connection.h')
-rw-r--r-- | src/Connection.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/Connection.h b/src/Connection.h index 10c5b2875..39a5c2dfc 100644 --- a/src/Connection.h +++ b/src/Connection.h @@ -35,13 +35,33 @@ #include "CryptState.h" #include "Mumble.pb.h" +struct HostAddress { + union { + Q_IPV6ADDR qip6; + quint32 hash[4]; + quint64 addr[2]; + }; + + HostAddress(); + HostAddress(const Q_IPV6ADDR &); + HostAddress(const std::string &); + HostAddress(const QHostAddress &); + + bool isV6() const; + + bool operator < (const HostAddress &) const; + bool operator == (const HostAddress &) const; + + std::string toStdString() const; + QHostAddress toAddress() const; +}; + +quint32 qHash(const HostAddress &); + class Connection : public QObject { private: Q_OBJECT Q_DISABLE_COPY(Connection) - private: - static int iReceiveLevel; - static QSet<Connection *> qsReceivers; protected: QSslSocket *qtsSocket; QTime qtLastPacket; |