/** * SPDX-FileCopyrightText: 2015 Holger Kaelberer * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #pragma once #include #include #include #include class KdeConnectPlugin; struct NotifyingApplication; #define PACKET_TYPE_NOTIFICATION QStringLiteral("kdeconnect.notification") class NotificationsListener : public QObject { Q_OBJECT public: explicit NotificationsListener(KdeConnectPlugin *aPlugin); ~NotificationsListener() override; protected: bool checkApplicationName(const QString &appName, std::optional> iconName = std::nullopt); bool checkIsInBlacklist(const QString &appName, const QString &content); QSharedPointer iconFromQImage(const QImage &image) const; KdeConnectPlugin *m_plugin; private Q_SLOTS: void loadApplications(); private: void setTranslatedAppName(); QHash m_applications; QString m_translatedAppName; };