blob: 1bfef027311c3399fcc5404447435ca84e27c608 [file] [log] [blame]
Jeff Sharkey6c2c0562016-12-07 12:12:00 -07001/*
2 * Copyright (C) 2016 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 DEXOPT_H_
18#define DEXOPT_H_
19
20#include <sys/types.h>
21
22namespace android {
23namespace installd {
24
25int dexopt(const char *apk_path, uid_t uid, const char *pkgName, const char *instruction_set,
26 int dexopt_needed, const char* oat_dir, int dexopt_flags, const char* compiler_filter,
27 const char* volume_uuid, const char* shared_libraries);
28
29static constexpr size_t DEXOPT_PARAM_COUNT = 10U;
30static_assert(DEXOPT_PARAM_COUNT == 10U, "Unexpected dexopt param size");
31
32// Helper for the above, converting arguments.
33int dexopt(const char* const params[DEXOPT_PARAM_COUNT]);
34
35} // namespace installd
36} // namespace android
37
38#endif // DEXOPT_H_