Changeset View
Changeset View
Standalone View
Standalone View
plugins/mprisremote/mprisremoteplugin.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef MPRISREMOTEPLUGIN_H | 21 | #ifndef MPRISREMOTEPLUGIN_H | ||
22 | #define MPRISREMOTEPLUGIN_H | 22 | #define MPRISREMOTEPLUGIN_H | ||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | 25 | | |||
26 | #include <core/kdeconnectplugin.h> | 26 | #include <core/kdeconnectplugin.h> | ||
27 | 27 | | |||
28 | #define PACKAGE_TYPE_MPRIS_REQUEST QStringLiteral("kdeconnect.mpris.request") | 28 | #define PACKET_TYPE_MPRIS_REQUEST QStringLiteral("kdeconnect.mpris.request") | ||
29 | #define PACKAGE_TYPE_MPRIS QStringLiteral("kdeconnect.mpris") | 29 | #define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris") | ||
30 | 30 | | |||
31 | class Q_DECL_EXPORT MprisRemotePlugin | 31 | class Q_DECL_EXPORT MprisRemotePlugin | ||
32 | : public KdeConnectPlugin | 32 | : public KdeConnectPlugin | ||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.mprisremote") | 35 | Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.mprisremote") | ||
36 | Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY propertiesChanged) | 36 | Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY propertiesChanged) | ||
37 | Q_PROPERTY(int length READ length NOTIFY propertiesChanged) | 37 | Q_PROPERTY(int length READ length NOTIFY propertiesChanged) | ||
Show All 14 Lines | 44 | public: | |||
52 | QStringList playerList() const { return m_playerList; } | 52 | QStringList playerList() const { return m_playerList; } | ||
53 | QString player() const { return m_player; } | 53 | QString player() const { return m_player; } | ||
54 | QString nowPlaying() const { return m_nowPlaying; } | 54 | QString nowPlaying() const { return m_nowPlaying; } | ||
55 | 55 | | |||
56 | void setVolume(int volume); | 56 | void setVolume(int volume); | ||
57 | void setPosition(int position); | 57 | void setPosition(int position); | ||
58 | void setPlayer(const QString& player); | 58 | void setPlayer(const QString& player); | ||
59 | 59 | | |||
60 | bool receivePackage(const NetworkPackage& np) override; | 60 | bool receivePacket(const NetworkPacket& np) override; | ||
61 | void connected() override {} | 61 | void connected() override {} | ||
62 | QString dbusPath() const override; | 62 | QString dbusPath() const override; | ||
63 | 63 | | |||
64 | Q_SCRIPTABLE void seek(int offset) const; | 64 | Q_SCRIPTABLE void seek(int offset) const; | ||
65 | Q_SCRIPTABLE void requestPlayerList(); | 65 | Q_SCRIPTABLE void requestPlayerList(); | ||
66 | Q_SCRIPTABLE void sendAction(const QString& action); | 66 | Q_SCRIPTABLE void sendAction(const QString& action); | ||
67 | 67 | | |||
68 | Q_SIGNALS: | 68 | Q_SIGNALS: | ||
Show All 16 Lines |