|
QXmpp Version: 1.15.1
|
The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245). More...
#include <QXmppStun.h>
Public Types | |
| enum | GatheringState { NewGatheringState , BusyGatheringState , CompleteGatheringState } |
Public Member Functions | |
| QXmppIceConnection (QObject *parent=nullptr) | |
| QXmppIceComponent * | component (int component) |
| void | addComponent (int component) |
| void | setIceControlling (bool controlling) |
| QList< QXmppJingleCandidate > | localCandidates () const |
| QString | localUser () const |
| QString | localPassword () const |
| void | addRemoteCandidate (const QXmppJingleCandidate &candidate) |
| void | setRemoteUser (const QString &user) |
| void | setRemotePassword (const QString &password) |
| void | setStunServers (const QList< QXmpp::StunServer > &servers) |
| void | setTurnServer (const QXmpp::TurnServer &) |
| void | setStunServers (const QList< QPair< QHostAddress, quint16 > > &servers) |
| void | setStunServer (const QHostAddress &host, quint16 port=3478) |
| void | setTurnServer (const QHostAddress &host, quint16 port=3478) |
| void | setTurnUser (const QString &user) |
| void | setTurnPassword (const QString &password) |
| bool | bind (const QList< QHostAddress > &addresses) |
| bool | isConnected () const |
| GatheringState | gatheringState () const |
| Q_SIGNAL void | connected () |
| This signal is emitted once ICE negotiation succeeds. | |
| Q_SIGNAL void | disconnected () |
| This signal is emitted when ICE negotiation fails. | |
| Q_SIGNAL void | gatheringStateChanged () |
| This signal is emitted when the gathering state of local candidates changes. | |
| Q_SIGNAL void | localCandidatesChanged () |
| This signal is emitted when the list of local candidates changes. | |
| Q_SLOT void | close () |
| Q_SLOT void | connectToHost () |
| Public Member Functions inherited from QXmppLoggable | |
| QXmppLoggable (QObject *parent=nullptr) | |
| Q_SIGNAL void | setGauge (const QString &gauge, double value) |
| Sets the given gauge to value. | |
| Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg) |
| This signal is emitted to send logging messages. | |
| Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1) |
| Updates the given counter by amount. | |
Properties | |
| QXmppIceConnection::GatheringState | gatheringState |
Additional Inherited Members | |
| Protected Member Functions inherited from QXmppLoggable | |
| void | debug (const QString &message) |
| Logs a debugging message. | |
| void | info (const QString &message) |
| Logs an informational message. | |
| void | warning (const QString &message) |
| Logs a warning message. | |
| void | logReceived (const QString &message) |
| Logs a received packet. | |
| void | logSent (const QString &message) |
| Logs a sent packet. | |
The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245).
A typical example is:
This enum describes the gathering state of the ICE connection.
| QXmppIceConnection::QXmppIceConnection | ( | QObject * | parent = nullptr | ) |
Constructs a new ICE connection.
| parent |
| void QXmppIceConnection::addComponent | ( | int | component | ) |
Adds a component to this ICE connection, for instance 1 for RTP or 2 for RTCP.
| component |
| void QXmppIceConnection::addRemoteCandidate | ( | const QXmppJingleCandidate & | candidate | ) |
Adds a candidate for one of the remote components.
| candidate |
| bool QXmppIceConnection::bind | ( | const QList< QHostAddress > & | addresses | ) |
Binds the local sockets to the specified addresses.
| addresses | The addresses on which to listen. |
| void QXmppIceConnection::close | ( | ) |
Closes the ICE connection.
| QXmppIceComponent * QXmppIceConnection::component | ( | int | component | ) |
Returns the given component of this ICE connection.
| component |
| void QXmppIceConnection::connectToHost | ( | ) |
Starts ICE connectivity checks.
| QXmppIceConnection::GatheringState QXmppIceConnection::gatheringState | ( | ) | const |
Returns the ICE gathering state, that is the discovery of local candidates.
| Q_SIGNAL void QXmppIceConnection::gatheringStateChanged | ( | ) |
This signal is emitted when the gathering state of local candidates changes.
| bool QXmppIceConnection::isConnected | ( | ) | const |
Returns true if ICE negotiation completed, false otherwise.
| QList< QXmppJingleCandidate > QXmppIceConnection::localCandidates | ( | ) | const |
Returns the list of local HOST CANDIDATES candidates by iterating over the available network interfaces.
| QString QXmppIceConnection::localPassword | ( | ) | const |
Returns the local password.
| QString QXmppIceConnection::localUser | ( | ) | const |
Returns the local user fragment.
| void QXmppIceConnection::setIceControlling | ( | bool | controlling | ) |
Sets whether the local party has the ICE controlling role.
note This must be called only once, immediately after creating the connection.
| void QXmppIceConnection::setRemotePassword | ( | const QString & | password | ) |
Sets the remote password.
| password |
| void QXmppIceConnection::setRemoteUser | ( | const QString & | user | ) |
Sets the remote user fragment.
| user |
| void QXmppIceConnection::setStunServer | ( | const QHostAddress & | host, |
| quint16 | port = 3478 ) |
Sets a single STUN server to use to determine server-reflexive addresses and ports.
| host | The address of the STUN server. |
| port | The port of the STUN server. |
| void QXmppIceConnection::setStunServers | ( | const QList< QPair< QHostAddress, quint16 > > & | servers | ) |
| void QXmppIceConnection::setStunServers | ( | const QList< QXmpp::StunServer > & | servers | ) |
| void QXmppIceConnection::setTurnPassword | ( | const QString & | password | ) |
Sets the password used for authentication with the TURN server.
| password |
| void QXmppIceConnection::setTurnServer | ( | const QHostAddress & | host, |
| quint16 | port = 3478 ) |
Sets the TURN server to use to relay packets in double-NAT configurations.
| host | The address of the TURN server. |
| port | The port of the TURN server. |
| void QXmppIceConnection::setTurnServer | ( | const QXmpp::TurnServer & | server | ) |
| void QXmppIceConnection::setTurnUser | ( | const QString & | user | ) |
Sets the user used for authentication with the TURN server.
|
read |
The ICE gathering state, that is the discovery of local candidates