Sesame-iOS/Sesame/Common/TransmissionType.swift

43 lines
722 B
Swift
Raw Normal View History

2023-12-12 17:33:42 +01:00
import Foundation
import SFSafeSymbols
enum TransmissionType: Int {
case throughServer = 0
case overLocalWifi = 1
}
extension TransmissionType: Codable {
}
extension TransmissionType {
var symbol: SFSymbol {
switch self {
case .throughServer: return .network
case .overLocalWifi: return .wifi
}
}
}
extension TransmissionType: CaseIterable {
}
extension TransmissionType: CustomStringConvertible {
var description: String {
displayName
}
}
extension TransmissionType {
var displayName: String {
switch self {
case .throughServer: return "Mobile"
case .overLocalWifi: return "WiFi"
}
}
}