diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-19 01:51:04 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-19 01:51:04 +0200 |
commit | 77a98ac21c2520d9fb4bb9c8f70967a8e36dc872 (patch) | |
tree | 687d1cc8820296d56e06c8fab3eaf9ef935cba23 /meegohandsetnotification/watchnotificationsink.h | |
parent | 03af539d69d903dfb5df19b447707a35ebaa4a54 (diff) | |
download | sowatch-77a98ac21c2520d9fb4bb9c8f70967a8e36dc872.tar.gz sowatch-77a98ac21c2520d9fb4bb9c8f70967a8e36dc872.zip |
adding notification provider plugins, idle screen
Diffstat (limited to 'meegohandsetnotification/watchnotificationsink.h')
-rw-r--r-- | meegohandsetnotification/watchnotificationsink.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meegohandsetnotification/watchnotificationsink.h b/meegohandsetnotification/watchnotificationsink.h new file mode 100644 index 0000000..dc586a2 --- /dev/null +++ b/meegohandsetnotification/watchnotificationsink.h @@ -0,0 +1,41 @@ +#ifndef WATCHNOTIFICATIONSINK_H +#define WATCHNOTIFICATIONSINK_H + +#include <QtCore/QMap> +#include <sowatch.h> +#include <notificationsystem/notification.h> +#include <notificationsystem/notificationsink.h> +#include <notificationsystem/notificationparameters.h> + +namespace sowatch { + class MeegoHandsetNotificationProvider; +} + +class WatchNotificationSink : public NotificationSink +{ + Q_OBJECT +public: + explicit WatchNotificationSink(sowatch::MeegoHandsetNotificationProvider* parent); + + void addNotification(const Notification ¬ification); + void removeNotification(uint notificationId); + + void addGroup(uint groupId, const NotificationParameters ¶meters); + void removeGroup(uint groupId); + + int getCount(sowatch::Notification::Type type); + +signals: + void incomingNotification(const sowatch::Notification& notification); + void countsChanged(sowatch::Notification::Type type); + +protected: + static const uint maxTypes = sowatch::Notification::TypeCount; + static sowatch::Notification::Type notificationTypeFromEventType(const QString& eventType); + + sowatch::MeegoHandsetNotificationProvider* _parent; + QMap<uint, Notification> _trackedNotifications; + uint _counts[maxTypes]; +}; + +#endif // WATCHNOTIFICATIONSINK_H |