bigbiff | df8436b | 2020-08-30 16:22:34 -0400 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2012-2020 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 | */ |
| 18 | |
| 19 | #ifndef STARTUPARGS_HPP |
| 20 | #define STARTUPARGS_HPP |
| 21 | #include <android-base/properties.h> |
| 22 | |
| 23 | #include "data.hpp" |
| 24 | #include "gui/gui.hpp" |
| 25 | #include "openrecoveryscript.hpp" |
| 26 | #include "partitions.hpp" |
| 27 | #include "twcommon.h" |
| 28 | #include "twrp-functions.hpp" |
| 29 | #include "variables.h" |
| 30 | #include "bootloader_message/include/bootloader_message/bootloader_message.h" |
bigbiff | 1f9e484 | 2020-10-31 11:33:15 -0400 | [diff] [blame] | 31 | #include "twinstall/get_args.h" |
bigbiff | df8436b | 2020-08-30 16:22:34 -0400 | [diff] [blame] | 32 | |
| 33 | class startupArgs { |
| 34 | public: |
| 35 | static inline std::string const UPDATE_PACKAGE = "--update_package"; |
| 36 | static inline std::string const WIPE_CACHE = "--wipe_cache"; |
| 37 | static inline std::string const WIPE_DATA = "--wipe_data"; |
| 38 | static inline std::string const SEND_INTENT = "--send_intent"; |
| 39 | static inline std::string const SIDELOAD = "--sideload"; |
| 40 | static inline std::string const REASON = "--reason"; |
| 41 | static inline std::string const FASTBOOT = "--fastboot"; |
| 42 | static inline std::string const NANDROID = "--nandroid"; |
DarthJabba9 | 58d1e7a | 2020-10-23 14:44:08 +0100 | [diff] [blame] | 43 | static inline std::string const RESCUE_PARTY = "--prompt_and_wipe_data"; |
bigbiff | df8436b | 2020-08-30 16:22:34 -0400 | [diff] [blame] | 44 | void parse(int *argc, char ***argv); |
| 45 | bool Should_Skip_Decryption(); |
| 46 | std::string Get_Intent(); |
| 47 | bool Get_Fastboot_Mode(); |
| 48 | |
| 49 | private: |
| 50 | bool SkipDecryption = false; |
| 51 | bool fastboot_mode = false; |
| 52 | std::string Send_Intent; |
| 53 | }; |
DarthJabba9 | 58d1e7a | 2020-10-23 14:44:08 +0100 | [diff] [blame] | 54 | #endif |