Merge pull request #618 from Heap-Hop/flutter_desktop

refactor ui function to global public (ui.rs)
This commit is contained in:
RustDesk 2022-05-26 12:31:32 +08:00 committed by GitHub
commit 7f47b64643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 675 additions and 388 deletions

View File

@ -1,6 +1,7 @@
use crate::client::file_trait::FileManager;
use crate::flutter::connection_manager::{self, get_clients_length, get_clients_state};
use crate::flutter::{self, make_fd_to_json, Session};
use crate::ui;
use flutter_rust_bridge::{StreamSink, ZeroCopyBuffer};
use hbb_common::ResultType;
use hbb_common::{
@ -115,7 +116,7 @@ unsafe extern "C" fn get_by_name(name: *const c_char, arg: *const c_char) -> *co
}
}
"server_id" => {
res = Config::get_id();
res = ui::get_id();
}
"server_password" => {
res = Config::get_password();
@ -296,7 +297,11 @@ unsafe extern "C" fn set_by_name(name: *const c_char, value: *const c_char) {
if name == "custom-rendezvous-server" {
#[cfg(target_os = "android")]
crate::rendezvous_mediator::RendezvousMediator::restart();
#[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
#[cfg(any(
target_os = "android",
target_os = "ios",
feature = "cli"
))]
crate::common::test_rendezvous_server();
}
}

1054
src/ui.rs

File diff suppressed because it is too large Load Diff