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:
@@ -147,6 +147,8 @@ void PeerEventHandler::OnReceiveDataBuffer(
|
||||
source_id == runtime->clipboard_label_ ||
|
||||
source_id == web_clipboard::kStream))
|
||||
return;
|
||||
if (source_id == runtime->control_data_label_ &&
|
||||
runtime->transfers_.HandleBrowser(data, size, handler, remote_id)) return;
|
||||
if (source_id == web_clipboard::kStream) {
|
||||
runtime->clipboard_.ReceiveWeb(
|
||||
data, size, remote_id, handler);
|
||||
@@ -424,6 +426,10 @@ void PeerEventHandler::OnReceiveDataBuffer(
|
||||
}
|
||||
|
||||
if (remote_action.type == ControlType::host_infomation) {
|
||||
if (source_id == runtime->control_data_label_) {
|
||||
runtime->transfers_.SetBrowserSupport(handler, remote_id,
|
||||
remote_action.i.supports_file_browser);
|
||||
}
|
||||
bool is_client_mode = false;
|
||||
std::shared_ptr<GuiRuntime::RemoteSession> props;
|
||||
{
|
||||
|
||||
@@ -359,6 +359,7 @@ void PeerEventHandler::DispatchConnectionStatus(ConnectionStatus status,
|
||||
remote_action.i.supports_deskhub_resolution = true;
|
||||
remote_action.i.supports_deskhub_fps15 = true;
|
||||
remote_action.i.supports_deskhub_bandwidth = true;
|
||||
remote_action.i.supports_file_browser = !runtime->unattended_host_;
|
||||
for (std::size_t i = 0; i < remote_action.i.display_num; i++) {
|
||||
LOG_INFO("Local display [{}:{}]", i + 1,
|
||||
remote_action.i.display_list[i]);
|
||||
@@ -528,6 +529,7 @@ void PeerEventHandler::DispatchConnectionStatus(ConnectionStatus status,
|
||||
remote_action.i.supports_deskhub_resolution = true;
|
||||
remote_action.i.supports_deskhub_fps15 = true;
|
||||
remote_action.i.supports_deskhub_bandwidth = true;
|
||||
remote_action.i.supports_file_browser = !runtime->unattended_host_;
|
||||
for (std::size_t i = 0; i < remote_action.i.display_num; i++) {
|
||||
LOG_INFO("Local display [{}:{}]", i + 1,
|
||||
remote_action.i.display_list[i]);
|
||||
|
||||
@@ -73,6 +73,7 @@ struct FileTransferState {
|
||||
uint32_t file_id = 0;
|
||||
uint32_t rate_bps = 0;
|
||||
bool receiving = false;
|
||||
uint32_t wire_file_id = 0;
|
||||
};
|
||||
std::vector<FileTransferInfo> file_transfer_list_;
|
||||
std::mutex file_transfer_list_mutex_;
|
||||
|
||||
Reference in New Issue
Block a user