b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame^] | 1 | #ifndef __QL_SLEEP_WAKELOCK_H__ |
| 2 | #define __QL_SLEEP_WAKELOCK_H__ |
| 3 | |
| 4 | #include <stddef.h> |
| 5 | /* |
| 6 | * create wakelock, return the file description of the wakelock |
| 7 | */ |
| 8 | extern int ql_slp_wakelock_create(const char *name, size_t len); |
| 9 | |
| 10 | /* |
| 11 | * lock the wakelock by the file description of the wakelock |
| 12 | */ |
| 13 | extern int ql_slp_wakelock_lock(int fd); |
| 14 | |
| 15 | |
| 16 | /* |
| 17 | * unlock the wakelock by the file description of the wakelock |
| 18 | */ |
| 19 | extern int ql_slp_wakelock_unlock(int fd); |
| 20 | |
| 21 | /* |
| 22 | * destroy the wakelock by the file description of the wakelock |
| 23 | */ |
| 24 | extern int ql_slp_wakelock_destroy(int fd); |
| 25 | |
| 26 | /* |
| 27 | * Enable/Disable autosleep function |
| 28 | */ |
| 29 | extern int ql_autosleep_enable(char enable); |
| 30 | |
| 31 | #endif //__QL_SLEEP_WAKELOCK_H__ |
| 32 | |
| 33 | |