blob: eb5dd857a9b2137bed976aa6d9475a4fa1c1cbaf [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:
Calin Juravle7707aea2018-02-01 14:56:14 +000031 bool ReadArgumentsV1(const char** argv);
32 bool ReadArgumentsPostV1(uint32_t version, const char** argv, bool versioned);
Calin Juravlec9e76792018-02-01 14:44:56 +000033
34 const char* apk_path;
35 uid_t uid;
36 const char* pkgName;
37 const char* instruction_set;
38 int dexopt_needed;
39 const char* oat_dir;
40 int dexopt_flags;
41 const char* compiler_filter;
42 const char* volume_uuid;
43 const char* shared_libraries;
44 const char* se_info;
45 bool downgrade;
46 int target_sdk_version;
47 const char* profile_name;
48
49 std::string target_slot;
50
51 friend class OTAPreoptService;
52 friend class OTAPreoptTest;
53};
54
55} // namespace installd
56} // namespace android
57
58#endif // OTAPREOPT_PARAMETERS_H_