blob: c3eabf6df92efa9ad1c51da6a198125a65f033e1 [file] [log] [blame]
Dees Troy3be70a82013-10-22 14:25:12 +00001/*
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_Troy812660f2012-09-20 09:55:17 -040018
19#ifndef _OPENRECOVERYSCRIPT_HPP
20#define _OPENRECOVERYSCRIPT_HPP
21
22#include <string>
23
24using namespace std;
25
26// Partition class
27class OpenRecoveryScript
28{
29public:
30 static int check_for_script_file(); // Checks to see if the ORS file is present in /cache
Ethan Yonker03a42f62014-08-08 11:03:51 -050031 static int copy_script_file(string filename); // Copies a script file to the temp folder
Dees_Troy812660f2012-09-20 09:55:17 -040032 static int run_script_file(); // Executes the commands in the ORS file
Dees_Troy01b6d0c2013-01-22 01:41:09 +000033 static int Insert_ORS_Command(string Command); // Inserts the Command into the SCRIPT_FILE_TMP file
Dees_Troy83a3b122012-10-01 14:16:43 -040034 static int Install_Command(string Zip); // Installs a zip
Dees_Troy812660f2012-09-20 09:55:17 -040035 static string Locate_Zip_File(string Path, string File); // Attempts to locate the zip file in storage
Dees_Troy83a3b122012-10-01 14:16:43 -040036 static int Backup_Command(string Options); // Runs a backup
Dees_Troy6ed34b72013-01-25 15:01:29 +000037 static void Run_OpenRecoveryScript(); // Starts the GUI Page for running OpenRecoveryScript
Dees_Troy812660f2012-09-20 09:55:17 -040038};
39
40#endif // _OPENRECOVERYSCRIPT_HPP