From 175fb8b883af4edfcfb4ff3dd2c1fb29dfdf3ceb Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 21 Jul 2012 18:34:27 +0200 Subject: doc fixes --- src/base/QXmppNonSASLAuth.cpp | 61 ++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'src/base/QXmppNonSASLAuth.cpp') 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 -- cgit v1.2.3