aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2021-03-27 16:28:08 +0100
committerLinus Jahn <lnj@kaidan.im>2021-03-28 00:09:13 +0100
commit52b509a9703a67819193de8482552ed9894f834d (patch)
treee07b78d161ad8476c15020a95616dead732fb6c2 /src/client
parentd2ffa95c4df9aeadea6acaac30471ffc55b72d98 (diff)
downloadqxmpp-52b509a9703a67819193de8482552ed9894f834d.tar.gz
doc: Fix most of the warnings from QXmppCall classes
Diffstat (limited to 'src/client')
-rw-r--r--src/client/QXmppCall.cpp44
-rw-r--r--src/client/QXmppCall.h7
-rw-r--r--src/client/QXmppCallManager.cpp38
-rw-r--r--src/client/QXmppCallStream.cpp12
-rw-r--r--src/client/QXmppCallStream.h6
-rw-r--r--src/client/QXmppCall_p.h1
6 files changed, 71 insertions, 37 deletions
diff --git a/src/client/QXmppCall.cpp b/src/client/QXmppCall.cpp
index 55732e77..a3dec654 100644
--- a/src/client/QXmppCall.cpp
+++ b/src/client/QXmppCall.cpp
@@ -39,6 +39,7 @@
#include <QDomElement>
#include <QTimer>
+/// \cond
QXmppCallPrivate::QXmppCallPrivate(QXmppCall *qq)
: direction(QXmppCall::IncomingDirection),
manager(0),
@@ -490,9 +491,9 @@ QXmppJingleIq::Content QXmppCallPrivate::localContent(QXmppCallStream *stream) c
return content;
}
+///
/// Sends an acknowledgement for a Jingle IQ.
///
-
bool QXmppCallPrivate::sendAck(const QXmppJingleIq &iq)
{
QXmppIq ack;
@@ -518,9 +519,9 @@ bool QXmppCallPrivate::sendInvite()
return sendRequest(iq);
}
+///
/// Sends a Jingle IQ and adds it to outstanding requests.
///
-
bool QXmppCallPrivate::sendRequest(const QXmppJingleIq &iq)
{
requests << iq;
@@ -540,8 +541,9 @@ void QXmppCallPrivate::setState(QXmppCall::State newState)
}
}
+///
/// Request graceful call termination
-
+///
void QXmppCallPrivate::terminate(QXmppJingleIq::Reason::Type reasonType)
{
if (state == QXmppCall::DisconnectingState ||
@@ -561,6 +563,15 @@ void QXmppCallPrivate::terminate(QXmppJingleIq::Reason::Type reasonType)
// schedule forceful termination in 5s
QTimer::singleShot(5000, q, SLOT(terminated()));
}
+/// \endcond
+
+///
+/// \class QXmppCall
+///
+/// The QXmppCall class represents a Voice-Over-IP call to a remote party.
+///
+/// \note THIS API IS NOT FINALIZED YET
+///
QXmppCall::QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent)
: QXmppLoggable(parent)
@@ -577,9 +588,9 @@ QXmppCall::~QXmppCall()
delete d;
}
+///
/// Call this method if you wish to accept an incoming call.
///
-
void QXmppCall::accept()
{
if (d->direction == IncomingDirection && d->state == ConnectingState) {
@@ -604,28 +615,31 @@ void QXmppCall::accept()
}
}
+///
/// Returns the GStreamer pipeline.
///
/// \since QXmpp 1.3
-
+///
GstElement *QXmppCall::pipeline() const
{
return d->pipeline;
}
+///
/// Returns the RTP stream for the audio data.
///
/// \since QXmpp 1.3
-
+///
QXmppCallStream *QXmppCall::audioStream() const
{
return d->findStreamByMedia(AUDIO_MEDIA);
}
+///
/// Returns the RTP stream for the video data.
///
/// \since QXmpp 1.3
-
+///
QXmppCallStream *QXmppCall::videoStream() const
{
return d->findStreamByMedia(VIDEO_MEDIA);
@@ -642,25 +656,25 @@ void QXmppCall::terminated()
d->setState(QXmppCall::FinishedState);
}
+///
/// Returns the call's direction.
///
-
QXmppCall::Direction QXmppCall::direction() const
{
return d->direction;
}
+///
/// Hangs up the call.
///
-
void QXmppCall::hangup()
{
d->terminate(QXmppJingleIq::Reason::None);
}
+///
/// Sends a transport-info to inform the remote party of new local candidates.
///
-
void QXmppCall::localCandidatesChanged()
{
// find the stream
@@ -684,33 +698,35 @@ void QXmppCall::localCandidatesChanged()
d->sendRequest(iq);
}
+///
/// Returns the remote party's JID.
///
-
QString QXmppCall::jid() const
{
return d->jid;
}
+///
/// Returns the call's session identifier.
///
-
QString QXmppCall::sid() const
{
return d->sid;
}
+///
/// Returns the call's state.
///
/// \sa stateChanged()
-
+///
QXmppCall::State QXmppCall::state() const
{
return d->state;
}
+///
/// Starts sending video to the remote party.
-
+///
void QXmppCall::addVideo()
{
if (d->state != QXmppCall::ActiveState) {
diff --git a/src/client/QXmppCall.h b/src/client/QXmppCall.h
index aea1bc4a..f0ce620f 100644
--- a/src/client/QXmppCall.h
+++ b/src/client/QXmppCall.h
@@ -36,15 +36,14 @@ class QXmppCallPrivate;
class QXmppCallManager;
class QXmppCallManagerPrivate;
-/// \brief The QXmppCall class represents a Voice-Over-IP call to a remote party.
-///
-/// \note THIS API IS NOT FINALIZED YET
-
class QXMPP_EXPORT QXmppCall : public QXmppLoggable
{
Q_OBJECT
+ /// The call's direction
Q_PROPERTY(Direction direction READ direction CONSTANT)
+ /// The remote party's JID
Q_PROPERTY(QString jid READ jid CONSTANT)
+ /// The call's state
Q_PROPERTY(State state READ state NOTIFY stateChanged)
public:
diff --git a/src/client/QXmppCallManager.cpp b/src/client/QXmppCallManager.cpp
index 788f1bd1..756b4209 100644
--- a/src/client/QXmppCallManager.cpp
+++ b/src/client/QXmppCallManager.cpp
@@ -37,6 +37,7 @@
#include <QDomElement>
#include <QTimer>
+/// \cond
QXmppCallManagerPrivate::QXmppCallManagerPrivate(QXmppCallManager *qq)
: turnPort(0),
q(qq)
@@ -60,18 +61,20 @@ QXmppCall *QXmppCallManagerPrivate::findCall(const QString &sid, QXmppCall::Dire
return call;
return nullptr;
}
+/// \endcond
+///
/// Constructs a QXmppCallManager object to handle incoming and outgoing
/// Voice-Over-IP calls.
///
-
QXmppCallManager::QXmppCallManager()
{
d = new QXmppCallManagerPrivate(this);
}
+///
/// Destroys the QXmppCallManager object.
-
+///
QXmppCallManager::~QXmppCallManager()
{
delete d;
@@ -119,10 +122,11 @@ void QXmppCallManager::setClient(QXmppClient *client)
}
/// \endcond
+///
/// Initiates a new outgoing call to the specified recipient.
///
/// \param jid
-
+///
QXmppCall *QXmppCallManager::call(const QString &jid)
{
@@ -152,6 +156,7 @@ QXmppCall *QXmppCallManager::call(const QString &jid)
return call;
}
+///
/// Sets multiple STUN servers to use to determine server-reflexive addresses
/// and ports.
///
@@ -160,12 +165,13 @@ QXmppCall *QXmppCallManager::call(const QString &jid)
/// \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.
///
@@ -173,60 +179,65 @@ void QXmppCallManager::setStunServers(const QList<QPair<QHostAddress, quint16>>
///
/// \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->stunServers.clear();
d->stunServers.push_back(QPair<QHostAddress, quint16>(host, port));
}
+///
/// Sets the TURN server to use to relay packets in double-NAT configurations.
///
/// \param host The address of the TURN server.
/// \param port The port of the TURN server.
-
+///
void QXmppCallManager::setTurnServer(const QHostAddress &host, quint16 port)
{
d->turnHost = host;
d->turnPort = port;
}
+///
/// Sets the \a user used for authentication with the TURN server.
///
/// \param user
-
+///
void QXmppCallManager::setTurnUser(const QString &user)
{
d->turnUser = user;
}
+///
/// Sets the \a password used for authentication with the TURN server.
///
/// \param password
-
+///
void QXmppCallManager::setTurnPassword(const QString &password)
{
d->turnPassword = password;
}
+///
/// Handles call destruction.
-
+///
void QXmppCallManager::_q_callDestroyed(QObject *object)
{
d->calls.removeAll(static_cast<QXmppCall *>(object));
}
+///
/// Handles disconnection from server.
-
+///
void QXmppCallManager::_q_disconnected()
{
for (auto *call : d->calls)
call->d->terminate(QXmppJingleIq::Reason::Gone);
}
+///
/// Handles acknowledgements.
///
-
void QXmppCallManager::_q_iqReceived(const QXmppIq &ack)
{
if (ack.type() != QXmppIq::Result)
@@ -237,9 +248,9 @@ void QXmppCallManager::_q_iqReceived(const QXmppIq &ack)
call->d->handleAck(ack);
}
+///
/// Handles a Jingle IQ.
///
-
void QXmppCallManager::_q_jingleIqReceived(const QXmppJingleIq &iq)
{
@@ -301,8 +312,9 @@ void QXmppCallManager::_q_jingleIqReceived(const QXmppJingleIq &iq)
}
}
+///
/// Handles a presence.
-
+///
void QXmppCallManager::_q_presenceReceived(const QXmppPresence &presence)
{
if (presence.type() != QXmppPresence::Unavailable)
diff --git a/src/client/QXmppCallStream.cpp b/src/client/QXmppCallStream.cpp
index 8729f4b0..f96188d5 100644
--- a/src/client/QXmppCallStream.cpp
+++ b/src/client/QXmppCallStream.cpp
@@ -35,6 +35,7 @@
#include <gst/gst.h>
+/// \cond
QXmppCallStreamPrivate::QXmppCallStreamPrivate(QXmppCallStream *parent, GstElement *pipeline_,
GstElement *rtpbin_, QString media_, QString creator_,
QString name_, int id_)
@@ -326,6 +327,17 @@ void QXmppCallStreamPrivate::addRtcpSender(GstPad *pad)
qFatal("Failed to link rtcp pads");
}
}
+/// \endcond
+
+///
+/// \class QXmppCallStream
+///
+/// The QXmppCallStream class represents an RTP stream in a VoIP call.
+///
+/// \note THIS API IS NOT FINALIZED YET
+///
+/// \since QXmpp 1.3
+///
QXmppCallStream::QXmppCallStream(GstElement *pipeline, GstElement *rtpbin,
QString media, QString creator, QString name, int id)
diff --git a/src/client/QXmppCallStream.h b/src/client/QXmppCallStream.h
index 4fb06a1b..8db39683 100644
--- a/src/client/QXmppCallStream.h
+++ b/src/client/QXmppCallStream.h
@@ -38,12 +38,6 @@ class QXmppIceConnection;
class QXmppCall;
class QXmppCallPrivate;
-/// \brief The QXmppCallStream class represents an RTP stream in a VoIP call.
-///
-/// \note THIS API IS NOT FINALIZED YET
-///
-/// \since QXmpp 1.3
-
class QXMPP_EXPORT QXmppCallStream : public QObject
{
Q_OBJECT
diff --git a/src/client/QXmppCall_p.h b/src/client/QXmppCall_p.h
index 69c01409..b3bb2bd4 100644
--- a/src/client/QXmppCall_p.h
+++ b/src/client/QXmppCall_p.h
@@ -31,6 +31,7 @@
#include <QList>
+//
// W A R N I N G
// -------------
//