mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -1405,6 +1405,54 @@ pub fn plugin_event(_id: String, _event: Vec<u8>) {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn plugin_get_session_option(_id: String, _peer: String, _key: String) -> SyncReturn<String> {
|
||||
#[cfg(feature = "plugin_framework")]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
return SyncReturn(crate::plugin::PeerConfig::get(&_id, &_peer, &_key));
|
||||
}
|
||||
#[cfg(any(
|
||||
not(feature = "plugin_framework"),
|
||||
target_os = "android",
|
||||
target_os = "ios"
|
||||
))]
|
||||
return SyncReturn("".to_owned());
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn plugin_set_session_option(_id: String, _peer: String, _key: String, _value: String) {
|
||||
#[cfg(feature = "plugin_framework")]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
crate::plugin::PeerConfig::set(&_id, &_peer, &_key, &_value);
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn plugin_get_local_option(_id: String, _key: String) -> SyncReturn<String> {
|
||||
#[cfg(feature = "plugin_framework")]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
allow_err!(crate::plugin::LocalConfig::get(&_id, &key));
|
||||
}
|
||||
#[cfg(any(
|
||||
not(feature = "plugin_framework"),
|
||||
target_os = "android",
|
||||
target_os = "ios"
|
||||
))]
|
||||
return SyncReturn("".to_owned());
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn plugin_set_local_option(_id: String, _key: String, _value: String) {
|
||||
#[cfg(feature = "plugin_framework")]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
{
|
||||
crate::plugin::LocalConfig::set(&_id, &_key, &_value);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub mod server_side {
|
||||
use hbb_common::{config, log};
|
||||
|
||||
Reference in New Issue
Block a user