Changeset View
Changeset View
Standalone View
Standalone View
plugins/ping/pingplugin.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef PINGPLUGIN_H | 21 | #ifndef PINGPLUGIN_H | ||
22 | #define PINGPLUGIN_H | 22 | #define PINGPLUGIN_H | ||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | 25 | | |||
26 | #include <core/kdeconnectplugin.h> | 26 | #include <core/kdeconnectplugin.h> | ||
27 | 27 | | |||
28 | #define PACKAGE_TYPE_PING QStringLiteral("kdeconnect.ping") | 28 | #define PACKET_TYPE_PING QStringLiteral("kdeconnect.ping") | ||
29 | 29 | | |||
30 | class Q_DECL_EXPORT PingPlugin | 30 | class Q_DECL_EXPORT PingPlugin | ||
31 | : public KdeConnectPlugin | 31 | : public KdeConnectPlugin | ||
32 | { | 32 | { | ||
33 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.ping") | 34 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.ping") | ||
35 | 35 | | |||
36 | public: | 36 | public: | ||
37 | explicit PingPlugin(QObject* parent, const QVariantList& args); | 37 | explicit PingPlugin(QObject* parent, const QVariantList& args); | ||
38 | ~PingPlugin() override; | 38 | ~PingPlugin() override; | ||
39 | 39 | | |||
40 | Q_SCRIPTABLE void sendPing(); | 40 | Q_SCRIPTABLE void sendPing(); | ||
41 | Q_SCRIPTABLE void sendPing(const QString& customMessage); | 41 | Q_SCRIPTABLE void sendPing(const QString& customMessage); | ||
42 | 42 | | |||
43 | bool receivePackage(const NetworkPackage& np) override; | 43 | bool receivePacket(const NetworkPacket& np) override; | ||
44 | void connected() override {} | 44 | void connected() override {} | ||
45 | 45 | | |||
46 | QString dbusPath() const override; | 46 | QString dbusPath() const override; | ||
47 | }; | 47 | }; | ||
48 | 48 | | |||
49 | #endif | 49 | #endif |