From: Yunhee Seo Date: Thu, 30 May 2024 07:39:12 +0000 (+0900) Subject: plugin-api: deviced: Add attribute for handling abnormal battery health X-Git-Tag: accepted/tizen/8.0/unified/20240618.013421~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa31068e772a8998d4f8489b9539342ba8780ff3;p=platform%2Fcore%2Fsystem%2Flibsyscommon.git plugin-api: deviced: Add attribute for handling abnormal battery health New attribute: - id: DEVICED_BATTERY_ATTR_BOOL_DO_NOT_DISTURB - type: SYSCOMMON_RESMAN_DATA_TYPE_BOOLEAN - setter: X - getter: O New attribute: - id: DEVICED_BATTERY_ATTR_INT_LOW_BATTERY_POPUP - type: SYSCOMMON_RESMAN_DATA_TYPE_INT - setter: O - getter: X - 1st param: enum syscommon_deviced_battery_option_type In order to handle abnormal battery health status, above battery attributes are needed. To support above attribute getter/setter, enum syscommon_deviced_battery_option_type is added. Change-Id: I4d8a66875d581feeb993b19921c5d37fb588c6a4 Signed-off-by: Yunhee Seo --- diff --git a/src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery-interface.h b/src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery-interface.h index 70e93fa..f9f1ce5 100644 --- a/src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery-interface.h +++ b/src/plugin-api/deviced/include/system/syscommon-plugin-deviced-battery-interface.h @@ -33,6 +33,8 @@ extern "C" { #define DEVICED_BATTERY_ATTR_INT_STATUS_HEALTH (1ULL << 0) #define DEVICED_BATTERY_ATTR_STRING_STATUS_HEALTH (1ULL << 1) +#define DEVICED_BATTERY_ATTR_BOOL_DO_NOT_DISTURB (1ULL << 2) +#define DEVICED_BATTERY_ATTR_INT_LOW_BATTERY_POPUP (1ULL << 3) enum syscommon_deviced_battery_noti_status { DEVICED_BATTERY_NOTI_OFF, @@ -48,6 +50,18 @@ enum syscommon_deviced_battery_health_type { SYSCOMMON_DEVICED_BATTERY_HEALTH_OVP, }; +enum syscommon_deviced_battery_option_type { + SYSCOMMON_DEVICED_BATTERY_OPT_NONE, + SYSCOMMON_DEVICED_BATTERY_OPT_WARNING, + SYSCOMMON_DEVICED_BATTERY_OPT_CRITICAL, + SYSCOMMON_DEVICED_BATTERY_OPT_POWEROFF, + SYSCOMMON_DEVICED_BATTERY_OPT_ERR_TEMP_LOW, + SYSCOMMON_DEVICED_BATTERY_OPT_ERR_TEMP_HIGH, + SYSCOMMON_DEVICED_BATTERY_OPT_ERR_CF_OPEN, +}; + +#define DEVICED_BATTERY_ABNORMAL_CHECK_TIMER_INTERVAL 60 + typedef struct _syscommon_plugin_backend_deviced_battery_funcs { bool (*is_possible_to_notify_battery_full) (void); void (*update_health_ovp_state) (enum syscommon_deviced_battery_noti_status noti_status);