aboutsummaryrefslogtreecommitdiff
path: root/src/QXmppCallManager.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-12-06 09:16:44 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-12-06 09:16:44 +0000
commite207ab2c6fbdf046129978d812936af9d34c302f (patch)
tree73dec16b42e245023ffac39aa13ca78b0205b0c4 /src/QXmppCallManager.cpp
parentdab9a269c17e0c8ab26f8c295afecef45dc23915 (diff)
downloadqxmpp-e207ab2c6fbdf046129978d812936af9d34c302f.tar.gz
improve STUN / ICE code documentation
Diffstat (limited to 'src/QXmppCallManager.cpp')
-rw-r--r--src/QXmppCallManager.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/QXmppCallManager.cpp b/src/QXmppCallManager.cpp
index e4b628ee..d2627ca9 100644
--- a/src/QXmppCallManager.cpp
+++ b/src/QXmppCallManager.cpp
@@ -93,7 +93,7 @@ QXmppCall::QXmppCall(const QString &jid, QXmppCall::Direction direction, QObject
//d->connection->setStunServer("stun.ekiga.net");
d->connection->addComponent(RTP_COMPONENT);
d->connection->addComponent(RTCP_COMPONENT);
- d->connection->bind(QXmppStunSocket::discoverAddresses());
+ d->connection->bind(QXmppIceComponent::discoverAddresses());
bool check = connect(d->connection, SIGNAL(localCandidatesChanged()),
this, SIGNAL(localCandidatesChanged()));
@@ -107,15 +107,16 @@ QXmppCall::QXmppCall(const QString &jid, QXmppCall::Direction direction, QObject
this, SLOT(hangup()));
Q_ASSERT(check);
- check = connect(d->connection, SIGNAL(datagramReceived(int,QByteArray)),
- this, SLOT(datagramReceived(int,QByteArray)));
- Q_ASSERT(check);
-
// RTP channel
d->audioChannel = new QXmppRtpChannel(this);
+ QXmppIceComponent *rtpComponent = d->connection->component(RTP_COMPONENT);
+
+ check = connect(rtpComponent, SIGNAL(datagramReceived(QByteArray)),
+ d->audioChannel, SLOT(datagramReceived(QByteArray)));
+ Q_ASSERT(check);
check = connect(d->audioChannel, SIGNAL(sendDatagram(QByteArray)),
- this, SLOT(sendDatagram(QByteArray)));
+ rtpComponent, SLOT(sendDatagram(QByteArray)));
Q_ASSERT(check);
}
@@ -202,17 +203,6 @@ void QXmppCall::updateOpenMode()
}
}
-void QXmppCall::datagramReceived(int component, const QByteArray &buffer)
-{
- if (component == RTP_COMPONENT)
- d->audioChannel->datagramReceived(buffer);
-}
-
-void QXmppCall::sendDatagram(const QByteArray &buffer)
-{
- d->connection->writeDatagram(RTP_COMPONENT, buffer);
-}
-
/// Returns the call's session identifier.
///