AwakeMode.swift 721 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // AwakeMode.swift
  3. // Nextcloud
  4. //
  5. // Created by Milen Pivchev on 18.09.24.
  6. // Copyright © 2024 Marino Faggiana. All rights reserved.
  7. //
  8. import Foundation
  9. /**
  10. Modes:
  11. - `disabled`: Nothing will change (disabled functionality).
  12. - `always`: Device will never timeout and lock.
  13. - `whenCharging`: Device will stay active as long as it's connected to charger.
  14. */
  15. enum AwakeMode: CaseIterable, Identifiable {
  16. /**
  17. Nothing will change (disabled functionality).
  18. */
  19. case off
  20. /**
  21. Device will never timeout and lock.
  22. */
  23. case on
  24. /**
  25. Device will stay active as long as it's connected to charger.
  26. */
  27. case whileCharging
  28. var id: Self { self }
  29. }