diff options
Diffstat (limited to 'src/client/QXmppCallManager.cpp')
| -rw-r--r-- | src/client/QXmppCallManager.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/client/QXmppCallManager.cpp b/src/client/QXmppCallManager.cpp index 8ba97c2d..dba05975 100644 --- a/src/client/QXmppCallManager.cpp +++ b/src/client/QXmppCallManager.cpp @@ -38,8 +38,7 @@ #include <QTimer> QXmppCallManagerPrivate::QXmppCallManagerPrivate(QXmppCallManager *qq) - : stunPort(0), - turnPort(0), + : turnPort(0), q(qq) { // Initialize GStreamer @@ -153,16 +152,32 @@ QXmppCall *QXmppCallManager::call(const QString &jid) return call; } -/// Sets the STUN server to use to determine server-reflexive addresses +/// Sets multiple STUN servers to use to determine server-reflexive addresses /// and ports. /// +/// \note This may only be called prior to calling bind(). +/// +/// \param servers List of the STUN servers. +/// +/// \since QXmpp 1.3 + +void QXmppCallManager::setStunServers(const QList<QPair<QHostAddress, quint16>> &servers) +{ + d->stunServers = servers; +} + +/// Sets a single STUN server to use to determine server-reflexive addresses +/// and ports. +/// +/// \note This may only be called prior to calling bind(). +/// /// \param host The address of the STUN server. /// \param port The port of the STUN server. void QXmppCallManager::setStunServer(const QHostAddress &host, quint16 port) { - d->stunHost = host; - d->stunPort = port; + d->stunServers.clear(); + d->stunServers.push_back(QPair<QHostAddress, quint16>(host, port)); } /// Sets the TURN server to use to relay packets in double-NAT configurations. |
