- 登录页改为用户认证(本地演示认证,账号密码非空通过) - 新增桌面列表页:Windows/Moonlight 可连接,Ubuntu/麒麟待分配 - 新增 DesktopService 适配层(登录/桌面列表/连接票据,后续接 API) - 新增 MoonlightSession:QProcess 参数数组直启 moonlight-qt,退出回列表 - 状态机扩展 AUTHENTICATING / DESKTOP_LIST - 移除开机自动 RDP,收敛为 monitor -> kiosk-shell 单一自启链 - Monitor 按进程组结束整棵进程树,修复孤儿串流进程 - vdi-moonlight 启动器新增 vsync/frame-pacing/overlay 低延迟开关
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
// 终端本地配置
|
||
//
|
||
// 对应《VDI 云桌面软件开发方案》4.2 节 config_template 的终端侧镜像:
|
||
// 终端保存一份本地的配置版本,API 下发后覆盖。
|
||
// 当前阶段先做本地文件版本,后续由 vdt-agent 接管与 API 同步。
|
||
|
||
#ifndef KIOSK_SHELL_CONFIG_H
|
||
#define KIOSK_SHELL_CONFIG_H
|
||
|
||
#include <string>
|
||
|
||
namespace vdi {
|
||
|
||
struct TerminalConfig {
|
||
// 设备身份
|
||
std::string sn; // 序列号
|
||
std::string deviceKey; // 预置密钥(注册用)
|
||
|
||
// 首配
|
||
std::string server; // 服务器地址
|
||
std::string username; // 登录账号
|
||
std::string password; // 登录密码
|
||
std::string wifiSsid; // WiFi SSID
|
||
std::string wifiPassword;
|
||
|
||
// 显示档位:1920x1440 / 2560x1440 / 1920x1080 / 1280x720
|
||
std::string resolution = "1920x1440";
|
||
|
||
// 是否记住连接参数
|
||
bool remember = true;
|
||
|
||
int version = 0;
|
||
};
|
||
|
||
// 配置路径:~/.config/vdi-terminal/client.conf
|
||
std::string configDir();
|
||
std::string configPath();
|
||
|
||
// 读取配置;文件不存在时返回默认值
|
||
TerminalConfig loadConfig();
|
||
|
||
// 判断是否已经有 Agent/API 下发的可用桌面连接配置。
|
||
bool hasConnectionConfig(const TerminalConfig& cfg);
|
||
|
||
// 保存配置
|
||
bool saveConfig(const TerminalConfig& cfg);
|
||
|
||
// 读取设备序列号(优先取 /etc/machine-id,其次 /proc/device-tree/serial-number)
|
||
std::string readSerialNumber();
|
||
|
||
} // namespace vdi
|
||
|
||
#endif // KIOSK_SHELL_CONFIG_H
|