DeviceLifecycleProgress.swift 675 B

1234567891011121314151617181920212223242526
  1. //
  2. // DeviceLifecycleProgress.swift
  3. // LoopKit
  4. //
  5. // Created by Nathaniel Hamming on 2020-06-30.
  6. // Copyright © 2020 LoopKit Authors. All rights reserved.
  7. //
  8. import Foundation
  9. public protocol DeviceLifecycleProgress {
  10. /// the percent complete of the progress for this device status. Expects a value between 0.0 and 1.0
  11. var percentComplete: Double { get }
  12. /// the status of the progress to provide guidance as to how to present the progress
  13. var progressState: DeviceLifecycleProgressState { get }
  14. }
  15. public enum DeviceLifecycleProgressState: String, Codable {
  16. case critical
  17. case dimmed
  18. case normalCGM
  19. case normalPump
  20. case warning
  21. }