power-internal: Add getter and signal subscriber for lock count 11/303511/1 accepted/tizen/7.0/unified/20240103.164234 accepted/tizen/7.0/unified/20240104.073233
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 28 Dec 2023 05:30:52 +0000 (14:30 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 29 Dec 2023 05:03:21 +0000 (14:03 +0900)
commitdae5d8bca0ab108955ecf86cf8ab6de547343554
tree8c505efeb43a3567a23c698a401e8d2521a31d31
parent3e0a2e96f8f265185e0b5b71d15e1a803c9a7ccc
power-internal: Add getter and signal subscriber for lock count

int device_power_get_lock_count()
 : Get the current lock count that hasn't yet been unlocked.

int device_power_add_lock_count_change_callback()
 : Register callback function that is invoked on lock count changed.
   The lock count is increased by 1 on device_power_request_lock(),
   decreased by 1 on device_power_release_lock() or timeout.

int device_power_remove_lock_count_change_callback()
 : Unregister the callback registered by the above.

Change-Id: Ib77260c867a27013572ee42ab1264ad3c3e5794e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
include/power-internal.h
src/power-internal.c