mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-07 06:39:10 +08:00
[feat] add dual-pane file transfers and directory browsing, refs #135
This commit is contained in:
@@ -145,6 +145,8 @@ struct HostInfo {
|
||||
bool supports_deskhub_resolution;
|
||||
bool supports_deskhub_fps15;
|
||||
bool supports_deskhub_bandwidth;
|
||||
// Optional; legacy peers keep the original single-file transfer UI.
|
||||
bool supports_file_browser;
|
||||
};
|
||||
|
||||
struct ServiceStatus {
|
||||
|
||||
@@ -32,6 +32,7 @@ void ResetHostInfo(HostInfo& info) {
|
||||
info.supports_deskhub_resolution = false;
|
||||
info.supports_deskhub_fps15 = false;
|
||||
info.supports_deskhub_bandwidth = false;
|
||||
info.supports_file_browser = false;
|
||||
}
|
||||
|
||||
void CopyHostName(HostInfo& info, const std::string& host_name) {
|
||||
@@ -251,7 +252,8 @@ std::string RemoteAction::ToJson(const RemoteAction& action) {
|
||||
{"supports_deskhub_preview", action.i.supports_deskhub_preview},
|
||||
{"supports_deskhub_resolution", action.i.supports_deskhub_resolution},
|
||||
{"supports_deskhub_fps15", action.i.supports_deskhub_fps15},
|
||||
{"supports_deskhub_bandwidth", action.i.supports_deskhub_bandwidth}};
|
||||
{"supports_deskhub_bandwidth", action.i.supports_deskhub_bandwidth},
|
||||
{"supports_file_browser", action.i.supports_file_browser}};
|
||||
break;
|
||||
}
|
||||
case ControlType::invalid:
|
||||
@@ -476,6 +478,8 @@ bool RemoteAction::FromJson(const std::string& json_string,
|
||||
host_info_object.value("supports_deskhub_fps15", false);
|
||||
output.i.supports_deskhub_bandwidth =
|
||||
host_info_object.value("supports_deskhub_bandwidth", false);
|
||||
output.i.supports_file_browser =
|
||||
host_info_object.value("supports_file_browser", false);
|
||||
const std::string host_name =
|
||||
host_info_object.at("host_name").get<std::string>();
|
||||
CopyHostName(output.i, host_name);
|
||||
|
||||
Reference in New Issue
Block a user