You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
772 B
19 lines
772 B
import Foundation
|
|
|
|
public enum AppRole: String, Codable, CaseIterable, Sendable {
|
|
case local
|
|
case remoteHost
|
|
case remoteClient
|
|
case streamHost
|
|
case streamClient
|
|
}
|
|
|
|
extension AppRole {
|
|
public var isHost: Bool { self == .remoteHost || self == .streamHost }
|
|
public var isClient: Bool { self == .remoteClient || self == .streamClient }
|
|
public var isLocal: Bool { self == .local }
|
|
public var usesLocalAudio: Bool { self == .local || self == .remoteHost || self == .streamClient }
|
|
public var isReadOnlyLibrary: Bool { self == .remoteClient || self == .streamClient }
|
|
public var needsNetworkServer: Bool { self == .remoteHost || self == .streamHost }
|
|
public var isStreaming: Bool { self == .streamHost || self == .streamClient }
|
|
}
|
|
|