aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppStun.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2015-09-03 11:03:18 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2015-09-03 11:10:11 +0200
commit1d828207bbab3b53ec251ac311d761a99e8977e5 (patch)
treecf5db603955197bab97255cba7766b410e69626f /src/base/QXmppStun.h
parenteea8f8509e4262d084e072e1bee2268ad384ec06 (diff)
downloadqxmpp-1d828207bbab3b53ec251ac311d761a99e8977e5.tar.gz
Add QXmppIceConnection::gatheringState property
Diffstat (limited to 'src/base/QXmppStun.h')
-rw-r--r--src/base/QXmppStun.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/base/QXmppStun.h b/src/base/QXmppStun.h
index cc8b01c1..bd0868c0 100644
--- a/src/base/QXmppStun.h
+++ b/src/base/QXmppStun.h
@@ -186,6 +186,7 @@ private slots:
void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port);
void turnConnected();
void transactionFinished();
+ void updateGatheringState();
void writeStun(const QXmppStunMessage &request);
signals:
@@ -195,6 +196,9 @@ signals:
/// \brief This signal is emitted when a data packet is received.
void datagramReceived(const QByteArray &datagram);
+ /// \internal This signal is emitted when the gathering state of local candidates changes.
+ void gatheringStateChanged();
+
/// \brief This signal is emitted when the list of local candidates changes.
void localCandidatesChanged();
@@ -237,8 +241,17 @@ private:
class QXMPP_EXPORT QXmppIceConnection : public QXmppLoggable
{
Q_OBJECT
+ Q_ENUMS(GatheringState)
+ Q_PROPERTY(QXmppIceConnection::GatheringState gatheringState READ gatheringState NOTIFY gatheringStateChanged)
public:
+ enum GatheringState
+ {
+ NewGatheringState,
+ BusyGatheringState,
+ CompleteGatheringState
+ };
+
QXmppIceConnection(QObject *parent = 0);
~QXmppIceConnection();
@@ -262,6 +275,8 @@ public:
bool bind(const QList<QHostAddress> &addresses);
bool isConnected() const;
+ GatheringState gatheringState() const;
+
signals:
/// \brief This signal is emitted once ICE negotiation succeeds.
void connected();
@@ -269,6 +284,9 @@ signals:
/// \brief This signal is emitted when ICE negotiation fails.
void disconnected();
+ /// \brief This signal is emitted when the gathering state of local candidates changes.
+ void gatheringStateChanged();
+
/// \brief This signal is emitted when the list of local candidates changes.
void localCandidatesChanged();
@@ -278,6 +296,7 @@ public slots:
private slots:
void slotConnected();
+ void slotGatheringStateChanged();
void slotTimeout();
private: