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.
27 lines
773 B
27 lines
773 B
import Foundation
|
|
|
|
public struct AuthResponse: Codable, Equatable, Sendable {
|
|
public var hostName: String
|
|
public var protocolVersion: Int
|
|
public var capabilities: [String]?
|
|
|
|
public init(hostName: String, protocolVersion: Int, capabilities: [String]? = nil) {
|
|
self.hostName = hostName
|
|
self.protocolVersion = protocolVersion
|
|
self.capabilities = capabilities
|
|
}
|
|
|
|
public var supportsDirectFileStreaming: Bool {
|
|
capabilities?.contains("file-streaming") ?? false
|
|
}
|
|
}
|
|
|
|
public struct DBMetadata: Codable, Equatable, Sendable {
|
|
public var checksum: String
|
|
public var trackCount: Int
|
|
|
|
public init(checksum: String, trackCount: Int) {
|
|
self.checksum = checksum
|
|
self.trackCount = trackCount
|
|
}
|
|
}
|
|
|