#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(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); }