This sends generic multimedia keyboard events, since the implementation
using GlobalSystemMediaTransportControlsSessionManager had some problems:
the SessionsChanged event doesn't work on recent Windows versions,
plus many players don't implement this API (eg: VLC, Windows Media).
- We do not need the return type. If a plugin declares it can handle the
packet it should do so. We don't have any fallback logic in place and
the packet types are namespaced with the plugin IDs anyway.
- Provide a default implementation with a warning, not all plugins need
to overwrite this
This is not needed, because only a symbol to create the KPluginFactory
instance must be exported. The KPluginFactory macros or rather the underlying
Q_PLUGIN_METADATA macro already take care of that.
In other plugin code of KDE, we also do not export classes.
The size of the generated plugin files is nearly identical, but removing
the macros avoids confusion for developers.
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.
Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
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