Changeset View
Changeset View
Standalone View
Standalone View
plugins/pausemusic/pausemusicplugin.h
Show All 21 Lines | |||||
22 | #define PAUSEMUSICPLUGIN_H | 22 | #define PAUSEMUSICPLUGIN_H | ||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | #include <QSet> | 25 | #include <QSet> | ||
26 | #include <QString> | 26 | #include <QString> | ||
27 | 27 | | |||
28 | #include <core/kdeconnectplugin.h> | 28 | #include <core/kdeconnectplugin.h> | ||
29 | 29 | | |||
30 | #include <QLoggingCategory> | ||||
31 | | ||||
32 | Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC) | ||||
33 | | ||||
30 | class PauseMusicPlugin | 34 | class PauseMusicPlugin | ||
31 | : public KdeConnectPlugin | 35 | : public KdeConnectPlugin | ||
32 | { | 36 | { | ||
33 | Q_OBJECT | 37 | Q_OBJECT | ||
34 | 38 | | |||
35 | public: | 39 | public: | ||
36 | explicit PauseMusicPlugin(QObject* parent, const QVariantList& args); | 40 | explicit PauseMusicPlugin(QObject* parent, const QVariantList& args); | ||
37 | 41 | | |||
38 | bool receivePackage(const NetworkPackage& np) override; | 42 | bool receivePackage(const NetworkPackage& np) override; | ||
39 | void connected() override { } | 43 | void connected() override { } | ||
40 | 44 | | |||
41 | public Q_SLOTS: | | |||
42 | /** | | |||
43 | * @returns 0 if not muted, 1 if muted or -1 if there was an error | | |||
44 | */ | | |||
45 | int isKMixMuted(); | | |||
46 | | ||||
47 | private: | 45 | private: | ||
48 | QSet<QString> pausedSources; | 46 | QSet<QString> pausedSources; | ||
49 | bool muted; | 47 | bool muted; | ||
50 | 48 | | |||
51 | }; | 49 | }; | ||
52 | 50 | | |||
53 | #endif | 51 | #endif |