summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-01 09:27:01 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-01 09:27:01 (GMT)
commit1d7b76386202c7df168c088c6acde96718b05975 (patch)
tree0fb9e57d2ff1048181391a74110867091aefb72a /Swiften/Elements/StatusShow.h
parent7dadfb1d53a789e0b81adfd86aac3e38a9e658a9 (diff)
downloadswift-1d7b76386202c7df168c088c6acde96718b05975.zip
swift-1d7b76386202c7df168c088c6acde96718b05975.tar.bz2
Include contact's status when you start a chat with them.
Resolves: #580
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_;
};