* SPDX-FileCopyrightText: 2016 Red Hat Inc
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*
* SPDX-FileCopyrightText: 2016 Jan Grulich <jgrulich@redhat.com>
*/
#ifndef XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
#define XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
#include <KNotification>
class NotificationPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Notification")
public:
struct PortalIcon {
QString str;
QDBusVariant data;
};
explicit NotificationPortal(QObject *parent);
~NotificationPortal() override;
public Q_SLOTS:
void AddNotification(const QString &app_id, const QString &id, const QVariantMap ¬ification);
void RemoveNotification(const QString &app_id, const QString &id);
private Q_SLOTS:
void notificationActivated(uint action);
void notificationClosed();
private:
QHash<QString, KNotification *> m_notifications;
};
#endif