Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Mar 17, 2024
1 parent 904133d commit 758e8ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
30 changes: 7 additions & 23 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
// }
// }
}
};

Expand Down Expand Up @@ -107,14 +92,13 @@ static SETUP_PLUGINS: fn() -> Vec<PluginFunctions> = || -> Vec<PluginFunctions>
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",
Expand Down
2 changes: 2 additions & 0 deletions src/plugin/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 758e8ed

Please sign in to comment.