diff options
| author | Philipp Andreas <github@smurfy.de> | 2014-07-10 21:56:19 +0200 |
|---|---|---|
| committer | Philipp Andreas <github@smurfy.de> | 2014-07-10 21:56:19 +0200 |
| commit | a4084dcd38a78dfc9113168e378b5fa7f7e9f6ea (patch) | |
| tree | 80ea1ed45651fa3e5fc3e6cc93366805a49913c0 /daemon/notificationmanager.h | |
| parent | cd3011c3ca4eb24627870326d676551edda1c030 (diff) | |
Adding support for default notifications.
Diffstat (limited to 'daemon/notificationmanager.h')
| -rw-r--r-- | daemon/notificationmanager.h | 41 |
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 |
