feat: 虚拟媒体支持同时挂载多个镜像

This commit is contained in:
mofeng-git
2026-07-12 11:40:01 +08:00
parent c9ae9dd893
commit 7c9166a8cf
24 changed files with 1513 additions and 1036 deletions

View File

@@ -6,7 +6,7 @@ use self::types::EXACT_EVENT_TOPICS;
pub use types::{
AtxDeviceInfo, AudioDeviceInfo, ClientStats, HidDeviceInfo, LedState, MsdDeviceInfo,
StreamDeviceLostKind, SystemEvent, TtydDeviceInfo, VideoDeviceInfo,
MsdDeviceMediaInfo, StreamDeviceLostKind, SystemEvent, TtydDeviceInfo, VideoDeviceInfo,
};
use tokio::sync::broadcast;

View File

@@ -42,12 +42,24 @@ pub struct HidDeviceInfo {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MsdDeviceInfo {
pub available: bool,
pub mode: String,
pub connected: bool,
pub image_id: Option<String>,
pub disk_mode: String,
pub slot_capacity: u8,
pub mounted_count: u8,
pub mounted_media: Vec<MsdDeviceMediaInfo>,
pub usb_reenumerating: bool,
pub error: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MsdDeviceMediaInfo {
pub id: String,
pub kind: String,
pub name: String,
pub cdrom: bool,
pub read_only: bool,
pub size: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AtxDeviceInfo {
pub available: bool,