Skip to content

Commit

Permalink
allow direction of when a service can be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
nhamming committed Oct 30, 2024
1 parent 3eabffc commit 7a87f8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions LoopKit/Pluggable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ public protocol Pluggable: AnyObject {
/// A plugin may need a reference to another plugin. This callback allows for such a reference.
/// It is called once during app initialization after plugins are initialized and again as new plugins are added and initialized.
func initializationComplete(for pluggables: [Pluggable])

/// A plugin may require another plugin. This callback informs this dependency.
/// Often this is called as apart of `initializationComplete(for pluggables: [Pluggable])`
func isDependency(_ isDependency: Bool)
}

public extension Pluggable {
func initializationComplete(for pluggables: [Pluggable]) { } // optional
func isDependency(_ isDependency: Bool) { } // optional
}

0 comments on commit 7a87f8b

Please sign in to comment.