kdeconnect-kde/plugins/battery
Antonio Larrosa 1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
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.
2020-05-26 18:55:47 +02:00
..
batterydbusinterface.cpp Use ecm_qt_declare_logging_category to declare the logging categories 2020-05-26 18:55:47 +02:00
batterydbusinterface.h Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
batteryplugin.cpp Use ecm_qt_declare_logging_category to declare the logging categories 2020-05-26 18:55:47 +02:00
batteryplugin.h Use ecm_qt_declare_logging_category to declare the logging categories 2020-05-26 18:55:47 +02:00
CMakeLists.txt Use ecm_qt_declare_logging_category to declare the logging categories 2020-05-26 18:55:47 +02:00
kdeconnect_battery.json Finally, we have support for sending out Battery information. 2020-04-13 05:54:11 +00:00
README Finally, we have support for sending out Battery information. 2020-04-13 05:54:11 +00: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
thresholdEvent (int) [optional when = 0, see below]:
    means that a battery threshold event were fired on the remote device:
        0 := no event. generally not transmitted.
        1 := battery entered in low state
    This is an int so in the future we'll be able to subscribe to more events.
    (see BatteryPlugin.ThresholdBatteryEvent)

Symmetrically, it sends its own battery information in packages with the same
format. We only look for the 'primary' battery of the system, if one is present.

<TODO>
Support for devices with multiple batteries isn't there yet.
</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.