2013-07-04 18:17:22 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
2013-07-04 18:17:22 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2013-07-04 18:17:22 +01:00
|
|
|
*/
|
|
|
|
|
2023-07-21 19:22:59 +01:00
|
|
|
#pragma once
|
2013-07-04 18:17:22 +01:00
|
|
|
|
2013-08-13 04:07:32 +01:00
|
|
|
#include <QObject>
|
2013-07-04 18:17:22 +01:00
|
|
|
|
2014-06-14 15:34:00 +01:00
|
|
|
#include <core/kdeconnectplugin.h>
|
2013-07-04 18:17:22 +01:00
|
|
|
|
2018-03-04 19:48:51 +00:00
|
|
|
#define PACKET_TYPE_PING QStringLiteral("kdeconnect.ping")
|
2014-09-21 23:45:41 +01:00
|
|
|
|
2023-07-22 10:37:35 +01:00
|
|
|
class PingPlugin : public KdeConnectPlugin
|
2013-07-04 18:17:22 +01:00
|
|
|
{
|
2013-08-12 15:09:52 +01:00
|
|
|
Q_OBJECT
|
2014-06-27 17:21:40 +01:00
|
|
|
Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.ping")
|
2013-07-04 18:17:22 +01:00
|
|
|
|
|
|
|
public:
|
2023-07-28 09:36:48 +01:00
|
|
|
using KdeConnectPlugin::KdeConnectPlugin;
|
2014-09-21 23:45:41 +01:00
|
|
|
|
2014-06-27 17:21:40 +01:00
|
|
|
Q_SCRIPTABLE void sendPing();
|
2022-09-10 22:23:52 +01:00
|
|
|
Q_SCRIPTABLE void sendPing(const QString &customMessage);
|
2014-06-27 17:21:40 +01:00
|
|
|
|
2023-07-31 08:25:45 +01:00
|
|
|
void receivePacket(const NetworkPacket &np) override;
|
2016-12-30 15:38:12 +00:00
|
|
|
QString dbusPath() const override;
|
2013-07-04 18:17:22 +01:00
|
|
|
};
|