OSDN Git Service

am 90232632: Kill stale assert, fix for 4310384
[android-x86/dalvik.git] / libdex / DexOptData.h
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 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /*
32  * Parse the optimized data tables in the given dex file.
33  *
34  * @param data pointer to the start of the entire dex file
35  * @param length length of the entire dex file, in bytes
36  * @param pDexFile pointer to the associated dex file structure
37  */
38 bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile);
39
40 /*
41  * Compute the checksum of the optimized data tables pointed at by the given
42  * header.
43  */
44 u4 dexComputeOptChecksum(const DexOptHeader* pOptHeader);
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif /* def _LIBDEX_DEXOPTDATA */