/* SPDX-FileCopyrightText: 2005-2006 Olivier Goffart SPDX-FileCopyrightText: 2008 Dmitry Suzdalev SPDX-FileCopyrightText: 2014 Martin Klapetek SPDX-FileCopyrightText: 2016 Jan Grulich SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #ifndef NOTIFYBYPORTAL_H #define NOTIFYBYPORTAL_H #include "knotificationplugin.h" #include #include class KNotification; class NotifyByPortalPrivate; class NotifyByPortal : public KNotificationPlugin { Q_OBJECT public: explicit NotifyByPortal(QObject *parent = nullptr); ~NotifyByPortal() override; QString optionName() override { return QStringLiteral("Popup"); } void notify(KNotification *notification, const KNotifyConfig ¬ifyConfig) override; void close(KNotification *notification) override; void update(KNotification *notification, const KNotifyConfig ¬ifyConfig) override; private Q_SLOTS: // slot to catch appearance or disappearance of org.freedesktop.Desktop DBus service void onServiceOwnerChanged(const QString &, const QString &, const QString &); void onPortalNotificationActionInvoked(const QString &, const QString &, const QVariantList &); private: std::unique_ptr const d; }; #endif