diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-07-18 12:23:22 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-07-18 12:23:22 +0000 |
| commit | 21462f9d51e567bd72f3a86cb38423249fea4dab (patch) | |
| tree | c9aad5bbeea39aaeee469875f2fe979e822c4986 /source/QXmppMessage.h | |
| parent | 9c08abcff13bb568aa0825b67ac0cdf66b756798 (diff) | |
| download | qxmpp-21462f9d51e567bd72f3a86cb38423249fea4dab.tar.gz | |
improve code documentation
Diffstat (limited to 'source/QXmppMessage.h')
| -rw-r--r-- | source/QXmppMessage.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/source/QXmppMessage.h b/source/QXmppMessage.h index 60bbad60..bf258f53 100644 --- a/source/QXmppMessage.h +++ b/source/QXmppMessage.h @@ -36,6 +36,7 @@ class QXmppMessage : public QXmppStanza { public: + /// This enum described a message type. enum Type { Error = 0, @@ -45,8 +46,8 @@ public: Headline }; - // XEP-0085 : Chat State Notifications - // http://xmpp.org/extensions/xep-0085.html + /// This enum describes a chat state as defined by + /// XEP-0085 : Chat State Notifications. enum State { None = 0, @@ -57,19 +58,12 @@ public: Paused, }; - /// Type of the message timestamp. - enum StampType - { - LegacyDelayedDelivery, ///< XEP-0091: Legacy Delayed Delivery - DelayedDelivery, ///< XEP-0203: Delayed Delivery - }; - QXmppMessage(const QString& from = "", const QString& to = "", const QString& body = "", const QString& thread = ""); ~QXmppMessage(); - QXmppMessage::Type type() const; - void setType(QXmppMessage::Type); + QString body() const; + void setBody(const QString&); QDateTime stamp() const; void setStamp(const QDateTime &stamp); @@ -77,20 +71,20 @@ public: QXmppMessage::State state() const; void setState(QXmppMessage::State); - QString body() const; - void setBody(const QString&); - QString subject() const; void setSubject(const QString&); QString thread() const; void setThread(const QString&); + QXmppMessage::Type type() const; + void setType(QXmppMessage::Type); + + /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; // deprecated accessors, use the form without "get" instead - /// \cond QXmppMessage::Type Q_DECL_DEPRECATED getType() const; QXmppMessage::State Q_DECL_DEPRECATED getState() const; QString Q_DECL_DEPRECATED getBody() const; @@ -99,6 +93,13 @@ public: /// \endcond private: + /// This enum describe a type of message timestamp. + enum StampType + { + LegacyDelayedDelivery, ///< XEP-0091: Legacy Delayed Delivery + DelayedDelivery, ///< XEP-0203: Delayed Delivery + }; + QString getTypeStr() const; void setTypeFromStr(const QString&); |
