f4c7e12ea6
Summary: Added primitive support for the mpriscontrol plugin on Windows by simulating VK_MEDIA key presses. I took a look into `ISystemMediaTransportControls`, but there doesn't seem to query it since it's per app. Leaving simulating key presses our only option for now. Completes T10000 Reviewers: kdeconnect, #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: albertvaka Tags: #kde_connect, #windows Maniphest Tasks: T10000 Differential Revision: https://phabricator.kde.org/D17702
29 lines
No EOL
658 B
C++
29 lines
No EOL
658 B
C++
#ifndef MPRISCONTROLPLUGINWIN_H
|
|
#define MPRISCONTROLPLUGINWIN_H
|
|
|
|
#include <core/kdeconnectplugin.h>
|
|
|
|
#include <QString>
|
|
#include <QLoggingCategory>
|
|
|
|
#define PLAYERNAME QStringLiteral("Media Player")
|
|
|
|
#define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris")
|
|
|
|
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS)
|
|
|
|
class MprisControlPlugin
|
|
: public KdeConnectPlugin
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
|
|
|
|
bool receivePacket(const NetworkPacket &np) override;
|
|
void connected() override {}
|
|
|
|
private:
|
|
const QString playername = "Media Player";
|
|
};
|
|
#endif //MPRISCONTROLPLUGINWIN_H
|