DeviceStatusHighlight.swift 656 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // DeviceStatusHighlight.swift
  3. // LoopKit
  4. //
  5. // Created by Nathaniel Hamming on 2020-06-23.
  6. // Copyright © 2020 LoopKit Authors. All rights reserved.
  7. //
  8. import UIKit
  9. public protocol DeviceStatusHighlight {
  10. /// a localized message from the device
  11. var localizedMessage: String { get }
  12. /// the system name of the icon related to the message
  13. var imageName: String { get }
  14. /// the state of the status highlight (guides presentation)
  15. var state: DeviceStatusHighlightState { get }
  16. }
  17. public enum DeviceStatusHighlightState: String, Codable {
  18. case critical
  19. case normalCGM
  20. case normalPump
  21. case warning
  22. }