aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppNonSASLAuth.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2021-04-02 17:45:17 +0200
committerLinus Jahn <lnj@kaidan.im>2021-04-06 15:47:48 +0200
commit57f19e416d80b1ea10bf2a4b1747772768df05e2 (patch)
tree2b8e037abbdc5c0a4abbd7d38b1a2d861e707446 /src/base/QXmppNonSASLAuth.cpp
parentd2633da630ccc32d791f69e10744758a8c177128 (diff)
downloadqxmpp-57f19e416d80b1ea10bf2a4b1747772768df05e2.tar.gz
doc: Fix warnings from QXmppNonSASLAuthIq
Diffstat (limited to 'src/base/QXmppNonSASLAuth.cpp')
-rw-r--r--src/base/QXmppNonSASLAuth.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/base/QXmppNonSASLAuth.cpp b/src/base/QXmppNonSASLAuth.cpp
index 415909fa..527079d1 100644
--- a/src/base/QXmppNonSASLAuth.cpp
+++ b/src/base/QXmppNonSASLAuth.cpp
@@ -30,46 +30,80 @@
#include <QDomElement>
#include <QXmlStreamWriter>
+///
+/// \class QXmppNonSASLAuthIq
+///
+/// QXmppNonSASLAuthIq represents a Non-SASL authentication IQ as defined by
+/// \xep{0078, Non-SASL Authentication}.
+///
+/// \ingroup Stanzas
+///
+
QXmppNonSASLAuthIq::QXmppNonSASLAuthIq()
: QXmppIq(QXmppIq::Set)
{
}
+///
+/// Returns the username of the account
+///
QString QXmppNonSASLAuthIq::username() const
{
return m_username;
}
+///
+/// Sets the username of the account
+///
void QXmppNonSASLAuthIq::setUsername(const QString &username)
{
m_username = username;
}
+///
+/// Returns the SHA1 hash of the concatenated string
+///
QByteArray QXmppNonSASLAuthIq::digest() const
{
return m_digest;
}
+///
+/// Sets the digest by creating a hash of the concatenation of streamId and
+/// password.
+///
void QXmppNonSASLAuthIq::setDigest(const QString &streamId, const QString &password)
{
m_digest = QCryptographicHash::hash(streamId.toUtf8() + password.toUtf8(), QCryptographicHash::Sha1);
}
+///
+/// Returns the username of the account in plaintext
+///
QString QXmppNonSASLAuthIq::password() const
{
return m_password;
}
+///
+/// Sets the username of the account in plaintext
+///
void QXmppNonSASLAuthIq::setPassword(const QString &password)
{
m_password = password;
}
+///
+/// Returns the resource to bind to
+///
QString QXmppNonSASLAuthIq::resource() const
{
return m_resource;
}
+///
+/// Sets the resource to bind to
+///
void QXmppNonSASLAuthIq::setResource(const QString &resource)
{
m_resource = resource;