summaryrefslogtreecommitdiff
path: root/notificationmonitor.h
blob: 8563053a673c4efcc2a4a8044c2834eeb8ff1af7 (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
#ifndef NOTIFICATIONMONITOR_H
#define NOTIFICATIONMONITOR_H

#include <QtCore/QObject>
#include <QtCore/QMap>

namespace watchfish
{

class Notification;

class NotificationMonitor : public QObject
{
	Q_OBJECT

public:
	~NotificationMonitor();

	static NotificationMonitor *instance();

	void processIncomingNotification(quint32 id, const QVariantHash &content);
	void processCloseNotification(quint32 id, quint32 reason);

signals:
	void notification(Notification *n);

private:
	explicit NotificationMonitor(QObject *parent = 0);
	QMap<quint32, Notification*> _notifs;
};

}

#endif // NOTIFICATIONMONITOR_H