vdi-cloud/terminal/kiosk-shell/src/desktop_session.h
songyiming 9f1824ff21 功能:删除 RDP 渲染管线,协议统一 Moonlight;退出三层设计与串流过场层落地
- 移除 rdp_session.*、FreeRDP 构建依赖与代码内协议概念,Moonlight 为唯一会话通道
- Ctrl+Alt+Shift+Q 退串流回列表(kiosk 兜底 + moonlight-qt 主路径);登录页去退出按钮
- 新增 TransitionOverlay:全屏过场层盖住串流启动闪烁,进程 CPU 首帧检测后淡出
- Sunshine 写入 sw_preset=ultrafast;实测推翻 x264 瓶颈结论(21.6FPS 帽子在虚拟显示/捕获节奏,CPU≈0%)
- 文档:麒麟(101/.71)/Ubuntu(102/.72) 接入信息与四件事落地记录;MEMORY 根因修正
2026-10-29 17:37:38 +08:00

57 lines
1.6 KiB
C++
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.

// 桌面与会话领域模型
//
// 产品流程:登录 -> 桌面列表 -> 选择桌面 -> 获取连接票据 -> 启动 Moonlight 会话
//
// 协议统一 Moonlight(RDP 渲染路径已移除,内嵌 RDP 代码保留在 git 历史作网关备用)。
// 当前阶段由本地 DesktopService 提供演示数据;后续接入管理平台后,
// 由 API 适配器返回同样的模型,页面与状态机不感知数据来源。
#ifndef KIOSK_SHELL_DESKTOP_SESSION_H
#define KIOSK_SHELL_DESKTOP_SESSION_H
#include <QString>
#include <vector>
namespace vdi {
// 桌面卡片的运行状态
enum class DesktopState {
kAvailable, // 可连接
kPending, // 任务进行中(开机/重置等)
kUnassigned, // 尚未配置连接地址,暂不可连接
};
struct DesktopInfo {
QString id;
QString name; // 显示名,如 "Windows 10"
QString os; // 操作系统描述
DesktopState state = DesktopState::kUnassigned;
// 连接参数(kUnassigned 时为空)
QString endpoint; // 主机地址(IP / 域名 / VPN 隧道地址)
QString app; // Sunshine 应用名
int width = 1920;
int height = 1080;
int fps = 60;
};
// 一次会话的连接凭据;当前为本地构造,后续由平台 connect-ticket 接口下发
struct ConnectionTicket {
QString desktopId;
QString endpoint;
QString app;
int width = 1920;
int height = 1080;
int fps = 60;
};
struct AuthResult {
bool ok = false;
QString message;
QString displayName; // 登录用户显示名
};
} // namespace vdi
#endif // KIOSK_SHELL_DESKTOP_SESSION_H