diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 18:34:27 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 18:34:27 +0200 |
| commit | 175fb8b883af4edfcfb4ff3dd2c1fb29dfdf3ceb (patch) | |
| tree | bcb07029ee5318c3413dd9a5b02710591ae90d63 /src/base/QXmppNonSASLAuth.cpp | |
| parent | 255c1aabcd8d4e881f06ac55eadfc20274936df0 (diff) | |
| download | qxmpp-175fb8b883af4edfcfb4ff3dd2c1fb29dfdf3ceb.tar.gz | |
doc fixes
Diffstat (limited to 'src/base/QXmppNonSASLAuth.cpp')
| -rw-r--r-- | src/base/QXmppNonSASLAuth.cpp | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/src/base/QXmppNonSASLAuth.cpp b/src/base/QXmppNonSASLAuth.cpp index 161cc1fe..66e97af2 100644 --- a/src/base/QXmppNonSASLAuth.cpp +++ b/src/base/QXmppNonSASLAuth.cpp @@ -34,36 +34,6 @@ QXmppNonSASLAuthIq::QXmppNonSASLAuthIq() { } -bool QXmppNonSASLAuthIq::isNonSASLAuthIq(const QDomElement &element) -{ - QDomElement queryElement = element.firstChildElement("query"); - return queryElement.namespaceURI() == ns_auth; -} - -void QXmppNonSASLAuthIq::parseElementFromChild(const QDomElement &element) -{ - QDomElement queryElement = element.firstChildElement("query"); - m_username = queryElement.firstChildElement("username").text(); - m_password = queryElement.firstChildElement("password").text(); - m_digest = QByteArray::fromHex(queryElement.firstChildElement("digest").text().toAscii()); - m_resource = queryElement.firstChildElement("resource").text(); -} - -void QXmppNonSASLAuthIq::toXmlElementFromChild(QXmlStreamWriter *writer) const -{ - writer->writeStartElement("query"); - writer->writeAttribute("xmlns", ns_auth); - if (!m_username.isEmpty()) - writer->writeTextElement("username", m_username); - if (!m_digest.isEmpty()) - writer->writeTextElement("digest", m_digest.toHex()); - if (!m_password.isEmpty()) - writer->writeTextElement("password", m_password); - if (!m_resource.isEmpty()) - writer->writeTextElement("resource", m_resource); - writer->writeEndElement(); -} - QString QXmppNonSASLAuthIq::username() const { return m_username; @@ -104,3 +74,34 @@ void QXmppNonSASLAuthIq::setResource(const QString &resource) m_resource = resource; } +/// \cond +bool QXmppNonSASLAuthIq::isNonSASLAuthIq(const QDomElement &element) +{ + QDomElement queryElement = element.firstChildElement("query"); + return queryElement.namespaceURI() == ns_auth; +} + +void QXmppNonSASLAuthIq::parseElementFromChild(const QDomElement &element) +{ + QDomElement queryElement = element.firstChildElement("query"); + m_username = queryElement.firstChildElement("username").text(); + m_password = queryElement.firstChildElement("password").text(); + m_digest = QByteArray::fromHex(queryElement.firstChildElement("digest").text().toAscii()); + m_resource = queryElement.firstChildElement("resource").text(); +} + +void QXmppNonSASLAuthIq::toXmlElementFromChild(QXmlStreamWriter *writer) const +{ + writer->writeStartElement("query"); + writer->writeAttribute("xmlns", ns_auth); + if (!m_username.isEmpty()) + writer->writeTextElement("username", m_username); + if (!m_digest.isEmpty()) + writer->writeTextElement("digest", m_digest.toHex()); + if (!m_password.isEmpty()) + writer->writeTextElement("password", m_password); + if (!m_resource.isEmpty()) + writer->writeTextElement("resource", m_resource); + writer->writeEndElement(); +} +/// \endcond |
