mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
feat: implement OSX file copy & paste
Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
parent
36d4baaa8e
commit
3dfa0525bd
2284
Cargo.lock
generated
2284
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -62,7 +62,7 @@ num_cpus = "1.15"
|
|||||||
bytes = { version = "1.4", features = ["serde"] }
|
bytes = { version = "1.4", features = ["serde"] }
|
||||||
default-net = "0.14"
|
default-net = "0.14"
|
||||||
wol-rs = "1.0"
|
wol-rs = "1.0"
|
||||||
flutter_rust_bridge = { version = "1.75", features = ["uuid"], optional = true}
|
flutter_rust_bridge = { version = "=1.75", features = ["uuid"], optional = true}
|
||||||
errno = "0.3"
|
errno = "0.3"
|
||||||
rdev = { git = "https://github.com/fufesou/rdev" }
|
rdev = { git = "https://github.com/fufesou/rdev" }
|
||||||
url = { version = "2.3", features = ["serde"] }
|
url = { version = "2.3", features = ["serde"] }
|
||||||
@ -157,7 +157,7 @@ winapi = { version = "0.3", features = [ "winnt" ] }
|
|||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
cc = "1.0"
|
cc = "1.0"
|
||||||
hbb_common = { path = "libs/hbb_common" }
|
hbb_common = { path = "libs/hbb_common" }
|
||||||
flutter_rust_bridge_codegen = "1.75"
|
flutter_rust_bridge_codegen = "=1.75"
|
||||||
os-version = "0.2"
|
os-version = "0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -75,5 +75,5 @@ impl CliprdrServiceContext for DummyCliprdrContext {
|
|||||||
|
|
||||||
// begin of epoch used by microsoft
|
// begin of epoch used by microsoft
|
||||||
// 1601-01-01 00:00:00 + LDAP_EPOCH_DELTA*(100 ns) = 1970-01-01 00:00:00
|
// 1601-01-01 00:00:00 + LDAP_EPOCH_DELTA*(100 ns) = 1970-01-01 00:00:00
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||||
const LDAP_EPOCH_DELTA: u64 = 116444772610000000;
|
const LDAP_EPOCH_DELTA: u64 = 116444772610000000;
|
||||||
|
@ -19,6 +19,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use self::local_file::LocalFile;
|
use self::local_file::LocalFile;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
use self::url::{encode_path_to_uri, parse_plain_uri_list};
|
use self::url::{encode_path_to_uri, parse_plain_uri_list};
|
||||||
|
|
||||||
use super::fuse::FuseServer;
|
use super::fuse::FuseServer;
|
||||||
@ -33,6 +34,7 @@ pub mod x11;
|
|||||||
pub mod ns_clipboard;
|
pub mod ns_clipboard;
|
||||||
|
|
||||||
pub mod local_file;
|
pub mod local_file;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
pub mod url;
|
pub mod url;
|
||||||
|
|
||||||
// not actual format id, just a placeholder
|
// not actual format id, just a placeholder
|
||||||
|
@ -1712,7 +1712,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
||||||
fn handle_cliprdr_msg(&self, clip: hbb_common::message_proto::Cliprdr) {
|
fn handle_cliprdr_msg(&self, clip: hbb_common::message_proto::Cliprdr) {
|
||||||
log::debug!("handling cliprdr msg from server peer");
|
log::debug!("handling cliprdr msg from server peer");
|
||||||
#[cfg(feature = "flutter")]
|
#[cfg(feature = "flutter")]
|
||||||
|
@ -479,7 +479,7 @@ impl Connection {
|
|||||||
ipc::Data::RawMessage(bytes) => {
|
ipc::Data::RawMessage(bytes) => {
|
||||||
allow_err!(conn.stream.send_raw(bytes).await);
|
allow_err!(conn.stream.send_raw(bytes).await);
|
||||||
}
|
}
|
||||||
#[cfg(any(target_os="windows", target_os="linux"))]
|
#[cfg(any(target_os="windows", target_os="linux", target_os = "macos"))]
|
||||||
ipc::Data::ClipboardFile(clip) => {
|
ipc::Data::ClipboardFile(clip) => {
|
||||||
allow_err!(conn.stream.send(&clip_2_msg(clip)).await);
|
allow_err!(conn.stream.send(&clip_2_msg(clip)).await);
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
|||||||
// for tmp use, without real conn id
|
// for tmp use, without real conn id
|
||||||
let mut write_jobs: Vec<fs::TransferJob> = Vec::new();
|
let mut write_jobs: Vec<fs::TransferJob> = Vec::new();
|
||||||
|
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux"), target_os = "macos")]
|
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
||||||
let is_authorized = self.cm.is_authorized(self.conn_id);
|
let is_authorized = self.cm.is_authorized(self.conn_id);
|
||||||
|
|
||||||
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
||||||
@ -512,7 +512,7 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
|||||||
let file_transfer_enabled_peer = self.file_transfer_enabled_peer;
|
let file_transfer_enabled_peer = self.file_transfer_enabled_peer;
|
||||||
let stop = is_stopping_allowed && !(is_clipboard_enabled && file_transfer_enabled && file_transfer_enabled_peer);
|
let stop = is_stopping_allowed && !(is_clipboard_enabled && file_transfer_enabled && file_transfer_enabled_peer);
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"Process clipboard message from cm, stop: {}, is_stopping_allowed: {}, is_clipboard_enabled: {}, file_transfer_enabled: {}, file_transfer_enabled_peer: {}",
|
"Process clipboard message from clip, stop: {}, is_stopping_allowed: {}, is_clipboard_enabled: {}, file_transfer_enabled: {}, file_transfer_enabled_peer: {}",
|
||||||
stop, is_stopping_allowed, is_clipboard_enabled, file_transfer_enabled, file_transfer_enabled_peer);
|
stop, is_stopping_allowed, is_clipboard_enabled, file_transfer_enabled, file_transfer_enabled_peer);
|
||||||
if stop {
|
if stop {
|
||||||
ContextSend::set_is_stopped();
|
ContextSend::set_is_stopped();
|
||||||
|
Loading…
Reference in New Issue
Block a user