blob: 1a90dc14d5a211d4681bc61ff9c97afce450f4f9 (
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
|
#include "meegohandsetnotificationprovider.h"
#include "watchnotificationsink.h"
WatchNotificationSink::WatchNotificationSink(sowatch::MeegoHandsetNotificationProvider *parent) :
NotificationSink(parent)
{
}
void WatchNotificationSink::addNotification(const Notification ¬ification)
{
const uint notificationId = notification.notificationId();
if (_trackedNotifications.contains(notificationId)) {
MeegoHandsetNotification* n = _trackedNotifications[notificationId];
n->changeTo(notification);
} else {
MeegoHandsetNotification* n = new MeegoHandsetNotification(notification, this);
_trackedNotifications[notificationId] = n;
emit incomingNotification(static_cast<sowatch::Notification*>(n));
}
}
void WatchNotificationSink::removeNotification(uint notificationId)
{
if (_trackedNotifications.contains(notificationId)) {
MeegoHandsetNotification* n = _trackedNotifications[notificationId];
_trackedNotifications.remove(notificationId);
n->remove();
delete n;
}
}
void WatchNotificationSink::addGroup(uint groupId, const NotificationParameters ¶meters)
{
// We do not care about notification groups
Q_UNUSED(groupId);
Q_UNUSED(parameters);
}
void WatchNotificationSink::removeGroup(uint groupId)
{
Q_UNUSED(groupId);
}
|