blob: 6bb2cb865b086b8f3574842682970fe49901dba3 [file] [log] [blame]
bigbiffdf8436b2020-08-30 16:22:34 -04001/*
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"
31#include "install/get_args.h"
32
33class startupArgs {
34public:
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";
DarthJabba958d1e7a2020-10-23 14:44:08 +010043 static inline std::string const RESCUE_PARTY = "--prompt_and_wipe_data";
bigbiffdf8436b2020-08-30 16:22:34 -040044 void parse(int *argc, char ***argv);
45 bool Should_Skip_Decryption();
46 std::string Get_Intent();
47 bool Get_Fastboot_Mode();
48
49private:
50 bool SkipDecryption = false;
51 bool fastboot_mode = false;
52 std::string Send_Intent;
53};
DarthJabba958d1e7a2020-10-23 14:44:08 +010054#endif