plugin-api: deviced: Add struct syscommon_deviced_display_state_info
[platform/core/system/libsyscommon.git] / 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 */