mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-24 21:51:14 +03:00
feat: change dummy c to a rust plugin example
This commit is contained in:
@@ -8,8 +8,8 @@ pub type UnloadPluginFunc = fn(*const c_char) -> i32;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct RustDeskApiTable {
|
||||
pub register_plugin: LoadPluginFunc,
|
||||
pub unload_plugin: UnloadPluginFunc,
|
||||
pub(crate) register_plugin: LoadPluginFunc,
|
||||
pub(crate) unload_plugin: UnloadPluginFunc,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@@ -22,11 +22,6 @@ fn unload_plugin(path: *const c_char) -> i32 {
|
||||
PLUGIN_REGISTRAR.unload_plugin(path)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
fn get_api_table() -> RustDeskApiTable {
|
||||
RustDeskApiTable::default()
|
||||
}
|
||||
|
||||
impl Default for RustDeskApiTable {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user