blob: 20faeb5c4ea9764950af929cf3b7ab7469287f80 [file] [log] [blame]
Calin Juravlec9e76792018-02-01 14:44:56 +00001/*
2 ** Copyright 2018, The Android Open Source Project
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16
17#ifndef OTAPREOPT_PARAMETERS_H_
18#define OTAPREOPT_PARAMETERS_H_
19
20#include <string>
21#include <sys/types.h>
22
23namespace android {
24namespace installd {
25
26class OTAPreoptParameters {
27 public:
28 bool ReadArguments(int argc, const char** argv);
29
30 private:
31 bool ReadArgumentsV1(int argc, const char** argv);
32 bool ReadArgumentsV2(int argc, const char** argv, bool versioned);
33 bool ReadArgumentsV3(int argc, const char** argv);
34 bool ReadArgumentsV4(int argc, const char** argv);
35 bool ReadArgumentsV5(int argc, const char** argv);
36
37 const char* apk_path;
38 uid_t uid;
39 const char* pkgName;
40 const char* instruction_set;
41 int dexopt_needed;
42 const char* oat_dir;
43 int dexopt_flags;
44 const char* compiler_filter;
45 const char* volume_uuid;
46 const char* shared_libraries;
47 const char* se_info;
48 bool downgrade;
49 int target_sdk_version;
50 const char* profile_name;
51
52 std::string target_slot;
53
54 friend class OTAPreoptService;
55 friend class OTAPreoptTest;
56};
57
58} // namespace installd
59} // namespace android
60
61#endif // OTAPREOPT_PARAMETERS_H_