Merge branch 'jb44852_battery_state' into 'master'

Add charger state D-Bus constants

See merge request mer-core/mce-dev!12
This commit is contained in:
spiiroin
2019-10-08 09:58:46 +00:00
2 changed files with 77 additions and 0 deletions

View File

@@ -847,6 +847,32 @@
*/ */
# define MCE_BATTERY_STATUS_SIG "battery_status_ind" # define MCE_BATTERY_STATUS_SIG "battery_status_ind"
/** Query current battery state
*
* @since mce 1.104.0
*
* @return string: current battery state, one of:
* - #MCE_BATTERY_STATE_UNKNOWN
* - #MCE_BATTERY_STATE_CHARGING
* - #MCE_BATTERY_STATE_DISCHARGING
* - #MCE_BATTERY_STATE_NOT_CHARGING
* - #MCE_BATTERY_STATE_FULL
*/
#define MCE_BATTERY_STATE_GET "get_battery_state"
/** Signal that indicates that battery state has changed
*
* @since mce 1.104.0
*
* @param battery_state string: current battery state, one of:
* - #MCE_BATTERY_STATE_UNKNOWN
* - #MCE_BATTERY_STATE_CHARGING
* - #MCE_BATTERY_STATE_DISCHARGING
* - #MCE_BATTERY_STATE_NOT_CHARGING
* - #MCE_BATTERY_STATE_FULL
*/
#define MCE_BATTERY_STATE_SIG "battery_state_ind"
/** Query current battery level /** Query current battery level
* *
* @since mce 1.86.0 * @since mce 1.86.0

View File

@@ -485,6 +485,8 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** @name Battery Status Constants /** @name Battery Status Constants
*
* These values match legacy maemo (bme) battery status values.
* *
*@{ *@{
*/ */
@@ -521,6 +523,55 @@
/*@}*/ /*@}*/
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/** @name Battery State Constants
*
* These values match linux power supply device status values.
*
*@{
*/
/** Battery state is not known
*
* @since mce 1.104.0
*/
# define MCE_BATTERY_STATE_UNKNOWN "unknown"
/** Battery is currently discharging
*
* Charger is disconnected, battery is discharging.
*
* @since mce 1.104.0
*/
# define MCE_BATTERY_STATE_DISCHARGING "discharging"
/** Battery is currently charging
*
* Charger is connected, battery is charging.
*
* @since mce 1.104.0
*/
# define MCE_BATTERY_STATE_CHARGING "charging"
/** Battery is not getting charged
*
* Charger is connected, battery is not getting charged.
*
* @since mce 1.104.0
*/
# define MCE_BATTERY_STATE_NOT_CHARGING "not_charging"
/** Battery is fully charged
*
* Charger is connected, battery is full.
*
* @since mce 1.104.0
*/
# define MCE_BATTERY_STATE_FULL "full"
/*@}*/
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/** @name Battery Level Constants /** @name Battery Level Constants