summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-09-08 13:50:54 +0200
committerEthan Yonker <dees_troy@teamw.in>2017-09-08 14:14:59 +0200
commit8373cfe28cf1b5ad758faa1d502e21787c3665e4 (patch)
tree2f567c52cd6f89e1052481497d236b58d230b7e2 /common.h
parentDO NOT MERGE Android 8.0 stuff (diff)
parentrelease-request-f4ecf242-5d1c-45e0-8c7c-ede48d1a9e82-for-git_oc-release-4111650 snap-temp-L02200000075283731 (diff)
downloadandroid_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.gz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.bz2
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.lz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.xz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.zst
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.zip
Diffstat (limited to 'common.h')
-rw-r--r--common.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/common.h b/common.h
index 3afb63355..b0901f41a 100644
--- a/common.h
+++ b/common.h
@@ -17,9 +17,9 @@
#ifndef RECOVERY_COMMON_H
#define RECOVERY_COMMON_H
-#include <stdbool.h>
#include <stdio.h>
#include <stdarg.h>
+#include <string>
#ifdef __cplusplus
extern "C" {
@@ -40,18 +40,29 @@ extern "C" {
#define STRINGIFY(x) #x
#define EXPAND(x) STRINGIFY(x)
+class RecoveryUI;
+
+extern RecoveryUI* ui;
extern bool modified_flash;
//typedef struct fstab_rec Volume;
+// The current stage, e.g. "1/2".
+extern std::string stage;
+
+// The reason argument provided in "--reason=".
+extern const char* reason;
+
// fopen a file, mounting volumes and making parent dirs as necessary.
FILE* fopen_path(const char *path, const char *mode);
void ui_print(const char* format, ...);
-bool is_ro_debuggable();
+static bool is_ro_debuggable();
#ifdef __cplusplus
}
#endif
+bool reboot(const std::string& command);
+
#endif // RECOVERY_COMMON_H