mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-19 11:11:04 +03:00
feat: add native call
This commit is contained in:
@@ -1,28 +1,35 @@
|
||||
use crate::{call_if_method, define_method_prefix, return_if_not_method};
|
||||
|
||||
use super::PluginNativeHandler;
|
||||
|
||||
|
||||
#[derive(Default)]
|
||||
/// Session related handler for librustdesk core.
|
||||
pub struct PluginNativeSessionHandler;
|
||||
|
||||
|
||||
impl PluginNativeHandler for PluginNativeSessionHandler {
|
||||
fn on_message(method: &String, data: &serde_json::Map<String, serde_json::Value>) -> Option<super::NR> {
|
||||
define_method_prefix!("session_");
|
||||
|
||||
fn on_message(
|
||||
&self,
|
||||
method: &str,
|
||||
data: &serde_json::Map<String, serde_json::Value>,
|
||||
) -> Option<super::NR> {
|
||||
None
|
||||
}
|
||||
|
||||
fn on_message_raw(method: &String, data: &serde_json::Map<String, serde_json::Value>, raw: *const std::ffi::c_void, raw_len: usize) -> Option<super::NR> {
|
||||
fn on_message_raw(
|
||||
&self,
|
||||
method: &str,
|
||||
data: &serde_json::Map<String, serde_json::Value>,
|
||||
raw: *const std::ffi::c_void,
|
||||
raw_len: usize,
|
||||
) -> Option<super::NR> {
|
||||
None
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl PluginNativeSessionHandler {
|
||||
fn create_session() {
|
||||
fn create_session() {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
fn add_session_hook() {
|
||||
|
||||
}
|
||||
}
|
||||
fn add_session_hook() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user