| Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 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 |  | 
| Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 17 | /** | 
|  | 18 | * @addtogroup Storage | 
|  | 19 | * @{ | 
|  | 20 | */ | 
|  | 21 |  | 
|  | 22 | /** | 
|  | 23 | * @file obb.h | 
|  | 24 | */ | 
| Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 25 |  | 
|  | 26 | #ifndef ANDROID_OBB_H | 
|  | 27 | #define ANDROID_OBB_H | 
|  | 28 |  | 
|  | 29 | #include <sys/types.h> | 
|  | 30 |  | 
|  | 31 | #ifdef __cplusplus | 
|  | 32 | extern "C" { | 
|  | 33 | #endif | 
|  | 34 |  | 
|  | 35 | struct AObbInfo; | 
| Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 36 | /** {@link AObbInfo} is an opaque type representing information for obb storage. */ | 
| Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 37 | typedef struct AObbInfo AObbInfo; | 
|  | 38 |  | 
| Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 39 | /** Flag for an obb file, returned by AObbInfo_getFlags(). */ | 
| Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 40 | enum { | 
| Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 41 | /** overlay */ | 
| Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 42 | AOBBINFO_OVERLAY = 0x0001, | 
|  | 43 | }; | 
|  | 44 |  | 
|  | 45 | /** | 
|  | 46 | * Scan an OBB and get information about it. | 
|  | 47 | */ | 
|  | 48 | AObbInfo* AObbScanner_getObbInfo(const char* filename); | 
|  | 49 |  | 
|  | 50 | /** | 
|  | 51 | * Destroy the AObbInfo object. You must call this when finished with the object. | 
|  | 52 | */ | 
|  | 53 | void AObbInfo_delete(AObbInfo* obbInfo); | 
|  | 54 |  | 
|  | 55 | /** | 
|  | 56 | * Get the package name for the OBB. | 
|  | 57 | */ | 
|  | 58 | const char* AObbInfo_getPackageName(AObbInfo* obbInfo); | 
|  | 59 |  | 
|  | 60 | /** | 
|  | 61 | * Get the version of an OBB file. | 
|  | 62 | */ | 
|  | 63 | int32_t AObbInfo_getVersion(AObbInfo* obbInfo); | 
|  | 64 |  | 
|  | 65 | /** | 
|  | 66 | * Get the flags of an OBB file. | 
|  | 67 | */ | 
|  | 68 | int32_t AObbInfo_getFlags(AObbInfo* obbInfo); | 
|  | 69 |  | 
|  | 70 | #ifdef __cplusplus | 
|  | 71 | }; | 
|  | 72 | #endif | 
|  | 73 |  | 
|  | 74 | #endif      // ANDROID_OBB_H | 
| Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 75 |  | 
|  | 76 | /** @} */ |