From 48b58c77b08bec534fe22d4f66992d110aa8e332 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Mon, 21 Aug 2023 17:08:38 +0900 Subject: [PATCH] plugin-api: deviced: Add power attribute and enum for vital mode New attribute: - id: DEVICED_POWER_ATTR_INT_GET_VITAL_MODE - type: SYSCOMMON_RESMAN_DATA_TYPE_INT - setter: X - getter: O Change-Id: I8b1819d0171b0406b1eaf2b92d9e044e55408df2 Signed-off-by: Youngjae Cho --- .../syscommon-plugin-deviced-power-interface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h b/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h index c28b7e8..40b7065 100644 --- a/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h +++ b/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h @@ -35,6 +35,7 @@ extern "C" { #define DEVICED_POWER_ATTR_UINT64_CURRENT_STATE (1ULL << 1) #define DEVICED_POWER_ATTR_INT_WAKEUP_REASON (1ULL << 2) #define DEVICED_POWER_ATTR_TUPLE2_SET_WAKELOCK (1ULL << 3) +#define DEVICED_POWER_ATTR_INT_GET_VITAL_MODE (1ULL << 4) enum { DEVICED_POWER_STATE_MIN_INDEX, @@ -102,6 +103,16 @@ static inline u_int64_t syscommon_plugin_deviced_power_convert_to_power_state(co return DEVICED_POWER_STATE_UNDEFINED; } +/* + * Vital state enumeration + */ +enum syscommon_deviced_vital_state { + SYSCOMMON_DEVICED_VITAL_SLEEP, /* suspend state */ + SYSCOMMON_DEVICED_VITAL_WAKEUP, /* resume state */ + SYSCOMMON_DEVICED_VITAL_DISPLAY_WAKEUP, + SYSCOMMON_DEVICED_VITAL_EXIT, +}; + #ifdef __cplusplus } #endif -- 2.34.1