From 57f19e416d80b1ea10bf2a4b1747772768df05e2 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Fri, 2 Apr 2021 17:45:17 +0200 Subject: doc: Fix warnings from QXmppNonSASLAuthIq --- src/base/QXmppNonSASLAuth.cpp | 34 ++++++++++++++++++++++++++++++++++ src/base/QXmppNonSASLAuth.h | 8 +------- 2 files changed, 35 insertions(+), 7 deletions(-) (limited to 'src/base') 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 #include +/// +/// \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; diff --git a/src/base/QXmppNonSASLAuth.h b/src/base/QXmppNonSASLAuth.h index 322a18ba..31697dc7 100644 --- a/src/base/QXmppNonSASLAuth.h +++ b/src/base/QXmppNonSASLAuth.h @@ -26,12 +26,6 @@ #include "QXmppIq.h" -/// -/// \brief QXmppNonSASLAuthIq represents a Non-SASL authentication IQ as -/// defined by \xep{0078}: Non-SASL Authentication. -/// -/// \ingroup Stanzas -/// class QXMPP_EXPORT QXmppNonSASLAuthIq : public QXmppIq { public: @@ -49,10 +43,10 @@ public: QString resource() const; void setResource(const QString &resource); + /// \cond static bool isNonSASLAuthIq(const QDomElement &element); protected: - /// \cond void parseElementFromChild(const QDomElement &element) override; void toXmlElementFromChild(QXmlStreamWriter *writer) const override; /// \endcond -- cgit v1.2.3