Simplify MagiskD Rust/C++ FFI

This commit is contained in:
topjohnwu
2024-12-03 15:51:17 -08:00
parent 805da67c23
commit 09c7ac754b
6 changed files with 31 additions and 67 deletions

View File

@@ -2,29 +2,6 @@
#include <base.hpp>
namespace rust {
struct MagiskD;
}
struct MagiskD {
// Make sure only references can exist
~MagiskD() = delete;
// Binding to Rust
static const MagiskD &get();
// C++ implementation
void reboot() const;
bool post_fs_data() const;
void late_start() const;
void boot_complete() const;
const rust::MagiskD *operator->() const;
private:
const rust::MagiskD &as_rust() const;
};
const char *get_magisk_tmp();
// Rust bindings