diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 15:04:49 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-21 15:04:49 +0200 |
| commit | c69757fe8d23001e5154febc29ec1bc05ad3cd59 (patch) | |
| tree | 1b52df55f433c7eeac29c42a76ef0db8b8aae632 /src/base/QXmppPresence.cpp | |
| parent | d6694d3db35a553c8930bba083fcc3f5ed4ff124 (diff) | |
| download | qxmpp-c69757fe8d23001e5154febc29ec1bc05ad3cd59.tar.gz | |
add QXmppPresence::availableStatusType()
Diffstat (limited to 'src/base/QXmppPresence.cpp')
| -rw-r--r-- | src/base/QXmppPresence.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/base/QXmppPresence.cpp b/src/base/QXmppPresence.cpp index 780ec532..aaeb0395 100644 --- a/src/base/QXmppPresence.cpp +++ b/src/base/QXmppPresence.cpp @@ -51,6 +51,23 @@ QXmppPresence::~QXmppPresence() } +/// Returns the availability status type, for instance busy or away. +/// +/// This will not tell you whether a contact is connected, check whether +/// type() is QXmppPresence::Available instead. + +QXmppPresence::AvailableStatusType QXmppPresence::availableStatusType() const +{ + return static_cast<AvailableStatusType>(m_status.type()); +} + +/// Sets the availability status type, for instance busy or away. + +void QXmppPresence::setAvailableStatusType(AvailableStatusType type) +{ + m_status.setType(static_cast<QXmppPresence::Status::Type>(m_status.type())); +} + /// Returns the priority level of the resource. int QXmppPresence::priority() const |
