plugin-api: deviced: Add struct syscommon_deviced_display_state_info 60/297460/1
authorYoungjae Cho <y0.cho@samsung.com>
Fri, 18 Aug 2023 10:45:23 +0000 (19:45 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 18 Aug 2023 10:45:23 +0000 (19:45 +0900)
Change-Id: I4b9c8e605fa8c111d95fe9dbb09710d6ba2d33e9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h

index 383e361..be00316 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
 #endif
 
 #include <stdbool.h>
+#include <glib.h>
 
 #define DEVICED_DISPLAY_ATTR_INT_GET_MAX_BRIGHTNESS            (1ULL << 0)
 #define DEVICED_DISPLAY_ATTR_INT_GET_CURRENT_STATE             (1ULL << 1)
@@ -46,6 +47,16 @@ enum syscommon_deviced_display_state {
        SYSCOMMON_DEVICED_DISPLAY_STATE_END,
 };
 
+struct syscommon_deviced_display_state_info {
+       enum syscommon_deviced_display_state state;           /**< state number */
+       const char *name;                   /**< state name (string) */
+       int (*trans) (int evt);       /**< transition function pointer */
+       int (*action) (int timeout);  /**< enter action */
+       int (*check) (int curr, int next); /**< transition check function */
+       GSourceFunc timeout_cb;
+       int timeout;
+};
+
 enum syscommon_deviced_dpms_state {
        SYSCOMMON_DEVICED_DPMS_ON,       /* In use */
        SYSCOMMON_DEVICED_DPMS_STANDBY,  /* Blanked, low power */