2015-09-10 15:36:03 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
2015-09-10 15:36:03 +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
|
2015-09-10 15:36:03 +01:00
|
|
|
*/
|
|
|
|
|
2016-05-25 19:49:13 +01:00
|
|
|
#ifndef SENDNOTIFICATIONSPLUGIN_H
|
|
|
|
#define SENDNOTIFICATIONSPLUGIN_H
|
2015-09-10 15:36:03 +01:00
|
|
|
|
2016-07-05 13:27:53 +01:00
|
|
|
#include "core/kdeconnectplugin.h"
|
2016-05-25 19:49:13 +01:00
|
|
|
|
2018-03-04 19:48:51 +00:00
|
|
|
#define PACKET_TYPE_NOTIFICATION QStringLiteral("kdeconnect.notification")
|
2016-05-25 19:49:13 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This class is just a proxy for NotificationsDbusInterface
|
|
|
|
* because it can not inherit from QDBusAbstractAdaptor and
|
|
|
|
* KdeConnectPlugin at the same time (both are QObject)
|
|
|
|
*/
|
2015-09-10 15:36:03 +01:00
|
|
|
class NotificationsDbusInterface;
|
2016-05-25 19:49:13 +01:00
|
|
|
class NotificationsListener;
|
2015-09-10 15:36:03 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
class SendNotificationsPlugin : public KdeConnectPlugin
|
2015-09-10 15:36:03 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-09-10 22:23:52 +01:00
|
|
|
explicit SendNotificationsPlugin(QObject *parent, const QVariantList &args);
|
2016-06-20 08:05:02 +01:00
|
|
|
~SendNotificationsPlugin() override;
|
2022-09-10 22:23:52 +01:00
|
|
|
|
|
|
|
bool receivePacket(const NetworkPacket &np) override;
|
2016-06-20 08:05:02 +01:00
|
|
|
void connected() override;
|
2015-12-05 22:11:57 +00:00
|
|
|
|
2016-05-25 19:49:13 +01:00
|
|
|
protected:
|
2022-09-10 22:23:52 +01:00
|
|
|
NotificationsListener *notificationsListener;
|
2015-09-10 15:36:03 +01:00
|
|
|
};
|
2016-05-25 19:49:13 +01:00
|
|
|
|
|
|
|
#endif
|