QXmpp
Version:0.4.0
|
The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment). More...
#include <QXmppStun.h>
Public Slots | |
void | close () |
Stops ICE connectivity checks and closes the underlying sockets. | |
void | connectToHost () |
Starts ICE connectivity checks. | |
qint64 | sendDatagram (const QByteArray &datagram) |
Signals | |
void | connected () |
This signal is emitted once ICE negotiation succeeds. | |
void | datagramReceived (const QByteArray &datagram) |
This signal is emitted when a data packet is received. | |
void | localCandidatesChanged () |
This signal is emitted when the list of local candidates changes. | |
Public Member Functions | |
QXmppIceComponent (QObject *parent=0) | |
~QXmppIceComponent () | |
Destroys the QXmppIceComponent. | |
void | setIceControlling (bool controlling) |
void | setStunServer (const QHostAddress &host, quint16 port) |
void | setTurnServer (const QHostAddress &host, quint16 port) |
void | setTurnUser (const QString &user) |
void | setTurnPassword (const QString &password) |
QList< QXmppJingleCandidate > | localCandidates () const |
Returns the list of local candidates. | |
void | setLocalUser (const QString &user) |
void | setLocalPassword (const QString &password) |
int | component () const |
void | setComponent (int component) |
bool | addRemoteCandidate (const QXmppJingleCandidate &candidate) |
Adds a remote STUN candidate. | |
void | setRemoteUser (const QString &user) |
void | setRemotePassword (const QString &password) |
bool | isConnected () const |
Returns true if ICE negotiation completed, false otherwise. | |
void | setSockets (QList< QUdpSocket * > sockets) |
Static Public Member Functions | |
static QList< QHostAddress > | discoverAddresses () |
Returns the list of local network addresses. | |
static QList< QUdpSocket * > | reservePorts (const QList< QHostAddress > &addresses, int count, QObject *parent=0) |
The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment).
QXmppIceComponent::QXmppIceComponent | ( | QObject * | parent = 0 | ) |
Constructs a new QXmppIceComponent.
controlling | |
parent |
int QXmppIceComponent::component | ( | ) | const |
Returns the component id for the current socket, e.g. 1 for RTP and 2 for RTCP.
QList< QUdpSocket * > QXmppIceComponent::reservePorts | ( | const QList< QHostAddress > & | addresses, |
int | count, | ||
QObject * | parent = 0 |
||
) | [static] |
Tries to bind count UDP sockets on each of the given addresses.
The port numbers are chosen so that they are consecutive, starting at an even port. This makes them suitable for RTP/RTCP sockets pairs.
addresses | The network address on which to bind the sockets. |
count | The number of ports to reserve. |
parent | The parent object for the sockets. |
qint64 QXmppIceComponent::sendDatagram | ( | const QByteArray & | datagram | ) | [slot] |
Sends a data packet to the remote party.
datagram |
void QXmppIceComponent::setComponent | ( | int | component | ) |
Sets the component id for the current socket, e.g. 1 for RTP and 2 for RTCP.
component |
void QXmppIceComponent::setLocalPassword | ( | const QString & | password | ) |
Sets the local password.
password |
void QXmppIceComponent::setLocalUser | ( | const QString & | user | ) |
Sets the local user fragment.
user |
void QXmppIceComponent::setRemotePassword | ( | const QString & | password | ) |
Sets the remote password.
password |
void QXmppIceComponent::setRemoteUser | ( | const QString & | user | ) |
Sets the remote user fragment.
user |
void QXmppIceComponent::setSockets | ( | QList< QUdpSocket * > | sockets | ) |
Sets the list of sockets to use for this component.
sockets |
void QXmppIceComponent::setStunServer | ( | const QHostAddress & | host, |
quint16 | port | ||
) |
Sets the 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 QXmppIceComponent::setTurnPassword | ( | const QString & | password | ) |
Sets the password used for authentication with the TURN server.
password |
void QXmppIceComponent::setTurnServer | ( | const QHostAddress & | host, |
quint16 | port | ||
) |
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 QXmppIceComponent::setTurnUser | ( | const QString & | user | ) |
Sets the user used for authentication with the TURN server.
user |