handle peer event

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-19 17:06:59 +08:00
parent c8be2016f1
commit f7e2938e6b
9 changed files with 242 additions and 34 deletions

View File

@@ -48,10 +48,12 @@ fn initialize(app_dir: &str) {
}
}
#[inline]
pub fn start_global_event_stream(s: StreamSink<String>, app_type: String) -> ResultType<()> {
super::flutter::start_global_event_stream(s, app_type)
}
#[inline]
pub fn stop_global_event_stream(app_type: String) {
super::flutter::stop_global_event_stream(app_type)
}
@@ -1391,6 +1393,15 @@ pub fn send_url_scheme(_url: String) {
std::thread::spawn(move || crate::handle_url_scheme(_url));
}
#[inline]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn plugin_event(id: String, event: Vec<u8>) {
#[cfg(feature = "plugin_framework")]
{
crate::plugin::handle_ui_event(&id, &event);
}
}
#[cfg(target_os = "android")]
pub mod server_side {
use hbb_common::{config, log};