summaryrefslogtreecommitdiff
path: root/daemon/notificationmanager.h
diff options
context:
space:
mode:
authorPhilipp Andreas <github@smurfy.de>2014-07-10 21:56:19 +0200
committerPhilipp Andreas <github@smurfy.de>2014-07-10 21:56:19 +0200
commita4084dcd38a78dfc9113168e378b5fa7f7e9f6ea (patch)
tree80ea1ed45651fa3e5fc3e6cc93366805a49913c0 /daemon/notificationmanager.h
parentcd3011c3ca4eb24627870326d676551edda1c030 (diff)
Adding support for default notifications.
Diffstat (limited to 'daemon/notificationmanager.h')
-rw-r--r--daemon/notificationmanager.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/daemon/notificationmanager.h b/daemon/notificationmanager.h
new file mode 100644
index 0000000..dd3f8bb
--- /dev/null
+++ b/daemon/notificationmanager.h
@@ -0,0 +1,41 @@
+#ifndef NOTIFICATIONMANAGER_H
+#define NOTIFICATIONMANAGER_H
+
+#include <QObject>
+
+#include <QDBusInterface>
+#include <QDBusPendingCallWatcher>
+
+class NotificationManager : public QObject
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.freedesktop.Notifications")
+
+ Q_PROPERTY(QDBusInterface* interface READ interface)
+public:
+ explicit NotificationManager(QObject *parent = 0);
+ ~NotificationManager();
+
+ QDBusInterface* interface() const;
+
+Q_SIGNALS:
+ void error(const QString &message);
+ void smsNotify(const QString &sender, const QString &data);
+ void emailNotify(const QString &sender, const QString &data,const QString &subject);
+
+public Q_SLOTS:
+ void Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantHash &hints, int expire_timeout);
+
+protected Q_SLOTS:
+ void initialize(bool notifyError = false);
+
+private:
+ class NotificationManagerPrivate *d_ptr;
+
+ QString detectCleanAppname(QString app_name);
+
+ Q_DISABLE_COPY(NotificationManager)
+ Q_DECLARE_PRIVATE(NotificationManager)
+};
+
+#endif // NOTIFICATIONMANAGER_H