kdeconnect-kde/kded/plugins/battery
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
..
batterydbusinterface.cpp Renamed daemon -> kded 2013-09-02 03:23:34 +02:00
batterydbusinterface.h Renamed daemon -> kded 2013-09-02 03:23:34 +02:00
batteryplugin.cpp Improved package dispatch to the different plugins 2013-10-29 17:46:57 +01:00
batteryplugin.h Code review 2013-10-11 15:20:04 +02:00
CMakeLists.txt Includes and cmakelists cleanup 2013-09-26 17:49:40 +02:00
kdeconnect_battery.desktop Improved package dispatch to the different plugins 2013-10-29 17:46:57 +01:00
README Documentation 2013-09-24 14:14:34 +02:00

This plugins receives packages with type "kdeconnect.battery" and reads the
following fields:

isCharging (boolean): If the battery of the peer device is charging
currentCharge (int): The charge % of the peer device

<TODO>
Symmetrically, it sends its own battery information in packages with the same
format.
</TODO>

It also sends packages with type kdeconnect.battery and a field "request": true,
to ask the peer device to send a package like the mentioned above, and should
also answer this same kind of packages with its own information.

If the battery is low and discharging, it will notify the user.