summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/StatusShow.h')
-rw-r--r--Swiften/Elements/StatusShow.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Swiften/Elements/StatusShow.h b/Swiften/Elements/StatusShow.h
index 747ddf1..1bdae96 100644
--- a/Swiften/Elements/StatusShow.h
+++ b/Swiften/Elements/StatusShow.h
@@ -38,6 +38,22 @@ namespace Swift {
return "Unknown";
}
+ /**
+ * Can be used for rough ordering of Types.
+ * Greater magnitude = more available.
+ */
+ static int typeToAvailabilityOrdering(Type type) {
+ switch (type) {
+ case Online: return 4;
+ case FFC: return 5;
+ case Away: return 2;
+ case XA: return 1;
+ case DND: return 3;
+ case None: return 0;
+ }
+ return -1;
+ }
+
private:
Type type_;
};