liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame^] | 1 | #ifndef __QL_SLEEP_WAKELOCK_H__ |
| 2 | #define __QL_SLEEP_WAKELOCK_H__ |
| 3 | #include <stddef.h> |
| 4 | |
| 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__ |