Rk_wake_lock.h 435 B

123456789101112131415161718192021
  1. #ifndef RK_WAKE_LOCK_H
  2. #define RK_WAKE_LOCK_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. struct rk_wake_lock;
  7. struct rk_wake_lock* RK_wake_lock_new(const char *id);//the id must be unique
  8. void RK_wake_lock_delete(struct rk_wake_lock* lock);
  9. int RK_acquire_wake_lock(struct rk_wake_lock* lock);
  10. int RK_release_wake_lock(struct rk_wake_lock* lock);
  11. int RK_wait_all_wake_lock_release(int timeout_ms);
  12. #ifdef __cplusplus
  13. }
  14. #endif
  15. #endif