Dees Troy | 3be70a8 | 2013-10-22 14:25:12 +0000 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2012 bigbiff/Dees_Troy TeamWin |
| 3 | This file is part of TWRP/TeamWin Recovery Project. |
| 4 | |
| 5 | TWRP is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation, either version 3 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | TWRP is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with TWRP. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 18 | |
| 19 | #ifndef _OPENRECOVERYSCRIPT_HPP |
| 20 | #define _OPENRECOVERYSCRIPT_HPP |
| 21 | |
| 22 | #include <string> |
| 23 | |
| 24 | using namespace std; |
| 25 | |
| 26 | // Partition class |
| 27 | class OpenRecoveryScript |
| 28 | { |
| 29 | public: |
| 30 | static int check_for_script_file(); // Checks to see if the ORS file is present in /cache |
Ethan Yonker | 03a42f6 | 2014-08-08 11:03:51 -0500 | [diff] [blame] | 31 | static int copy_script_file(string filename); // Copies a script file to the temp folder |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 32 | static int run_script_file(); // Executes the commands in the ORS file |
Dees_Troy | 01b6d0c | 2013-01-22 01:41:09 +0000 | [diff] [blame] | 33 | 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] | 34 | static int Install_Command(string Zip); // Installs a zip |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 35 | 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] | 36 | static int Backup_Command(string Options); // Runs a backup |
Dees_Troy | 6ed34b7 | 2013-01-25 15:01:29 +0000 | [diff] [blame] | 37 | static void Run_OpenRecoveryScript(); // Starts the GUI Page for running OpenRecoveryScript |
Dees_Troy | 812660f | 2012-09-20 09:55:17 -0400 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | #endif // _OPENRECOVERYSCRIPT_HPP |