mirror of
https://github.com/insidegui/VirtualBuddy.git
synced 2026-12-02 01:59:42 +08:00
21 lines
991 B
Swift
21 lines
991 B
Swift
import Foundation
|
|
|
|
/// Implemented by types that can provide persistence for a list of authorized/denied deep link clients,
|
|
/// so that a UI can be assembled showing the user their previous decisions and allowing users to change their mind.
|
|
public protocol DeepLinkManagementStore {
|
|
/// Returns deep link client descriptors previously added using ``insert(_:)``.
|
|
var currentClientDescriptors: [DeepLinkClientDescriptor] { get }
|
|
|
|
/// Streams deep link client descriptors previously added using ``insert(_:)`` as they're updated.
|
|
func clientDescriptors() -> AsyncStream<[DeepLinkClientDescriptor]>
|
|
|
|
/// Whether the store currently has a descriptor with the specified identifier.
|
|
func hasDescriptor(with id: DeepLinkClientDescriptor.ID) async -> Bool
|
|
|
|
/// Upserts a client descriptor.
|
|
func insert(_ descriptor: DeepLinkClientDescriptor) async throws
|
|
|
|
/// Deletes an existing descriptor.
|
|
func delete(_ descriptor: DeepLinkClientDescriptor) async throws
|
|
}
|