mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-29 08:01:03 +03:00
use new event channel for mobile and web
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
use crate::client::file_trait::FileManager;
|
||||
#[cfg(target_os = "android")]
|
||||
use crate::mobile::connection_manager::{self, get_clients_length, get_clients_state};
|
||||
use crate::mobile::{make_fd_to_json, Session};
|
||||
use crate::mobile::{self, make_fd_to_json, Session};
|
||||
use flutter_rust_bridge::StreamSink;
|
||||
use hbb_common::ResultType;
|
||||
use hbb_common::{
|
||||
config::{self, Config, PeerConfig, ONLINE, LocalConfig},
|
||||
config::{self, Config, LocalConfig, PeerConfig, ONLINE},
|
||||
fs, log,
|
||||
};
|
||||
use serde_json::{Number, Value};
|
||||
@@ -34,6 +35,11 @@ fn initialize(app_dir: &str) {
|
||||
crate::common::check_software_update();
|
||||
}
|
||||
|
||||
pub fn start_event_stream(s: StreamSink<String>) -> ResultType<()> {
|
||||
let _ = mobile::EVENT_STREAM.write().unwrap().insert(s);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
unsafe extern "C" fn get_by_name(name: *const c_char, arg: *const c_char) -> *const c_char {
|
||||
let mut res = "".to_owned();
|
||||
|
||||
Reference in New Issue
Block a user