Changeset View
Changeset View
Standalone View
Standalone View
plugins/sendnotifications/sendnotificationsplugin.h
Show All 17 Lines | |||||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef SENDNOTIFICATIONSPLUGIN_H | 21 | #ifndef SENDNOTIFICATIONSPLUGIN_H | ||
22 | #define SENDNOTIFICATIONSPLUGIN_H | 22 | #define SENDNOTIFICATIONSPLUGIN_H | ||
23 | 23 | | |||
24 | #include "core/kdeconnectplugin.h" | 24 | #include "core/kdeconnectplugin.h" | ||
25 | 25 | | |||
26 | #define PACKAGE_TYPE_NOTIFICATION QStringLiteral("kdeconnect.notification") | 26 | #define PACKET_TYPE_NOTIFICATION QStringLiteral("kdeconnect.notification") | ||
27 | 27 | | |||
28 | /* | 28 | /* | ||
29 | * This class is just a proxy for NotificationsDbusInterface | 29 | * This class is just a proxy for NotificationsDbusInterface | ||
30 | * because it can not inherit from QDBusAbstractAdaptor and | 30 | * because it can not inherit from QDBusAbstractAdaptor and | ||
31 | * KdeConnectPlugin at the same time (both are QObject) | 31 | * KdeConnectPlugin at the same time (both are QObject) | ||
32 | */ | 32 | */ | ||
33 | class NotificationsDbusInterface; | 33 | class NotificationsDbusInterface; | ||
34 | class NotificationsListener; | 34 | class NotificationsListener; | ||
35 | 35 | | |||
36 | class SendNotificationsPlugin | 36 | class SendNotificationsPlugin | ||
37 | : public KdeConnectPlugin | 37 | : public KdeConnectPlugin | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | 40 | | |||
41 | public: | 41 | public: | ||
42 | explicit SendNotificationsPlugin(QObject* parent, const QVariantList& args); | 42 | explicit SendNotificationsPlugin(QObject* parent, const QVariantList& args); | ||
43 | ~SendNotificationsPlugin() override; | 43 | ~SendNotificationsPlugin() override; | ||
44 | 44 | | |||
45 | bool receivePackage(const NetworkPackage& np) override; | 45 | bool receivePacket(const NetworkPacket& np) override; | ||
46 | void connected() override; | 46 | void connected() override; | ||
47 | 47 | | |||
48 | protected: | 48 | protected: | ||
49 | NotificationsListener* notificationsListener; | 49 | NotificationsListener* notificationsListener; | ||
50 | 50 | | |||
51 | }; | 51 | }; | ||
52 | 52 | | |||
53 | #endif | 53 | #endif |