summaryrefslogtreecommitdiffstats
path: root/twrp-functions.hpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-27 15:49:29 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-27 15:50:56 +0200
commita58beade0a4f5342f5dcd3b3a597f9183de92260 (patch)
tree62bfd10e4fc279cc4decc7fd96a0e6a86d710008 /twrp-functions.hpp
parentDisplay symlinks and block devices in file manager (diff)
downloadandroid_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar.gz
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar.bz2
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar.lz
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar.xz
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.tar.zst
android_bootable_recovery-a58beade0a4f5342f5dcd3b3a597f9183de92260.zip
Diffstat (limited to 'twrp-functions.hpp')
-rw-r--r--twrp-functions.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index aebd7c3ef..7bda28725 100644
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -5,6 +5,16 @@
using namespace std;
+typedef enum
+{
+ rb_current = 0,
+ rb_system,
+ rb_recovery,
+ rb_poweroff,
+ rb_bootloader, // May also be fastboot
+ rb_download,
+} RebootCommand;
+
// Partition class
class TWFunc
{
@@ -23,6 +33,13 @@ public:
static void GUI_Operation_Text(string Read_Value, string Default_Text); // Updates text for display in the GUI, e.g. Backing up %partition name%
static void GUI_Operation_Text(string Read_Value, string Partition_Name, string Default_Text); // Same as above but includes partition name
static unsigned long Get_File_Size(string Path); // Returns the size of a file
+ static void twfinish_recovery(const char *send_intent);
+ static int tw_reboot(RebootCommand command);
+ static void check_and_run_script(const char* script_file, const char* display_name);
+
+private:
+ static void check_and_fclose(FILE *fp, const char *name);
+ static void copy_log_file(const char* source, const char* destination, int append);
};