blob: 53a47c42b2585c45b663164470bfbb0f0922fb50 [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";
43 void parse(int *argc, char ***argv);
44 bool Should_Skip_Decryption();
45 std::string Get_Intent();
46 bool Get_Fastboot_Mode();
47
48private:
49 bool SkipDecryption = false;
50 bool fastboot_mode = false;
51 std::string Send_Intent;
52};
53#endif