1/*
2 * Copyright (C) 2010 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/*
18 * Functions to parse and manipulate the additional data tables added
19 * to optimized .dex files.
20 */
21
22#ifndef _LIBDEX_DEXOPTDATA
23#define _LIBDEX_DEXOPTDATA
24
25#include "libdex/DexFile.h"
26
27/*
28 * Parse the optimized data tables in the given dex file.
29 *
30 * @param data pointer to the start of the entire dex file
31 * @param length length of the entire dex file, in bytes
32 * @param pDexFile pointer to the associated dex file structure
33 */
34bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile);
35
36/*
37 * Compute the checksum of the optimized data tables pointed at by the given
38 * header.
39 */
40u4 dexComputeOptChecksum(const DexOptHeader* pOptHeader);
41
42#endif /* def _LIBDEX_DEXOPTDATA */
43