summaryrefslogtreecommitdiffstats
blob: 2c2660ee9fd2bcabf61672ea1561d0965716e560 (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
45
46
/*
 * 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 {

const int Notifier::DEFAULT_STATUS_NOTIFICATION_TIMEOUT_SECONDS = 3;
const int Notifier::DEFAULT_MESSAGE_NOTIFICATION_TIMEOUT_SECONDS = 5;

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(IncomingMessage);
	result.push_back(SystemMessage);
	return result;
}

}