summaryrefslogtreecommitdiff
path: root/TelepathyQt
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-04-13 15:35:22 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-04-13 17:36:43 +0300
commit2a9e3cc01ff743e9fa40bad32b43ded76726cea5 (patch)
tree8b381450c200aad6da8ac02d4d5029b382716e59 /TelepathyQt
parent0da6c17808341aacb3c303c49a88296febb031c3 (diff)
Presence: Add constructors for the rest of the possible presence statuses
Diffstat (limited to 'TelepathyQt')
-rw-r--r--TelepathyQt/presence.cpp10
-rw-r--r--TelepathyQt/presence.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/TelepathyQt/presence.cpp b/TelepathyQt/presence.cpp
index 52b4fdd7..823067dc 100644
--- a/TelepathyQt/presence.cpp
+++ b/TelepathyQt/presence.cpp
@@ -80,6 +80,11 @@ Presence Presence::available(const QString &statusMessage)
return Presence(ConnectionPresenceTypeAvailable, QLatin1String("available"), statusMessage);
}
+Presence Presence::chat(const QString &statusMessage)
+{
+ return Presence(ConnectionPresenceTypeAvailable, QLatin1String("chat"), statusMessage);
+}
+
Presence Presence::away(const QString &statusMessage)
{
return Presence(ConnectionPresenceTypeAway, QLatin1String("away"), statusMessage);
@@ -95,6 +100,11 @@ Presence Presence::busy(const QString &statusMessage)
return Presence(ConnectionPresenceTypeBusy, QLatin1String("busy"), statusMessage);
}
+Presence Presence::dnd(const QString &statusMessage)
+{
+ return Presence(ConnectionPresenceTypeBusy, QLatin1String("dnd"), statusMessage);
+}
+
Presence Presence::xa(const QString &statusMessage)
{
return Presence(ConnectionPresenceTypeExtendedAway, QLatin1String("xa"), statusMessage);
diff --git a/TelepathyQt/presence.h b/TelepathyQt/presence.h
index 5f229f3c..26c18974 100644
--- a/TelepathyQt/presence.h
+++ b/TelepathyQt/presence.h
@@ -43,9 +43,11 @@ public:
~Presence();
static Presence available(const QString &statusMessage = QString());
+ static Presence chat(const QString &statusMessage = QString());
static Presence away(const QString &statusMessage = QString());
static Presence brb(const QString &statusMessage = QString());
static Presence busy(const QString &statusMessage = QString());
+ static Presence dnd(const QString &statusMessage = QString());
static Presence xa(const QString &statusMessage = QString());
static Presence hidden(const QString &statusMessage = QString());
static Presence offline(const QString &statusMessage = QString());