aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppPresence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppPresence.cpp')
-rw-r--r--src/base/QXmppPresence.cpp17
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