Home | History | Annotate | Download | only in androidfw

Lines Matching defs:Asset

18 // Class providing access to a read-only asset.  Asset objects are NOT
41 * "Asset" is the base class for all types of assets. The classes below
45 class Asset {
47 virtual ~Asset(void) = default;
52 /* used when opening an asset */
80 * Close the asset, freeing all associated resources.
100 * Open a new file descriptor that can be used to read this asset.
102 * asset is compressed).
107 * Return whether this asset's buffer is allocated in RAM (not mmapped).
113 * Get a string identifying the asset's source. This might be a full
123 * Adds this Asset to the global Asset list for debugging and
127 static void registerAsset(Asset* asset);
130 * Removes this Asset from the global Asset list.
133 static void unregisterAsset(Asset* asset);
135 Asset(void); // constructor; only invoked indirectly
140 /* set the asset source string */
147 Asset(const Asset& src);
148 Asset& operator=(const Asset& src);
154 * Create the asset from a named file on disk.
156 static Asset* createFromFile(const char* fileName, AccessMode mode);
159 * Create the asset from a named, compressed file on disk (e.g. ".gz").
161 static Asset* createFromCompressedFile(const char* fileName,
166 * Create the asset from a segment of an open file. This will fail
169 * The asset takes ownership of the file descriptor.
171 static Asset* createFromFileSegment(int fd, off64_t offset, size_t length,
179 * The asset takes ownership of the file descriptor.
184 static Asset* createFromCompressedData(int fd, off64_t offset,
190 * Create the asset from a memory-mapped file segment.
192 * The asset takes ownership of the FileMap.
194 static Asset* createFromUncompressedMap(FileMap* dataMap, AccessMode mode);
197 * Create the asset from a memory-mapped file segment with compressed
200 * The asset takes ownership of the FileMap.
202 static Asset* createFromCompressedMap(FileMap* dataMap,
211 AccessMode mAccessMode; // how the asset was opened
214 Asset* mNext; // linked list.
215 Asset* mPrev;
226 * An asset based on an uncompressed file on disk. It may encompass the
229 class _FileAsset : public Asset {
249 * Standard Asset interfaces.
282 * An asset based on compressed data in a file.
284 class _CompressedAsset : public Asset {
305 * Standard Asset interfaces.