mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-01 01:21:06 +03:00
feat/virtual_display_privacy_mode
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -224,6 +224,12 @@ pub fn session_toggle_option(session_id: SessionID, value: String) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_toggle_privacy_mode(session_id: SessionID, impl_key: String) {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
session.toggle_privacy_mode(impl_key);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_get_flutter_option(session_id: SessionID, k: String) -> Option<String> {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
Some(session.get_flutter_option(k))
|
||||
@@ -1974,6 +1980,17 @@ pub fn is_selinux_enforcing() -> SyncReturn<bool> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main_default_privacy_mode_impl() -> SyncReturn<String> {
|
||||
SyncReturn(crate::privacy_mode::DEFAULT_PRIVACY_MODE_IMPL.to_owned())
|
||||
}
|
||||
|
||||
pub fn main_supported_privacy_mode_impls() -> SyncReturn<String> {
|
||||
SyncReturn(
|
||||
serde_json::to_string(&crate::privacy_mode::get_supported_privacy_mode_impl())
|
||||
.unwrap_or_default(),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub mod server_side {
|
||||
use hbb_common::{config, log};
|
||||
|
||||
Reference in New Issue
Block a user