mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-17 08:51:30 +03:00
feat, update, win, macos (#11618)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
23
src/ipc.rs
23
src/ipc.rs
@@ -275,6 +275,11 @@ pub enum Data {
|
||||
#[cfg(all(target_os = "windows", feature = "flutter"))]
|
||||
PrinterData(Vec<u8>),
|
||||
InstallOption(Option<(String, String)>),
|
||||
#[cfg(all(
|
||||
feature = "flutter",
|
||||
not(any(target_os = "android", target_os = "ios"))
|
||||
))]
|
||||
ControllingSessionCount(usize),
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
@@ -599,6 +604,13 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
.await
|
||||
);
|
||||
}
|
||||
#[cfg(all(
|
||||
feature = "flutter",
|
||||
not(any(target_os = "android", target_os = "ios"))
|
||||
))]
|
||||
Data::ControllingSessionCount(count) => {
|
||||
crate::updater::update_controlling_session_count(count);
|
||||
}
|
||||
#[cfg(feature = "hwcodec")]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
Data::CheckHwcodec => {
|
||||
@@ -1280,6 +1292,17 @@ pub async fn clear_wayland_screencast_restore_token(key: String) -> ResultType<b
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
feature = "flutter",
|
||||
not(any(target_os = "android", target_os = "ios"))
|
||||
))]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub async fn update_controlling_session_count(count: usize) -> ResultType<()> {
|
||||
let mut c = connect(1000, "").await?;
|
||||
c.send(&Data::ControllingSessionCount(count)).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn handle_wayland_screencast_restore_token(
|
||||
key: String,
|
||||
value: String,
|
||||
|
||||
Reference in New Issue
Block a user