From c69757fe8d23001e5154febc29ec1bc05ad3cd59 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 21 Jul 2012 15:04:49 +0200 Subject: add QXmppPresence::availableStatusType() --- src/base/QXmppPresence.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/base/QXmppPresence.cpp') 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(m_status.type()); +} + +/// Sets the availability status type, for instance busy or away. + +void QXmppPresence::setAvailableStatusType(AvailableStatusType type) +{ + m_status.setType(static_cast(m_status.type())); +} + /// Returns the priority level of the resource. int QXmppPresence::priority() const -- cgit v1.2.3