diff --git a/src/lib.rs b/src/lib.rs index 7bdf8cd..e3be52c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,21 +64,6 @@ static SETUP_LIBS: fn() = || { } } }); - // unsafe { - // for plugin in PLUGINS.iter() { - // println!("worked till startup"); - // (plugin.startup)(); - // println!("worked till data"); - // let data = (plugin.data)(); - // println!("worked till here"); - // dbg!(&data.path); - // println!("worked till here"); - // dbg!(&data.interfaces); - // println!("worked till here"); - // cross.insert(data.path, &data.interfaces, data.data); - // println!("worked till here"); - // } - // } } }; @@ -107,14 +92,13 @@ static SETUP_PLUGINS: fn() -> Vec = || -> Vec if let (Ok(dbus_interface), Ok(startup), Ok(shutdown), Ok(capabilities), Ok(tests)) = (dbus_interface, startup, shutdown, capabilities, tests) { - println!("worked till here"); - (startup)(); - let functions = - PluginFunctions::new(startup, shutdown, capabilities, dbus_interface, tests); - (functions.startup)(); - (functions.data)(); - plugins.push(functions); - println!("worked till here"); + plugins.push(PluginFunctions::new( + startup, + shutdown, + capabilities, + dbus_interface, + tests, + )); } else { ERROR!( "/tmp/reset_daemon_log", diff --git a/src/plugin/functions.rs b/src/plugin/functions.rs index ed49d00..fbd9cf0 100644 --- a/src/plugin/functions.rs +++ b/src/plugin/functions.rs @@ -8,9 +8,11 @@ extern "C" { pub fn shutdown(); /// Reports the capabilities that your plugin will provide, simply return a vector of strings. + #[allow(improper_ctypes)] pub fn capabilities() -> PluginCapabilities; /// Inserts your plugin interface into the dbus server. + #[allow(improper_ctypes)] pub fn dbus_interface() -> Plugin; /// Use this function to return any tests you would like to have run.