Home | History | Annotate | Download | only in android

Lines Matching defs:asset

21 #include <androidfw/Asset.h>
49 Asset* mAsset;
51 explicit AAsset(Asset* asset) : mAsset(asset) { }
70 * Asset Manager functionality
89 Asset::AccessMode amMode;
92 amMode = Asset::ACCESS_UNKNOWN;
95 amMode = Asset::ACCESS_RANDOM;
98 amMode = Asset::ACCESS_STREAMING;
101 amMode = Asset::ACCESS_BUFFER;
108 Asset* asset = mgr->open(filename, amMode);
109 if (asset == NULL) {
113 return new AAsset(asset);
168 * Asset functionality
171 int AAsset_read(AAsset* asset, void* buf, size_t count)
173 return asset->mAsset->read(buf, (size_t)count);
176 off_t AAsset_seek(AAsset* asset, off_t offset, int whence)
178 return asset->mAsset->seek(offset, whence);
181 off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence)
183 return asset->mAsset->seek(offset, whence);
186 void AAsset_close(AAsset* asset)
188 asset->mAsset->close();
189 delete asset;
192 const void* AAsset_getBuffer(AAsset* asset)
194 return asset->mAsset->getBuffer(false);
197 off_t AAsset_getLength(AAsset* asset)
199 return asset->mAsset->getLength();
202 off64_t AAsset_getLength64(AAsset* asset)
204 return asset->mAsset->getLength();
207 off_t AAsset_getRemainingLength(AAsset* asset)
209 return asset->mAsset->getRemainingLength();
212 off64_t AAsset_getRemainingLength64(AAsset* asset)
214 return asset->mAsset->getRemainingLength();
217 int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength)
221 int ret = asset->mAsset->openFileDescriptor(&outStart64, &outLength64);
228 int AAsset_openFileDescriptor64(AAsset* asset, off64_t* outStart, off64_t* outLength)
230 return asset->mAsset->openFileDescriptor(outStart, outLength);
233 int AAsset_isAllocated(AAsset* asset)
235 return asset->mAsset->isAllocated() ? 1 : 0;