summaryrefslogtreecommitdiff
path: root/ckitcallnotification/ckitcallnotification.cpp
blob: 7362e2d915bdb9bd6467e8386d8363fa328b135d (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
47
48
49
50
51
52
53
54
55
56
57
#include "ckitcallnotification.h"

using namespace sowatch;

CKitCallNotification::CKitCallNotification(const QString& displayName, QObject *parent) :
	Notification(parent),
	_dateTime(QDateTime::currentDateTime()),
	_displayName(displayName)
{
}

Notification::Type CKitCallNotification::type() const
{
	return Notification::CallNotification;
}

uint CKitCallNotification::count() const
{
	return 1;
}

QDateTime CKitCallNotification::dateTime() const
{
	return _dateTime;
}

QString CKitCallNotification::title() const
{
	return _displayName;
}

QString CKitCallNotification::body() const
{
	return tr("Incoming call");
}

void CKitCallNotification::activate()
{
	// TODO Actually do something
}

void CKitCallNotification::dismiss()
{
	// TODO Actually reject the call
}

void CKitCallNotification::changeDisplayName(const QString &displayName)
{
	_displayName = displayName;
	emit titleChanged();
	emit changed();
}

void CKitCallNotification::remove()
{
	emit dismissed();
}