1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
page.title=Asset
page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
@jd:body
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#files">Files</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Asset</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:asset__manager_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager_8h.html">asset_manager.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:asset__manager__jni_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="asset__manager__jni_8h.html">asset_manager_jni.h</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga90c459935e76acf809b9ec90d1872771"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td></tr>
<tr class="separator:ga90c459935e76acf809b9ec90d1872771"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td></tr>
<tr class="separator:ga001a6b9c36a06ee977b9f51ed7103cdb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td></tr>
<tr class="separator:ga5630b1f1aa5cd363303018cb2f12f95c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4">AASSET_MODE_UNKNOWN</a> = 0,
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f">AASSET_MODE_RANDOM</a> = 1,
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74">AASSET_MODE_STREAMING</a> = 2,
<a class="el" href="group___asset.html#gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb">AASSET_MODE_BUFFER</a> = 3
}</td></tr>
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gab5b57ff012d6d1024d8bf5d30aedced4">AAssetManager_openDir</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *dirName)</td></tr>
<tr class="separator:gab5b57ff012d6d1024d8bf5d30aedced4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> (<a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *mgr, const char *filename, int mode)</td></tr>
<tr class="separator:ga0037ce3c10a591fe632f34c1aa62955c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:ga4703b9f7baa3daeba248b6547de6b9b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga45db6d19ad5e1c0f9b2e6b4059da14b3">AAssetDir_rewind</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:ga45db6d19ad5e1c0f9b2e6b4059da14b3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gace1c4d0da274d643c5b10ca218cc6088"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close</a> (<a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> *assetDir)</td></tr>
<tr class="separator:gace1c4d0da274d643c5b10ca218cc6088"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaadd86322c1fda5121b6d33745c317fb9"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaadd86322c1fda5121b6d33745c317fb9">AAsset_read</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, void *buf, size_t count)</td></tr>
<tr class="separator:gaadd86322c1fda5121b6d33745c317fb9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gacc026a8bedeb1ef80bf12df3b72611a2">AAsset_seek</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t offset, int whence)</td></tr>
<tr class="separator:gacc026a8bedeb1ef80bf12df3b72611a2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga81fbe4368de24a3296ef7a6eba0053c7">AAsset_seek64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t offset, int whence)</td></tr>
<tr class="separator:ga81fbe4368de24a3296ef7a6eba0053c7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1f241e49f691dafcada23bcb76155122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga1f241e49f691dafcada23bcb76155122"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga553a14512a98542306238c3ce70d344f"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga553a14512a98542306238c3ce70d344f">AAsset_getBuffer</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga553a14512a98542306238c3ce70d344f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gaad8ec42e28522ebc72d3a5c357f9a600">AAsset_getLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:gaad8ec42e28522ebc72d3a5c357f9a600"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga55c8bc459327d5d23089e6a4b453f3f1">AAsset_getLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga55c8bc459327d5d23089e6a4b453f3f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memItemLeft" align="right" valign="top">off_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gae806f55cbc4a93ca245f2adfd63d3eee">AAsset_getRemainingLength</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:gae806f55cbc4a93ca245f2adfd63d3eee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga21e7221d88dcc44106843192b66755b5"><td class="memItemLeft" align="right" valign="top">off64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga21e7221d88dcc44106843192b66755b5">AAsset_getRemainingLength64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga21e7221d88dcc44106843192b66755b5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1af4ffd050016e99961e24f550981677"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga1af4ffd050016e99961e24f550981677">AAsset_openFileDescriptor</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off_t *outStart, off_t *outLength)</td></tr>
<tr class="separator:ga1af4ffd050016e99961e24f550981677"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga123a44a575f85d91a00a8456dab7bd0a">AAsset_openFileDescriptor64</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset, off64_t *outStart, off64_t *outLength)</td></tr>
<tr class="separator:ga123a44a575f85d91a00a8456dab7bd0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga20344cb952a77fa1004f592fb1b55124"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#ga20344cb952a77fa1004f592fb1b55124">AAsset_isAllocated</a> (<a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> *asset)</td></tr>
<tr class="separator:ga20344cb952a77fa1004f592fb1b55124"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadfd6537af41577735bcaee52120127f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava</a> (JNIEnv *env, jobject assetManager)</td></tr>
<tr class="separator:gadfd6537af41577735bcaee52120127f4"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga5630b1f1aa5cd363303018cb2f12f95c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> provides access to a read-only asset.</p>
<p><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects are NOT thread-safe, and should not be shared across threads. </p>
</div>
</div>
<a class="anchor" id="ga001a6b9c36a06ee977b9f51ed7103cdb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> provides access to a chunk of the asset hierarchy as if it were a single directory. The contents are populated by the <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>.</p>
<p>The list of files will be sorted in ascending order by ASCII value. </p>
</div>
</div>
<a class="anchor" id="ga90c459935e76acf809b9ec90d1872771"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> provides access to an application's raw assets by creating <a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> objects.</p>
<p>AAssetManager is a wrapper to the low-level native implementation of the java <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>, a pointer can be obtained using <a class="el" href="group___asset.html#gadfd6537af41577735bcaee52120127f4">AAssetManager_fromJava()</a>.</p>
<p>The asset hierarchy may be examined like a filesystem, using <a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> objects to peruse a single directory.</p>
<p>A native <a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> pointer may be shared across multiple threads. </p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">anonymous enum</td>
</tr>
</table>
</div><div class="memdoc">
<p>Available access modes for opening assets with <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba5bf76576f07042f965f230086f7c09f4"></a>AASSET_MODE_UNKNOWN</em> </td><td class="fielddoc">
<p>No specific information about how data will be accessed. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba88e1b2a920963d7596735fe28bf30e2f"></a>AASSET_MODE_RANDOM</em> </td><td class="fielddoc">
<p>Read chunks, and seek forward and backward. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55bac76f5fdb953097efc04e534474a7ea74"></a>AASSET_MODE_STREAMING</em> </td><td class="fielddoc">
<p>Read sequentially, with an occasional forward seek. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga06fc87d81c62e9abb8790b6e5713c55ba40ec098f4afb7c2869fa449d3059f6bb"></a>AASSET_MODE_BUFFER</em> </td><td class="fielddoc">
<p>Caller plans to ask for a read-only buffer with all data. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga1f241e49f691dafcada23bcb76155122"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AAsset_close </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Close the asset, freeing all associated resources. </p>
</div>
</div>
<a class="anchor" id="ga553a14512a98542306238c3ce70d344f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const void* AAsset_getBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a pointer to a buffer holding the entire contents of the assset.</p>
<p>Returns NULL on failure. </p>
</div>
</div>
<a class="anchor" id="gaad8ec42e28522ebc72d3a5c357f9a600"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off_t AAsset_getLength </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Report the total size of the asset data. </p>
</div>
</div>
<a class="anchor" id="ga55c8bc459327d5d23089e6a4b453f3f1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off64_t AAsset_getLength64 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Report the total size of the asset data. Reports the size using a 64-bit number insted of 32-bit as AAsset_getLength. </p>
</div>
</div>
<a class="anchor" id="gae806f55cbc4a93ca245f2adfd63d3eee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off_t AAsset_getRemainingLength </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Report the total amount of asset data that can be read from the current position. </p>
</div>
</div>
<a class="anchor" id="ga21e7221d88dcc44106843192b66755b5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off64_t AAsset_getRemainingLength64 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Report the total amount of asset data that can be read from the current position.</p>
<p>Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does. </p>
</div>
</div>
<a class="anchor" id="ga20344cb952a77fa1004f592fb1b55124"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int AAsset_isAllocated </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not mmapped). </p>
</div>
</div>
<a class="anchor" id="ga1af4ffd050016e99961e24f550981677"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int AAsset_openFileDescriptor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off_t * </td>
<td class="paramname"><em>outStart</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off_t * </td>
<td class="paramname"><em>outLength</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open a new file descriptor that can be used to read the asset data. If the start or length cannot be represented by a 32-bit number, it will be truncated. If the file is large, use AAsset_openFileDescriptor64 instead.</p>
<p>Returns < 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
</div>
</div>
<a class="anchor" id="ga123a44a575f85d91a00a8456dab7bd0a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int AAsset_openFileDescriptor64 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off64_t * </td>
<td class="paramname"><em>outStart</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off64_t * </td>
<td class="paramname"><em>outLength</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open a new file descriptor that can be used to read the asset data.</p>
<p>Uses a 64-bit number for the offset and length instead of 32-bit instead of as AAsset_openFileDescriptor does.</p>
<p>Returns < 0 if direct fd access is not possible (for example, if the asset is compressed). </p>
</div>
</div>
<a class="anchor" id="gaadd86322c1fda5121b6d33745c317fb9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int AAsset_read </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>count</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Attempt to read 'count' bytes of data from the current offset.</p>
<p>Returns the number of bytes read, zero on EOF, or < 0 on error. </p>
</div>
</div>
<a class="anchor" id="gacc026a8bedeb1ef80bf12df3b72611a2"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off_t AAsset_seek </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off_t </td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>whence</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
<p>Returns the new position on success, or (off_t) -1 on error. </p>
</div>
</div>
<a class="anchor" id="ga81fbe4368de24a3296ef7a6eba0053c7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">off64_t AAsset_seek64 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a> * </td>
<td class="paramname"><em>asset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">off64_t </td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>whence</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Seek to the specified offset within the asset data. 'whence' uses the same constants as lseek()/fseek().</p>
<p>Uses 64-bit data type for large files as opposed to the 32-bit type used by AAsset_seek.</p>
<p>Returns the new position on success, or (off64_t) -1 on error. </p>
</div>
</div>
<a class="anchor" id="gace1c4d0da274d643c5b10ca218cc6088"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AAssetDir_close </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
<td class="paramname"><em>assetDir</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Close an opened AAssetDir, freeing any related resources. </p>
</div>
</div>
<a class="anchor" id="ga4703b9f7baa3daeba248b6547de6b9b0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* AAssetDir_getNextFileName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
<td class="paramname"><em>assetDir</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Iterate over the files in an asset directory. A NULL string is returned when all the file names have been returned.</p>
<p>The returned file name is suitable for passing to <a class="el" href="group___asset.html#ga0037ce3c10a591fe632f34c1aa62955c">AAssetManager_open()</a>.</p>
<p>The string returned here is owned by the AssetDir implementation and is not guaranteed to remain valid if any other calls are made on this AAssetDir instance. </p>
</div>
</div>
<a class="anchor" id="ga45db6d19ad5e1c0f9b2e6b4059da14b3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AAssetDir_rewind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a> * </td>
<td class="paramname"><em>assetDir</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset the iteration state of <a class="el" href="group___asset.html#ga4703b9f7baa3daeba248b6547de6b9b0">AAssetDir_getNextFileName()</a> to the beginning. </p>
</div>
</div>
<a class="anchor" id="gadfd6537af41577735bcaee52120127f4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* AAssetManager_fromJava </td>
<td>(</td>
<td class="paramtype">JNIEnv * </td>
<td class="paramname"><em>env</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">jobject </td>
<td class="paramname"><em>assetManager</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager object. Note that the caller is responsible for obtaining and holding a VM reference to the jobject to prevent its being garbage collected while the native object is in use. </p>
</div>
</div>
<a class="anchor" id="ga0037ce3c10a591fe632f34c1aa62955c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___asset.html#ga5630b1f1aa5cd363303018cb2f12f95c">AAsset</a>* AAssetManager_open </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td>
<td class="paramname"><em>mgr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>mode</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open an asset.</p>
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#ga1f241e49f691dafcada23bcb76155122">AAsset_close()</a>. </p>
</div>
</div>
<a class="anchor" id="gab5b57ff012d6d1024d8bf5d30aedced4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___asset.html#ga001a6b9c36a06ee977b9f51ed7103cdb">AAssetDir</a>* AAssetManager_openDir </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> * </td>
<td class="paramname"><em>mgr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>dirName</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Open the named directory within the asset hierarchy. The directory can then be inspected with the AAssetDir functions. To open the top-level directory, pass in "" as the dirName.</p>
<p>The object returned here should be freed by calling <a class="el" href="group___asset.html#gace1c4d0da274d643c5b10ca218cc6088">AAssetDir_close()</a>. </p>
</div>
</div>
</div><!-- contents -->
|