diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 12:57:00 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 12:57:00 +0200 |
| commit | d6694d3db35a553c8930bba083fcc3f5ed4ff124 (patch) | |
| tree | 205f486d741efc9d0b7bb0a604bbf6f6ebc1c407 /src/base | |
| parent | 6c82a7dd1f6290df5a0d54dcda8e5d57ee2d9c43 (diff) | |
| download | qxmpp-d6694d3db35a553c8930bba083fcc3f5ed4ff124.tar.gz | |
add simpler accessors for QXmppPresence priority / statusText
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/QXmppPresence.cpp | 30 | ||||
| -rw-r--r-- | src/base/QXmppPresence.h | 6 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/base/QXmppPresence.cpp b/src/base/QXmppPresence.cpp index 6351bac8..780ec532 100644 --- a/src/base/QXmppPresence.cpp +++ b/src/base/QXmppPresence.cpp @@ -51,6 +51,36 @@ QXmppPresence::~QXmppPresence() } +/// Returns the priority level of the resource. + +int QXmppPresence::priority() const +{ + return m_status.priority(); +} + +/// Sets the \a priority level of the resource. + +void QXmppPresence::setPriority(int priority) +{ + m_status.setPriority(priority); +} + +/// Returns the status text, a textual description of the user's status. + +QString QXmppPresence::statusText() const +{ + return m_status.statusText(); +} + +/// Sets the status text, a textual description of the user's status. +/// +/// \param str The status text, for example "Gone fishing". + +void QXmppPresence::setStatusText(const QString& statusText) +{ + m_status.setStatusText(statusText); +} + /// Returns the presence type. /// /// You can use this method to determine the action which needs to be diff --git a/src/base/QXmppPresence.h b/src/base/QXmppPresence.h index fe6710a9..e327a75b 100644 --- a/src/base/QXmppPresence.h +++ b/src/base/QXmppPresence.h @@ -109,6 +109,9 @@ public: const QXmppPresence::Status& status = QXmppPresence::Status()); ~QXmppPresence(); + int priority() const; + void setPriority(int priority); + QXmppPresence::Type type() const; void setType(QXmppPresence::Type); @@ -116,6 +119,9 @@ public: const QXmppPresence::Status& status() const; void setStatus(const QXmppPresence::Status&); + QString statusText() const; + void setStatusText(const QString& statusText); + /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; |
