Organize headers

This commit is contained in:
topjohnwu 2023-05-22 21:36:15 -07:00
parent eddc862fa3
commit 0f666de5e6
4 changed files with 12 additions and 10 deletions

View File

@ -2,7 +2,9 @@
#include <string>
#include <vector>
#include <cxx.h>
#include "core-rs.hpp"
#include "resetprop/resetprop.hpp"
extern bool RECOVERY_MODE;
extern std::atomic<ino_t> pkg_xml_ino;
@ -27,10 +29,3 @@ void install_apk(const char *apk);
void uninstall_pkg(const char *pkg);
void clear_pkg(const char *pkg, int user_id);
[[noreturn]] void install_module(const char *file);
// System properties
rust::String get_prop_rs(const char *name, bool persist);
std::string get_prop(const char *name, bool persist = false);
int delete_prop(const char *name, bool persist = false);
int set_prop(const char *name, const char *value, bool skip_svc = false);
void load_prop_file(const char *filename, bool skip_svc = false);

View File

@ -9,7 +9,7 @@ mod logging;
#[cxx::bridge]
pub mod ffi {
extern "C++" {
include!("core.hpp");
include!("resetprop/resetprop.hpp");
unsafe fn get_prop_rs(name: *const c_char, persist: bool) -> String;
}

View File

@ -5,7 +5,6 @@
#include <base.hpp>
#include "../core.hpp"
#include "resetprop.hpp"
using namespace std;

View File

@ -2,6 +2,7 @@
#include <string>
#include <map>
#include <cxx.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <api/_system_properties.h>
@ -21,6 +22,13 @@ private:
prop_list &list;
};
// System properties
rust::String get_prop_rs(const char *name, bool persist);
std::string get_prop(const char *name, bool persist = false);
int delete_prop(const char *name, bool persist = false);
int set_prop(const char *name, const char *value, bool skip_svc = false);
void load_prop_file(const char *filename, bool skip_svc = false);
void persist_get_prop(const char *name, prop_cb *prop_cb);
void persist_get_props(prop_cb *prop_cb);
bool persist_delete_prop(const char *name);