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