blob: 1017d90686088cb946e196ac34a280e2237e445f [file] [log] [blame]
Dees_Troy812660f2012-09-20 09:55:17 -04001/* 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
28using namespace std;
29
30// Partition class
31class OpenRecoveryScript
32{
33public:
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_Troy01b6d0c2013-01-22 01:41:09 +000036 static int Insert_ORS_Command(string Command); // Inserts the Command into the SCRIPT_FILE_TMP file
Dees_Troy83a3b122012-10-01 14:16:43 -040037 static int Install_Command(string Zip); // Installs a zip
Dees_Troy812660f2012-09-20 09:55:17 -040038 static string Locate_Zip_File(string Path, string File); // Attempts to locate the zip file in storage
Dees_Troy83a3b122012-10-01 14:16:43 -040039 static int Backup_Command(string Options); // Runs a backup
Dees_Troy6ed34b72013-01-25 15:01:29 +000040 static void Run_OpenRecoveryScript(); // Starts the GUI Page for running OpenRecoveryScript
Dees_Troy812660f2012-09-20 09:55:17 -040041};
42
43#endif // _OPENRECOVERYSCRIPT_HPP