summaryrefslogtreecommitdiffstats
blob: a9764861b8cfceab0ad0eb265452b9f910ec7fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 2010 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#include "SwifTools/Notifier/Notifier.h"

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;
}

}