kdeconnect-kde/kded/plugins/mpriscontrol
Aleix Pol Gonzalez 5e151d185e Improved package dispatch to the different plugins
Before this patch, all plugins had to discard received packages that were
not for themselves. This could be a security problem (a plugin could sniff
other plugin's packages) and also adds some complexity and processing.

This patch makes the device instance aware of what services are required
by the different plugins and when a package is received the corresponding
plugins will get the package.

These services will be listed on the plugin's desktop file, so the user
can decide whether to enable a plugin.

Note that this only works for receiving, not sending.

REVIEW: 113210
2013-10-29 17:46:57 +01:00
..
CMakeLists.txt Includes and cmakelists cleanup 2013-09-26 17:49:40 +02:00
kdeconnect_mpriscontrol.desktop Improved package dispatch to the different plugins 2013-10-29 17:46:57 +01:00
mpriscontrolplugin.cpp Improved package dispatch to the different plugins 2013-10-29 17:46:57 +01:00
mpriscontrolplugin.h Code review 2013-10-11 15:20:04 +02:00
mprisdbusinterface.xml Renamed daemon -> kded 2013-09-02 03:23:34 +02:00
propertiesInterface.xml Renamed daemon -> kded 2013-09-02 03:23:34 +02:00
README Documentation 2013-09-24 14:14:34 +02:00

This plugin controls the playback of mpris-enabled applications in this device,
commanded by its counterpart in the other device that acts as a remote control.
That means both plugins are not symmetrical.

This plugins receives and sends packages with type kdeconnect.mpris.

It keeps a list of detected players it can control via MPRIS. When it receives
a package that contains the boolean "requestPlayerList" set to true, it will
send back the list of players in an array named "playerList". If a new player is
detected or a known one dissappears, it should also send this list. Note that
players are identified only by its name (its MPRIS Identity), so there can not
be two players with the same display name.

This plugins also reports the current song, extracted from MPRIS Metadata. It
should send it when it changes or when receiving a package containing a boolean
"requestNowPlaying" set to true.

The remote devices can send packages with commands to one of the players. Those
packages will contain a string "player" with the name of the player they want to
command and a string "action" with the name of an MPRIS call (like "Play",
"Next"...).

This plugin can also control the system volume. The peer device can send a
package with "requestVolume" set to true to ask for the current volume, or send
a package with "setVolume" set to an integer in the range [0,100] to change it.