Files
suixinkan_ios_new/suixinkan/Features/TravelAlbum/Models/CameraConnectionState.swift
汉秋 be9c844bd3 将 otg_swift OTG 引擎迁入 Core/CameraOTG,并接入旅拍有线传图与历史导入。
恢复 USB 相机连接、边拍边传、三品牌驱动与 SwiftUI 历史导入页,通过适配层对接现有本地上传与 OSS 管道。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 11:22:07 +08:00

31 lines
733 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Foundation
/// 线UI 使
enum CameraConnectionState: Equatable {
case disconnected
case searching
case connecting
case connected(deviceName: String)
case error(String)
var displayText: String {
switch self {
case .disconnected:
"未连接"
case .searching:
"正在搜索相机…"
case .connecting:
"正在连接…"
case .connected(let name):
"已连接:\(name)"
case .error(let message):
"错误:\(message)"
}
}
var isConnected: Bool {
if case .connected = self { return true }
return false
}
}