Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_dev / c / struct_p_p_b___file_mapping__0__1.html
1 {{+bindTo:partials.standard_nacl_article}}
2 <h1>PPB_FileMapping Struct Reference</h1>
3 <div id="doxygen-ref">
4 {{- dummy div to appease doxygen -}}
5   <div>
6 <!-- Generated by Doxygen 1.7.6.1 -->
7
8
9 </div>
10 <!--header-->
11 <div class="contents">
12 <!-- doxytag: class="PPB_FileMapping" --><h2>
13 Data Fields</h2><table class="memberdecls">
14
15 <tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb">Map</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void **address, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
16 <tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_mapping__0__1.html#a4fa72d6e6660e16ce1ff08453eff172d">Unmap</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const void *address, int64_t length, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
17 <tr><td class="memItemLeft" align="right" valign="top">int64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___file_mapping__0__1.html#ae479690b258985b51dda4d438b8156f0">GetMapPageSize</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
18 </table>
19 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
20 <div class="textblock"><p>PPB_FileMapping contains functions for mapping and unmapping files into and out of memory. </p>
21 </div><hr /><h2>Field Documentation</h2>
22 <a class="anchor" id="ae479690b258985b51dda4d438b8156f0"></a><!-- doxytag: member="PPB_FileMapping::GetMapPageSize" ref="ae479690b258985b51dda4d438b8156f0" args=")(PP_Instance instance)" -->
23 <div class="memitem">
24 <div class="memproto">
25 <table class="memname">
26 <tr>
27 <td class="memname">int64_t(* <a class="el" href="struct_p_p_b___file_mapping__0__1.html#ae479690b258985b51dda4d438b8156f0">PPB_FileMapping::GetMapPageSize</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
28 </tr>
29 </table>
30 </div>
31 <div class="memdoc">
32 <p><a class="el" href="struct_p_p_b___file_mapping__0__1.html#ae479690b258985b51dda4d438b8156f0" title="GetMapPageSize() retrieves the size of pages that Map() uses.">GetMapPageSize()</a> retrieves the size of pages that <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a> uses. </p>
33 <dl class="params"><dt><b>Parameters:</b></dt><dd>
34 <table class="params">
35 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying the instance.</td></tr>
36 </table>
37 </dd>
38 </dl>
39 <dl class="return"><dt><b>Returns:</b></dt><dd>The size of pages that <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a> uses. Returns 0 on failure. </dd></dl>
40 </div>
41 </div>
42 <a class="anchor" id="a425d8d5b11de51e8edf539ee13bac1fb"></a><!-- doxytag: member="PPB_FileMapping::Map" ref="a425d8d5b11de51e8edf539ee13bac1fb" args=")(PP_Instance instance, PP_Resource file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void **address, struct PP_CompletionCallback callback)" -->
43 <div class="memitem">
44 <div class="memproto">
45 <table class="memname">
46 <tr>
47 <td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb">PPB_FileMapping::Map</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_io, int64_t length, uint32_t map_protection, uint32_t map_flags, int64_t offset, void **address, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
48 </tr>
49 </table>
50 </div>
51 <div class="memdoc">
52 <p><a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a> maps the contents from an offset of the file into memory. </p>
53 <dl class="params"><dt><b>Parameters:</b></dt><dd>
54 <table class="params">
55 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module. </td></tr>
56 <tr><td class="paramdir">[in]</td><td class="paramname">file_io</td><td>A <code>PPB_FileIO</code> <code>PP_Resource</code> corresponding to the file that should be mapped in to memory. </td></tr>
57 <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The number of bytes to map. </td></tr>
58 <tr><td class="paramdir">[in]</td><td class="paramname">map_protection</td><td>A bitfield containing values from <code>PP_FileMapProtection</code>, indicating what memory operations should be permitted on the mapped region. </td></tr>
59 <tr><td class="paramdir">[in]</td><td class="paramname">map_flags</td><td>A bitfield containing values from <code>PP_FileMapFlags</code>, providing options for the behavior of Map. If the region is to be writeable, then exactly one of <code>PP_FILEMAPFLAG_SHARED</code> or <code>PP_FILEMAPFLAG_PRIVATE</code> must be set. </td></tr>
60 <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>The offset into the file. Must be a multiple of the Map page size as returned by <a class="el" href="struct_p_p_b___file_mapping__0__1.html#ae479690b258985b51dda4d438b8156f0" title="GetMapPageSize() retrieves the size of pages that Map() uses.">GetMapPageSize()</a>. </td></tr>
61 <tr><td class="paramdir"></td><td class="paramname">inout]</td><td>address The value of <code>*address</code>, if non-NULL, will be used as a hint to determine where in memory the file should be mapped. If the value is NULL, the host operating system will choose <code>address</code>. Upon <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a> completing, <code>*address</code> will contain the actual memory location at which the file was mapped. If the plugin provides a non-NULL <code>*address</code>, it must be a multiple of the map page size as returned by <a class="el" href="struct_p_p_b___file_mapping__0__1.html#ae479690b258985b51dda4d438b8156f0" title="GetMapPageSize() retrieves the size of pages that Map() uses.">GetMapPageSize()</a>. </td></tr>
62 <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a>.</td></tr>
63 </table>
64 </dd>
65 </dl>
66 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
67 </div>
68 </div>
69 <a class="anchor" id="a4fa72d6e6660e16ce1ff08453eff172d"></a><!-- doxytag: member="PPB_FileMapping::Unmap" ref="a4fa72d6e6660e16ce1ff08453eff172d" args=")(PP_Instance instance, const void *address, int64_t length, struct PP_CompletionCallback callback)" -->
70 <div class="memitem">
71 <div class="memproto">
72 <table class="memname">
73 <tr>
74 <td class="memname">int32_t(* <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a4fa72d6e6660e16ce1ff08453eff172d">PPB_FileMapping::Unmap</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const void *address, int64_t length, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
75 </tr>
76 </table>
77 </div>
78 <div class="memdoc">
79 <p><a class="el" href="struct_p_p_b___file_mapping__0__1.html#a4fa72d6e6660e16ce1ff08453eff172d" title="Unmap() deletes the mapping of the specified address.">Unmap()</a> deletes the mapping of the specified address. </p>
80 <p>The specified address must have been retrieved with <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a425d8d5b11de51e8edf539ee13bac1fb" title="Map() maps the contents from an offset of the file into memory.">Map()</a>. </p>
81 <dl class="params"><dt><b>Parameters:</b></dt><dd>
82 <table class="params">
83 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying the instance. </td></tr>
84 <tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The starting address of the address in memory to be unmapped. </td></tr>
85 <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length of the region to unmap. </td></tr>
86 <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion of <a class="el" href="struct_p_p_b___file_mapping__0__1.html#a4fa72d6e6660e16ce1ff08453eff172d" title="Unmap() deletes the mapping of the specified address.">Unmap()</a>.</td></tr>
87 </table>
88 </dd>
89 </dl>
90 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
91 </div>
92 </div>
93 <hr />The documentation for this struct was generated from the following file:<ul>
94 <li><a class="el" href="ppb__file__mapping_8h.html">ppb_file_mapping.h</a></li>
95 </ul>
96 </div><!-- contents -->
97 </div>
98 {{/partials.standard_nacl_article}}