mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-13 02:54:26 +08:00
feat: 虚拟媒体支持同时挂载多个镜像
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user