#ifndef NOTIFICATIONMONITOR_H #define NOTIFICATIONMONITOR_H #include #include #include #include "notification.h" class NotificationMonitor : public QObject { Q_OBJECT public: ~NotificationMonitor(); static NotificationMonitor *instance(); signals: void newNotification(Notification *notification); private: explicit NotificationMonitor(QObject *parent = 0); private slots: void handleServiceOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner); private: QDBusServiceWatcher *_watcher; QHash _pendingNotifications; QHash _notifications; }; #endif // NOTIFICATIONMONITOR_H