File indexing completed on 2024-04-28 04:57:11
0001 /** 0002 * SPDX-FileCopyrightText: 2023 Fushan Wen <qydwhotmail@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "notificationslistener.h" 0010 0011 #include <winrt/Windows.Foundation.h> 0012 #include <winrt/Windows.UI.Notifications.Management.h> 0013 #include <winrt/Windows.UI.Notifications.h> 0014 0015 class WindowsNotificationsListener : public NotificationsListener 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 explicit WindowsNotificationsListener(KdeConnectPlugin *aPlugin); 0021 ~WindowsNotificationsListener() override; 0022 0023 private: 0024 void setupWindowsUserNotificationListener(); 0025 void onNotificationChanged(const winrt::Windows::UI::Notifications::Management::UserNotificationListener &sender, 0026 const winrt::Windows::UI::Notifications::UserNotificationChangedEventArgs &args); 0027 0028 winrt::event_token m_notificationEventToken; 0029 };