5e151d185e
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 |
||
---|---|---|
.. | ||
batterydbusinterface.cpp | ||
batterydbusinterface.h | ||
batteryplugin.cpp | ||
batteryplugin.h | ||
CMakeLists.txt | ||
kdeconnect_battery.desktop | ||
README |
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.