Applets
dbusnotificationprotocol.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef DBUSNOTIFICATIONPROTOCOL_H
00024 #define DBUSNOTIFICATIONPROTOCOL_H
00025
00026 #include "../../core/protocol.h"
00027
00028 #include <QHash>
00029
00030 #include <Plasma/DataEngine>
00031
00032 namespace SystemTray
00033 {
00034
00035 class DBusNotification;
00036
00037 class DBusNotificationProtocol : public Protocol
00038 {
00039 Q_OBJECT
00040
00041 public:
00042 DBusNotificationProtocol(QObject *parent);
00043 ~DBusNotificationProtocol();
00044 void init();
00045
00046 private slots:
00047 void prepareNotification(const QString &source);
00048 void dataUpdated(const QString &source, const Plasma::DataEngine::Data &data);
00049 void removeNotification(const QString &source);
00050 void relayAction(const QString &source, const QString &actionId);
00051
00052 private:
00053 Plasma::DataEngine *m_engine;
00054 QHash<QString, DBusNotification*> m_notifications;
00055 };
00056
00057 }
00058
00059
00060 #endif