diff options
| author | Linus Jahn <lnj@kaidan.im> | 2021-04-02 17:45:17 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2021-04-06 15:47:48 +0200 |
| commit | 57f19e416d80b1ea10bf2a4b1747772768df05e2 (patch) | |
| tree | 2b8e037abbdc5c0a4abbd7d38b1a2d861e707446 /src/base | |
| parent | d2633da630ccc32d791f69e10744758a8c177128 (diff) | |
| download | qxmpp-57f19e416d80b1ea10bf2a4b1747772768df05e2.tar.gz | |
doc: Fix warnings from QXmppNonSASLAuthIq
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/QXmppNonSASLAuth.cpp | 34 | ||||
| -rw-r--r-- | src/base/QXmppNonSASLAuth.h | 8 |
2 files changed, 35 insertions, 7 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; 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 |
