HalWakeLock.h 688 B

123456789101112131415161718192021222324252627
  1. /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  4. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef __HAL_WAKELOCK_H_
  6. #define __HAL_WAKELOCK_H_
  7. namespace mozilla {
  8. namespace hal {
  9. enum WakeLockState {
  10. WAKE_LOCK_STATE_UNLOCKED,
  11. WAKE_LOCK_STATE_HIDDEN,
  12. WAKE_LOCK_STATE_VISIBLE
  13. };
  14. /**
  15. * Return the wake lock state according to the numbers.
  16. */
  17. WakeLockState ComputeWakeLockState(int aNumLocks, int aNumHidden);
  18. } // namespace hal
  19. } // namespace mozilla
  20. #endif /* __HAL_WAKELOCK_H_ */