Changeset View
Changeset View
Standalone View
Standalone View
plugins/notifications/notificationsplugin.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef NOTIFICATIONSPLUGIN_H | 21 | #ifndef NOTIFICATIONSPLUGIN_H | ||
22 | #define NOTIFICATIONSPLUGIN_H | 22 | #define NOTIFICATIONSPLUGIN_H | ||
23 | 23 | | |||
24 | #include <knotification.h> | 24 | #include <knotification.h> | ||
25 | 25 | | |||
26 | #include <core/kdeconnectplugin.h> | 26 | #include <core/kdeconnectplugin.h> | ||
27 | 27 | | |||
28 | #define PACKAGE_TYPE_NOTIFICATION_REQUEST QStringLiteral("kdeconnect.notification.request") | 28 | #define PACKET_TYPE_NOTIFICATION_REQUEST QStringLiteral("kdeconnect.notification.request") | ||
29 | #define PACKAGE_TYPE_NOTIFICATION_REPLY QStringLiteral("kdeconnect.notification.reply") | 29 | #define PACKET_TYPE_NOTIFICATION_REPLY QStringLiteral("kdeconnect.notification.reply") | ||
30 | 30 | | |||
31 | /* | 31 | /* | ||
32 | * This class is just a proxy for NotificationsDbusInterface | 32 | * This class is just a proxy for NotificationsDbusInterface | ||
33 | * because it can not inherit from QDBusAbstractAdaptor and | 33 | * because it can not inherit from QDBusAbstractAdaptor and | ||
34 | * KdeConnectPlugin at the same time (both are QObject) | 34 | * KdeConnectPlugin at the same time (both are QObject) | ||
35 | */ | 35 | */ | ||
36 | class NotificationsDbusInterface; | 36 | class NotificationsDbusInterface; | ||
37 | class NotificationsListener; | 37 | class NotificationsListener; | ||
38 | 38 | | |||
39 | class NotificationsPlugin | 39 | class NotificationsPlugin | ||
40 | : public KdeConnectPlugin | 40 | : public KdeConnectPlugin | ||
41 | { | 41 | { | ||
42 | Q_OBJECT | 42 | Q_OBJECT | ||
43 | 43 | | |||
44 | public: | 44 | public: | ||
45 | explicit NotificationsPlugin(QObject* parent, const QVariantList& args); | 45 | explicit NotificationsPlugin(QObject* parent, const QVariantList& args); | ||
46 | ~NotificationsPlugin() override; | 46 | ~NotificationsPlugin() override; | ||
47 | 47 | | |||
48 | bool receivePackage(const NetworkPackage& np) override; | 48 | bool receivePacket(const NetworkPacket& np) override; | ||
49 | void connected() override; | 49 | void connected() override; | ||
50 | 50 | | |||
51 | protected: | 51 | protected: | ||
52 | NotificationsDbusInterface* notificationsDbusInterface; | 52 | NotificationsDbusInterface* notificationsDbusInterface; | ||
53 | NotificationsListener* notificationsListener; | 53 | NotificationsListener* notificationsListener; | ||
54 | 54 | | |||
55 | }; | 55 | }; | ||
56 | 56 | | |||
57 | #endif | 57 | #endif |