Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 1 | /* OpenRecoveryScript class for TWRP |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | * You should have received a copy of the GNU General Public License |
| 13 | * along with this program; if not, write to the Free Software |
| 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 15 | * 02110-1301, USA. |
| 16 | * |
| 17 | * The code was written from scratch by Dees_Troy dees_troy at |
| 18 | * yahoo |
| 19 | * |
| 20 | * Copyright (c) 2012 |
| 21 | */ |
| 22 | |
| 23 | #ifndef _OPENRECOVERYSCRIPT_HPP |
| 24 | #define _OPENRECOVERYSCRIPT_HPP |
| 25 | |
| 26 | #include <string> |
| 27 | |
| 28 | using namespace std; |
| 29 | |
| 30 | // Partition class |
| 31 | class OpenRecoveryScript |
| 32 | { |
| 33 | public: |
| 34 | static int check_for_script_file(); // Checks to see if the ORS file is present in /cache |
| 35 | static int run_script_file(); // Executes the commands in the ORS file |
Dees_Troy | 01b6d0c | 2013-01-22 01:41:09 +0000 | [diff] [blame] | 36 | static int Insert_ORS_Command(string Command); // Inserts the Command into the SCRIPT_FILE_TMP file |
Dees_Troy | 83a3b12 | 2012-10-01 14:16:43 -0400 | [diff] [blame] | 37 | static int Install_Command(string Zip); // Installs a zip |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 38 | static string Locate_Zip_File(string Path, string File); // Attempts to locate the zip file in storage |
Dees_Troy | 83a3b12 | 2012-10-01 14:16:43 -0400 | [diff] [blame] | 39 | static int Backup_Command(string Options); // Runs a backup |
Dees_Troy | 6ed34b7 | 2013-01-25 15:01:29 +0000 | [diff] [blame] | 40 | static void Run_OpenRecoveryScript(); // Starts the GUI Page for running OpenRecoveryScript |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | #endif // _OPENRECOVERYSCRIPT_HPP |