summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-25 16:14:50 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-25 16:14:50 (GMT)
commitfe1c7fc8a8b1eb29f92795d760bbfc8f3cf618e8 (patch)
treeb634cdfe6928bcd110fe316a926f2e2785fbd7e7 /Swiften
parentd23f3046f26b75e84245b3cb1aa50c14fb534b33 (diff)
downloadswift-fe1c7fc8a8b1eb29f92795d760bbfc8f3cf618e8.zip
swift-fe1c7fc8a8b1eb29f92795d760bbfc8f3cf618e8.tar.bz2
Add status annotation for each of the status types when changing status.
Resolves: #383
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/StatusShow.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Swiften/Elements/StatusShow.h b/Swiften/Elements/StatusShow.h
index 0501bf6..747ddf1 100644
--- a/Swiften/Elements/StatusShow.h
+++ b/Swiften/Elements/StatusShow.h
@@ -8,6 +8,7 @@
#define SWIFTEN_StatusShow_H
#include "Swiften/Elements/Payload.h"
+#include "Swiften/Base/String.h"
namespace Swift {
class StatusShow : public Payload {
@@ -25,6 +26,18 @@ namespace Swift {
return type_;
}
+ static String typeToFriendlyName(Type type) {
+ switch (type) {
+ case Online: return "Available";
+ case FFC: return "Available";
+ case Away: return "Away";
+ case XA: return "Away";
+ case DND: return "Busy";
+ case None: return "Offline";
+ }
+ return "Unknown";
+ }
+
private:
Type type_;
};