Files
suixinkan_ios_new/suixinkan/Features/TravelAlbum/Models/CameraConnectionState.swift
汉秋 d7fec35715 移除 Core 层 OTG 相机实现,保留旅拍有线传图 UI 与本地照片上传能力。
将本地存储与上传编排下沉到 Features/TravelAlbum,删除 USB/PTP 相关代码与测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 10:55:40 +08:00

31 lines
761 B
Swift
Raw 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 使OTG
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
}
}