summaryrefslogtreecommitdiffstats
path: root/include/android/asset_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/android/asset_manager.h')
-rw-r--r--include/android/asset_manager.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/include/android/asset_manager.h b/include/android/asset_manager.h
index f5df46b..d654839 100644
--- a/include/android/asset_manager.h
+++ b/include/android/asset_manager.h
@@ -14,6 +14,14 @@
* limitations under the License.
*/
+/**
+ * @addtogroup Asset
+ * @{
+ */
+
+/**
+ * @file asset_manager.h
+ */
#ifndef ANDROID_ASSET_MANAGER_H
#define ANDROID_ASSET_MANAGER_H
@@ -23,19 +31,49 @@ extern "C" {
#endif
struct AAssetManager;
+/**
+ * {@link AAssetManager} provides access to an application's raw assets by
+ * creating {@link AAsset} objects.
+ *
+ * AAssetManager is a wrapper to the low-level native implementation
+ * of the java {@link AAssetManager}, a pointer can be obtained using
+ * AAssetManager_fromJava().
+ *
+ * The asset hierarchy may be examined like a filesystem, using
+ * {@link AAssetDir} objects to peruse a single directory.
+ *
+ * A native {@link AAssetManager} pointer may be shared across multiple threads.
+ */
typedef struct AAssetManager AAssetManager;
struct AAssetDir;
+/**
+ * {@link AAssetDir} provides access to a chunk of the asset hierarchy as if
+ * it were a single directory. The contents are populated by the
+ * {@link AAssetManager}.
+ *
+ * The list of files will be sorted in ascending order by ASCII value.
+ */
typedef struct AAssetDir AAssetDir;
struct AAsset;
+/**
+ * {@link AAsset} provides access to a read-only asset.
+ *
+ * {@link AAsset} objects are NOT thread-safe, and should not be shared across
+ * threads.
+ */
typedef struct AAsset AAsset;
-/* Available modes for opening assets */
+/** Available access modes for opening assets with {@link AAssetManager_open} */
enum {
+ /** No specific information about how data will be accessed. **/
AASSET_MODE_UNKNOWN = 0,
+ /** Read chunks, and seek forward and backward. */
AASSET_MODE_RANDOM = 1,
+ /** Read sequentially, with an occasional forward seek. */
AASSET_MODE_STREAMING = 2,
+ /** Caller plans to ask for a read-only buffer with all data. */
AASSET_MODE_BUFFER = 3
};
@@ -173,3 +211,5 @@ int AAsset_isAllocated(AAsset* asset);
#endif
#endif // ANDROID_ASSET_MANAGER_H
+
+/** @} */