aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppByteStreamIq.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-09-10 12:22:17 +0200
committerLinus Jahn <lnj@kaidan.im>2022-09-10 12:23:14 +0200
commit5f3c35655b73f329378f20f71985ba3892e96c67 (patch)
tree09b0d4fb37ef1cfd884ec8d4dc492f0eb2964941 /src/base/QXmppByteStreamIq.cpp
parent31266d9737d2914729be126c145da8b58de01154 (diff)
downloadqxmpp-5f3c35655b73f329378f20f71985ba3892e96c67.tar.gz
ByteStreamIq: Add missing documentation
I hope the descriptions are okay. I haven't fully read and understood the XEP. I'm open for improvements.
Diffstat (limited to 'src/base/QXmppByteStreamIq.cpp')
-rw-r--r--src/base/QXmppByteStreamIq.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/base/QXmppByteStreamIq.cpp b/src/base/QXmppByteStreamIq.cpp
index 84fad3ec..af1ebb4b 100644
--- a/src/base/QXmppByteStreamIq.cpp
+++ b/src/base/QXmppByteStreamIq.cpp
@@ -10,6 +10,12 @@
#include <QDomElement>
///
+/// \enum QXmppByteStreamIq::Mode
+///
+/// Used to select the transport layer protocol (TCP or UDP).
+///
+
+///
/// \class QXmppByteStreamIq::StreamHost
///
/// StreamHost represents information about a specific SOCKS5 bytestreams host.
@@ -63,11 +69,17 @@ void QXmppByteStreamIq::StreamHost::setPort(quint16 port)
m_port = port;
}
+///
+/// Returns the zero-configuration service available for bytestreaming.
+///
QString QXmppByteStreamIq::StreamHost::zeroconf() const
{
return m_zeroconf;
}
+///
+/// Sets the zero-configuration service available for bytestreaming.
+///
void QXmppByteStreamIq::StreamHost::setZeroconf(const QString &zeroconf)
{
m_zeroconf = zeroconf;
@@ -96,21 +108,33 @@ void QXmppByteStreamIq::setMode(QXmppByteStreamIq::Mode mode)
m_mode = mode;
}
+///
+/// Returns the bytestream stream ID.
+///
QString QXmppByteStreamIq::sid() const
{
return m_sid;
}
+///
+/// Sets the bytestream stream ID.
+///
void QXmppByteStreamIq::setSid(const QString &sid)
{
m_sid = sid;
}
+///
+/// Returns the jid of the target.
+///
QString QXmppByteStreamIq::activate() const
{
return m_activate;
}
+///
+/// Sets the jid of the target.
+///
void QXmppByteStreamIq::setActivate(const QString &activate)
{
m_activate = activate;
@@ -148,12 +172,15 @@ void QXmppByteStreamIq::setStreamHostUsed(const QString &jid)
m_streamHostUsed = jid;
}
-/// \cond
+///
+/// Returns whether \a element is an IQ element with a bytestream query.
+///
bool QXmppByteStreamIq::isByteStreamIq(const QDomElement &element)
{
return element.firstChildElement(QStringLiteral("query")).namespaceURI() == ns_bytestreams;
}
+/// \cond
void QXmppByteStreamIq::parseElementFromChild(const QDomElement &element)
{
auto queryElement = element.firstChildElement(QStringLiteral("query"));