diff options
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Elements/StatusShow.h | 13 |
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_; }; |