power: add callback for tracking power lock state
Add functions to tracking power lock state.
In this context, power lock state is meaning of "locked or unlocked"
about specific power lock type.
When the registered(specific) power lock is changed,
callback function will be called.
To inform power lock status, this enum type will be used.
typedef enum {
DEVICE_POWER_LOCK_STATE_UNLOCK, /**< Power lock is unlocked */
DEVICE_POWER_LOCK_STATE_LOCK, /**< Power lock is locked */
} device_power_lock_state_e;
These are function prototype to be added.
typedef void (*device_power_lock_state_change_callback) (power_lock_e power_lock_type,
device_power_lock_state_e power_lock_state, void *user_data);
-> This callback will be called when the registered power_lock_type lock is changed.
int device_power_get_lock_state(power_lock_e power_lock_type,
device_power_lock_state_e *power_lock_state);
-> This function gets the status(locked or unlocked) of power_lock_type
int device_power_add_lock_state_change_callback(power_lock_e power_lock_type,
device_power_lock_state_change_callback power_lock_state_change_callback,
void *user_data);
-> This function register callback with parameter power_lock_type.
int device_power_remove_lock_state_change_callback(power_lock_e power_lock_type);
-> This function remove registered callback with parameter power_lock_type.
Change-Id: I1e2449dfdf4a27caa03d0c8a6000606ef90b31f8
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>