From 21462f9d51e567bd72f3a86cb38423249fea4dab Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sun, 18 Jul 2010 12:23:22 +0000 Subject: improve code documentation --- source/QXmppMessage.cpp | 64 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 16 deletions(-) (limited to 'source/QXmppMessage.cpp') diff --git a/source/QXmppMessage.cpp b/source/QXmppMessage.cpp index 97f4d402..b5b7f8fa 100644 --- a/source/QXmppMessage.cpp +++ b/source/QXmppMessage.cpp @@ -54,6 +54,26 @@ QXmppMessage::~QXmppMessage() } +/// Returns the message's body. +/// + +QString QXmppMessage::body() const +{ + return m_body; +} + +/// Sets the message's body. +/// +/// \param body + +void QXmppMessage::setBody(const QString& body) +{ + m_body = body; +} + +/// Returns the message's type. +/// + QXmppMessage::Type QXmppMessage::type() const { return m_type; @@ -79,6 +99,10 @@ QString QXmppMessage::getTypeStr() const } } +/// Sets the message's type. +/// +/// \param type + void QXmppMessage::setType(QXmppMessage::Type type) { m_type = type; @@ -125,29 +149,34 @@ void QXmppMessage::setTypeFromStr(const QString& str) } } -/// Returns the message timestamp (if any). -/// -/// XEP-0091: Legacy Delayed Delivery +/// Returns the message's timestamp (if any). QDateTime QXmppMessage::stamp() const { return m_stamp; } -/// Sets the message timestamp. +/// Sets the message's timestamp. /// -/// XEP-0091: Legacy Delayed Delivery +/// \param stamp void QXmppMessage::setStamp(const QDateTime &stamp) { m_stamp = stamp; } +/// Returns the message's chat state. +/// + QXmppMessage::State QXmppMessage::state() const { return m_state; } +/// Sets the message's chat state. +/// +/// \param state + void QXmppMessage::setState(QXmppMessage::State state) { m_state = state; @@ -256,31 +285,34 @@ void QXmppMessage::toXml(QXmlStreamWriter *xmlWriter) const xmlWriter->writeEndElement(); } -QString QXmppMessage::body() const -{ - return m_body; -} - -void QXmppMessage::setBody(const QString& body) -{ - m_body = body; -} +/// Returns the message's subject. +/// QString QXmppMessage::subject() const { return m_subject; } -void QXmppMessage::setSubject(const QString& sub) +/// Sets the message's subject. +/// +/// \param subject + +void QXmppMessage::setSubject(const QString& subject) { - m_subject = sub; + m_subject = subject; } +/// Returns the message's thread. + QString QXmppMessage::thread() const { return m_thread; } +/// Sets the message's thread. +/// +/// \param thread + void QXmppMessage::setThread(const QString& thread) { m_thread = thread; -- cgit v1.2.3