diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-12-10 11:12:27 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-12-10 11:12:27 +0000 |
| commit | b44d37dfff4d4883489ec635f043b4000318504d (patch) | |
| tree | 1c7c210ad99f55ae58b13a2a1f66bd32c56addfe /src/QXmppStanza.cpp | |
| parent | b4e7d210e9fa66c165828ce1adb36ce034b51b5d (diff) | |
| download | qxmpp-b44d37dfff4d4883489ec635f043b4000318504d.tar.gz | |
improve code documentation
Diffstat (limited to 'src/QXmppStanza.cpp')
| -rw-r--r-- | src/QXmppStanza.cpp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/QXmppStanza.cpp b/src/QXmppStanza.cpp index 4059db1b..bf098940 100644 --- a/src/QXmppStanza.cpp +++ b/src/QXmppStanza.cpp @@ -34,8 +34,7 @@ uint QXmppStanza::s_uniqeIdNo = 0; QXmppStanza::Error::Error(): m_code(0), m_type(static_cast<QXmppStanza::Error::Type>(-1)), - m_condition(static_cast<QXmppStanza::Error::Condition>(-1)), - m_text("") + m_condition(static_cast<QXmppStanza::Error::Condition>(-1)) { } @@ -294,12 +293,20 @@ void QXmppStanza::Error::toXml( QXmlStreamWriter *writer ) const writer->writeEndElement(); } +/// Constructs a QXmppStanza with the specified sender and recipient. +/// +/// \param from +/// \param to -QXmppStanza::QXmppStanza(const QString& from, const QString& to) : QXmppPacket(), -m_to(to), m_from(from) +QXmppStanza::QXmppStanza(const QString& from, const QString& to) + : QXmppPacket(), + m_to(to), + m_from(from) { } +/// Destroys a QXmppStanza. + QXmppStanza::~QXmppStanza() { } @@ -353,31 +360,51 @@ void QXmppStanza::setId(const QString& id) m_id = id; } +/// Returns the stanza's language. + QString QXmppStanza::lang() const { return m_lang; } +/// Sets the stanza's language. +/// +/// \param lang + void QXmppStanza::setLang(const QString& lang) { m_lang = lang; } +/// Returns the stanza's error. + QXmppStanza::Error QXmppStanza::error() const { return m_error; } +/// Sets the stanza's error. +/// +/// \param error + void QXmppStanza::setError(const QXmppStanza::Error& error) { m_error = error; } +/// Returns the stanza's "extensions". +/// +/// Extensions are XML elements which are not handled internally by QXmpp. + QXmppElementList QXmppStanza::extensions() const { return m_extensions; } +/// Sets the stanza's "extensions". +/// +/// \param extensions + void QXmppStanza::setExtensions(const QXmppElementList &extensions) { m_extensions = extensions; |
