ServiceViewController.swift 916 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // ServiceViewController.swift
  3. // LoopKitUI
  4. //
  5. // Created by Darin Krauss on 5/23/19.
  6. // Copyright © 2019 LoopKit Authors. All rights reserved.
  7. //
  8. import LoopKit
  9. open class ServiceViewController: UINavigationController, ServiceSetupNotifying, ServiceSettingsNotifying, CompletionNotifying {
  10. public weak var serviceSetupDelegate: ServiceSetupDelegate?
  11. public weak var serviceSettingsDelegate: ServiceSettingsDelegate?
  12. public weak var completionDelegate: CompletionDelegate?
  13. public func notifyServiceCreated(_ service: Service) {
  14. serviceSetupDelegate?.serviceSetupNotifying(self, didCreateService: service)
  15. }
  16. public func notifyServiceDeleted(_ service: Service) {
  17. serviceSettingsDelegate?.serviceSettingsNotifying(self, didDeleteService: service)
  18. }
  19. public func notifyComplete() {
  20. completionDelegate?.completionNotifyingDidComplete(self)
  21. }
  22. }