File indexing completed on 2024-04-21 08:46:37

0001 /**
0002  * SPDX-FileCopyrightText: 2017 Nicolas Fella <nicolas.fella@gmx.de>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QMap>
0010 #include <QObject>
0011 
0012 #include <core/kdeconnectplugin.h>
0013 
0014 #include <PulseAudioQt/Sink>
0015 
0016 #define PACKET_TYPE_SYSTEMVOLUME QStringLiteral("kdeconnect.systemvolume")
0017 #define PACKET_TYPE_SYSTEMVOLUME_REQUEST QStringLiteral("kdeconnect.systemvolume.request")
0018 
0019 class SystemvolumePlugin : public KdeConnectPlugin
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit SystemvolumePlugin(QObject *parent, const QVariantList &args);
0025 
0026     void receivePacket(const NetworkPacket &np) override;
0027     void connected() override;
0028 
0029 private:
0030     void sendSinkList();
0031     QMap<QString, PulseAudioQt::Sink *> sinksMap;
0032 };