/** * SPDX-FileCopyrightText: 2013 Albert Vaca * SPDX-FileCopyrightText: 2019 Piyush Aggarwal * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #pragma once #include #include #include #include #include #include #include #include #include #include using namespace winrt; using namespace Windows::Media::Control; using namespace Windows::ApplicationModel; class PauseMusicPlugin : public KdeConnectPlugin { Q_OBJECT public: explicit PauseMusicPlugin(QObject *parent, const QVariantList &args); ~PauseMusicPlugin(); bool receivePacket(const NetworkPacket &np) override; private: void updatePlayersList(); bool updateSinksList(); bool valid; IMMDeviceEnumerator *deviceEnumerator; QHash sinksList; GlobalSystemMediaTransportControlsSessionManager sessionManager; QHash playersList; QSet pausedSources; QSet mutedSinks; };