summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Notifier/Notifier.cpp')
-rw-r--r--SwifTools/Notifier/Notifier.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/SwifTools/Notifier/Notifier.cpp b/SwifTools/Notifier/Notifier.cpp
index 2c2cfe5..a976486 100644
--- a/SwifTools/Notifier/Notifier.cpp
+++ b/SwifTools/Notifier/Notifier.cpp
@@ -11,4 +11,34 @@ namespace Swift {
Notifier::~Notifier() {
}
+String Notifier::typeToString(Type type) {
+ switch (type) {
+ case ContactAvailable: return "Contact Becomes Available";
+ case ContactUnavailable: return "Contact Becomes Unavailable";
+ case ContactStatusChange: return "Contact Changes Status";
+ case IncomingMessage: return "Incoming Message";
+ case SystemMessage: return "System Message";
+ }
+ assert(false);
+ return "";
+}
+
+std::vector<Notifier::Type> Notifier::getAllTypes() {
+ std::vector<Type> result;
+ result.push_back(ContactAvailable);
+ result.push_back(ContactUnavailable);
+ result.push_back(ContactStatusChange);
+ result.push_back(IncomingMessage);
+ result.push_back(SystemMessage);
+ return result;
+}
+
+std::vector<Notifier::Type> Notifier::getDefaultTypes() {
+ std::vector<Type> result;
+ result.push_back(ContactAvailable);
+ result.push_back(IncomingMessage);
+ result.push_back(SystemMessage);
+ return result;
+}
+
}