aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppStun.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2015-08-27 10:54:06 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2015-08-27 10:54:06 +0200
commit95774986638c50782d6be5fcf18f9fef4d45545f (patch)
tree7acd8e16ac1094b10afca078669e2948ad83bde9 /src/base/QXmppStun.cpp
parent9ef8c83e2e3f2c756d6c3eb07c5fe740d5a48f20 (diff)
downloadqxmpp-95774986638c50782d6be5fcf18f9fef4d45545f.tar.gz
ICE: do not allow setting local user / password
Making it possible to change the local ICE user fragment or password complicates the state machine significantly. To avoid users shooting themselves in the foot, remove this API. Also make it clear that QXmppIceComponent cannot be used separately from QXmppIceConnection by making its constructor private.
Diffstat (limited to 'src/base/QXmppStun.cpp')
-rw-r--r--src/base/QXmppStun.cpp59
1 files changed, 3 insertions, 56 deletions
diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp
index af62807f..e93f6a39 100644
--- a/src/base/QXmppStun.cpp
+++ b/src/base/QXmppStun.cpp
@@ -1947,33 +1947,6 @@ QList<QXmppJingleCandidate> QXmppIceComponent::localCandidates() const
return d->localCandidates;
}
-/// Sets the local user fragment.
-///
-/// \param user
-
-void QXmppIceComponent::setLocalUser(const QString &user)
-{
- d->localUser = user;
-}
-
-/// Sets the tie breaker.
-///
-/// \param tieBreaker
-
-void QXmppIceComponent::setTieBreaker(const QByteArray &tieBreaker)
-{
- d->tieBreaker = tieBreaker;
-}
-
-/// Sets the local password.
-///
-/// \param password
-
-void QXmppIceComponent::setLocalPassword(const QString &password)
-{
- d->localPassword = password;
-}
-
/// Adds a remote STUN candidate.
bool QXmppIceComponent::addRemoteCandidate(const QXmppJingleCandidate &candidate)
@@ -2629,11 +2602,11 @@ void QXmppIceConnection::addComponent(int component)
QXmppIceComponent *socket = new QXmppIceComponent(this);
socket->setComponent(component);
socket->setIceControlling(d->iceControlling);
- socket->setLocalUser(d->localUser);
- socket->setLocalPassword(d->localPassword);
+ socket->d->localUser = d->localUser;
+ socket->d->localPassword = d->localPassword;
socket->setRemoteUser(d->remoteUser);
socket->setRemotePassword(d->remotePassword);
- socket->setTieBreaker(d->tieBreaker);
+ socket->d->tieBreaker = d->tieBreaker;
socket->setStunServer(d->stunHost, d->stunPort);
socket->setTurnServer(d->turnHost, d->turnPort);
socket->setTurnUser(d->turnUser);
@@ -2748,19 +2721,6 @@ QString QXmppIceConnection::localUser() const
return d->localUser;
}
-/// Sets the local user fragment.
-///
-/// You do not usually need to call this as one is automatically generated.
-///
-/// \param user
-
-void QXmppIceConnection::setLocalUser(const QString &user)
-{
- d->localUser = user;
- foreach (QXmppIceComponent *socket, d->components.values())
- socket->setLocalUser(user);
-}
-
/// Returns the local password.
QString QXmppIceConnection::localPassword() const
@@ -2768,19 +2728,6 @@ QString QXmppIceConnection::localPassword() const
return d->localPassword;
}
-/// Sets the local password.
-///
-/// You do not usually need to call this as one is automatically generated.
-///
-/// \param password
-
-void QXmppIceConnection::setLocalPassword(const QString &password)
-{
- d->localPassword = password;
- foreach (QXmppIceComponent *socket, d->components.values())
- socket->setLocalPassword(password);
-}
-
/// Sets the remote user fragment.
///
/// \param user