summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
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