aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppStun.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2015-08-25 11:17:46 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2015-08-25 11:17:46 +0200
commit37908ac7aa0a45921786aace4438353e2c822ff9 (patch)
tree86f3b50649172393b1a70dcebfecc0dcf9b6a5b5 /src/base/QXmppStun.h
parent961490f3a03abca3b5686edc11bed5844348e191 (diff)
downloadqxmpp-37908ac7aa0a45921786aace4438353e2c822ff9.tar.gz
STUN: use a private header
Diffstat (limited to 'src/base/QXmppStun.h')
-rw-r--r--src/base/QXmppStun.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/src/base/QXmppStun.h b/src/base/QXmppStun.h
index e86ae183..cdc237c5 100644
--- a/src/base/QXmppStun.h
+++ b/src/base/QXmppStun.h
@@ -156,118 +156,6 @@ private:
QString m_username;
};
-/// \internal
-///
-/// The QXmppStunTransaction class represents a STUN transaction.
-///
-
-class QXMPP_EXPORT QXmppStunTransaction : public QXmppLoggable
-{
- Q_OBJECT
-
-public:
- QXmppStunTransaction(const QXmppStunMessage &request, QObject *parent);
- QXmppStunMessage request() const;
- QXmppStunMessage response() const;
-
-signals:
- void finished();
- void writeStun(const QXmppStunMessage &request);
-
-public slots:
- void readStun(const QXmppStunMessage &response);
-
-private slots:
- void retry();
-
-private:
- QXmppStunMessage m_request;
- QXmppStunMessage m_response;
- QTimer *m_retryTimer;
- int m_tries;
-};
-
-/// \internal
-///
-/// The QXmppTurnAllocation class represents a TURN allocation as defined
-/// by RFC 5766 Traversal Using Relays around NAT (TURN).
-///
-
-class QXMPP_EXPORT QXmppTurnAllocation : public QXmppLoggable
-{
- Q_OBJECT
-
-public:
- enum AllocationState
- {
- UnconnectedState,
- ConnectingState,
- ConnectedState,
- ClosingState
- };
-
- QXmppTurnAllocation(QObject *parent = 0);
- ~QXmppTurnAllocation();
-
- QHostAddress relayedHost() const;
- quint16 relayedPort() const;
- AllocationState state() const;
-
- void setServer(const QHostAddress &host, quint16 port = 3478);
- void setUser(const QString &user);
- void setPassword(const QString &password);
-
- qint64 writeDatagram(const QByteArray &data, const QHostAddress &host, quint16 port);
-
-signals:
- /// \brief This signal is emitted once TURN allocation succeeds.
- void connected();
-
- /// \brief This signal is emitted when a data packet is received.
- void datagramReceived(const QByteArray &data, const QHostAddress &host, quint16 port);
-
- /// \brief This signal is emitted when TURN allocation fails.
- void disconnected();
-
-public slots:
- void connectToHost();
- void disconnectFromHost();
-
-private slots:
- void readyRead();
- void refresh();
- void refreshChannels();
- void transactionFinished();
- void writeStun(const QXmppStunMessage &message);
-
-private:
- void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port);
- void setState(AllocationState state);
-
- QUdpSocket *socket;
- QTimer *m_timer;
- QTimer *m_channelTimer;
- QString m_password;
- QString m_username;
- QHostAddress m_relayedHost;
- quint16 m_relayedPort;
- QHostAddress m_turnHost;
- quint16 m_turnPort;
-
- // channels
- typedef QPair<QHostAddress, quint16> Address;
- quint16 m_channelNumber;
- QMap<quint16, Address> m_channels;
-
- // state
- quint32 m_lifetime;
- QByteArray m_key;
- QString m_realm;
- QByteArray m_nonce;
- AllocationState m_state;
- QList<QXmppStunTransaction*> m_transactions;
-};
-
/// \brief The QXmppIceComponent class represents a piece of a media stream
/// requiring a single transport address, as defined by RFC 5245
/// (Interactive Connectivity Establishment).