[mce] Add charger state D-Bus constants. JB#44852
Constants related to exposing charger state on D-Bus. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
This commit is contained in:
@@ -847,6 +847,32 @@
|
||||
*/
|
||||
# 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
|
||||
*
|
||||
* @since mce 1.86.0
|
||||
|
||||
@@ -485,6 +485,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/** @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
|
||||
|
||||
Reference in New Issue
Block a user