Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_beta / cpp / classpp_1_1_completion_callback_with_output.html
1 {{+bindTo:partials.standard_nacl_api}}
2 <h1>pp::CompletionCallbackWithOutput&lt; T &gt; Class Template 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
10 </div>
11 <!--header-->
12 <div class="contents">
13 <!-- doxytag: class="pp::CompletionCallbackWithOutput" --><!-- doxytag: inherits="pp::CompletionCallback" --><div class="dynheader">
14 Inheritance diagram for pp::CompletionCallbackWithOutput&lt; T &gt;:</div>
15 <div class="dyncontent">
16 <div class="center"><img src="classpp_1_1_completion_callback_with_output__inherit__graph.png" border="0" usemap="#pp_1_1_completion_callback_with_output_3_01_t_01_4_inherit__map" alt="Inheritance graph" /></div>
17 <map name="pp_1_1_completion_callback_with_output_3_01_t_01_4_inherit__map" id="pp_1_1_completion_callback_with_output_3_01_t_01_4_inherit__map">
18 <area shape="rect" id="node2" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl..." alt="" coords="59,5,231,32"></area></map>
19 <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
20 <p><a href="classpp_1_1_completion_callback_with_output-members.html">List of all members.</a></p>
21 <h2>
22 Public Types</h2><table class="memberdecls">
23
24 <tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak" />
25 internal::CallbackOutputTraits<br class="typebreak" />
26 &lt; T &gt;::StorageType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a></td></tr>
27 <tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak" />
28 internal::CallbackOutputTraits<br class="typebreak" />
29 &lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a></td></tr>
30 </table><h2>
31 Public Member Functions</h2><table class="memberdecls">
32 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a29dd26e95218dce78e2475f29ea669cb">CompletionCallbackWithOutput</a> (<a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *<a class="el" href="classpp_1_1_completion_callback_with_output.html#a8fac51ce72828752c025ca888897f2ef">output</a>)</td></tr>
33 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a36bc9e5fd9e8d503020fe338b8b9802e">CompletionCallbackWithOutput</a> (PP_CompletionCallback_Func func, void *user_data, <a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *<a class="el" href="classpp_1_1_completion_callback_with_output.html#a8fac51ce72828752c025ca888897f2ef">output</a>)</td></tr>
34 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a311725af061d86e58cc89a588fa542f9">CompletionCallbackWithOutput</a> (PP_CompletionCallback_Func func, void *user_data, int32_t <a class="el" href="classpp_1_1_completion_callback.html#a60e466572fe7de362969dd41179c971f">flags</a>, <a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *<a class="el" href="classpp_1_1_completion_callback_with_output.html#a8fac51ce72828752c025ca888897f2ef">output</a>)</td></tr>
35 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a8fac51ce72828752c025ca888897f2ef">output</a> () const </td></tr>
36 </table>
37 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
38 <div class="textblock"><h3>template&lt;typename T&gt;<br />
39 class pp::CompletionCallbackWithOutput&lt; T &gt;</h3>
40 <p>A <a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a> defines a completion callback that additionally stores a pointer to some output data. </p>
41 <p>Some C++ wrappers take a <a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a> when the browser is returning a bit of data as part of the function call. The "output" parameter stored in the <a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a> will receive the data from the browser.</p>
42 <p>You can create this yourself, but it is most common to use with the <a class="el" href="classpp_1_1_completion_callback_factory.html" title="CompletionCallbackFactory&lt;T&gt; may be used to create CompletionCallback objects that are bound to membe...">CompletionCallbackFactory</a>'s NewCallbackWithOutput, which manages the storage for the output parameter for you and passes it as an argument to your callback function.</p>
43 <p>Note that this class doesn't actually do anything with the output data, it just stores a pointer to it. C++ wrapper objects that accept a <a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a> will retrieve this pointer and pass it to the browser as the output parameter. </p>
44 </div><hr /><h2>Member Typedef Documentation</h2>
45 <a class="anchor" id="aca381518bda2f9cb12c4ddc725da91ce"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::APIArgType" ref="aca381518bda2f9cb12c4ddc725da91ce" args="" -->
46 <div class="memitem">
47 <div class="memproto">
48 <div class="memtemplate">
49 template&lt;typename T &gt; </div>
50 <table class="memname">
51 <tr>
52 <td class="memname">typedef internal::CallbackOutputTraits&lt;T&gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a> <a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a></td>
53 </tr>
54 </table>
55 </div>
56 <div class="memdoc">
57 </div>
58 </div>
59 <a class="anchor" id="a333f3b00a9f6549b3b70291787f31459"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::OutputStorageType" ref="a333f3b00a9f6549b3b70291787f31459" args="" -->
60 <div class="memitem">
61 <div class="memproto">
62 <div class="memtemplate">
63 template&lt;typename T &gt; </div>
64 <table class="memname">
65 <tr>
66 <td class="memname">typedef internal::CallbackOutputTraits&lt;T&gt;::StorageType <a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a></td>
67 </tr>
68 </table>
69 </div>
70 <div class="memdoc">
71 <p>The type that will actually be stored in the completion callback. </p>
72 <p>In the common case, this will be equal to the template parameter (for example, CompletionCallbackWithOutput&lt;int&gt; would obviously take an int*. However, resources are passed as PP_Resource, vars as PP_Var, and arrays as our special ArrayOutputAdapter object. The CallbackOutputTraits defines specializations for all of these cases. </p>
73 </div>
74 </div>
75 <hr /><h2>Constructor &amp; Destructor Documentation</h2>
76 <a class="anchor" id="a29dd26e95218dce78e2475f29ea669cb"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::CompletionCallbackWithOutput" ref="a29dd26e95218dce78e2475f29ea669cb" args="(OutputStorageType *output)" -->
77 <div class="memitem">
78 <div class="memproto">
79 <div class="memtemplate">
80 template&lt;typename T &gt; </div>
81 <table class="memname">
82 <tr>
83 <td class="memname"><a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a> </td>
84 <td>(</td>
85 <td class="paramtype"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *&#160;</td>
86 <td class="paramname"><em>output</em></td><td>)</td>
87 <td><code> [inline]</code></td>
88 </tr>
89 </table>
90 </div>
91 <div class="memdoc">
92 <p>The default constructor will create a blocking <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> that references the given output data. </p>
93 <dl class="params"><dt><b>Parameters:</b></dt><dd>
94 <table class="params">
95 <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>A pointer to the data associated with the callback. The caller must ensure that this pointer outlives the completion callback.</td></tr>
96 </table>
97 </dd>
98 </dl>
99 <p><b>Note:</b> Blocking completion callbacks are only allowed from from background threads. </p>
100 </div>
101 </div>
102 <a class="anchor" id="a36bc9e5fd9e8d503020fe338b8b9802e"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::CompletionCallbackWithOutput" ref="a36bc9e5fd9e8d503020fe338b8b9802e" args="(PP_CompletionCallback_Func func, void *user_data, OutputStorageType *output)" -->
103 <div class="memitem">
104 <div class="memproto">
105 <div class="memtemplate">
106 template&lt;typename T &gt; </div>
107 <table class="memname">
108 <tr>
109 <td class="memname"><a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a> </td>
110 <td>(</td>
111 <td class="paramtype">PP_CompletionCallback_Func&#160;</td>
112 <td class="paramname"><em>func</em>, </td>
113 </tr>
114 <tr>
115 <td class="paramkey"></td>
116 <td></td>
117 <td class="paramtype">void *&#160;</td>
118 <td class="paramname"><em>user_data</em>, </td>
119 </tr>
120 <tr>
121 <td class="paramkey"></td>
122 <td></td>
123 <td class="paramtype"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *&#160;</td>
124 <td class="paramname"><em>output</em>&#160;</td>
125 </tr>
126 <tr>
127 <td></td>
128 <td>)</td>
129 <td></td><td><code> [inline]</code></td>
130 </tr>
131 </table>
132 </div>
133 <div class="memdoc">
134 <p>A constructor for creating a <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> that references the given output data. </p>
135 <dl class="params"><dt><b>Parameters:</b></dt><dd>
136 <table class="params">
137 <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The function to be called on completion. </td></tr>
138 <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>The user data to be passed to the callback function. This is optional and is typically used to help track state in case of multiple pending callbacks. </td></tr>
139 <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>A pointer to the data associated with the callback. The caller must ensure that this pointer outlives the completion callback. </td></tr>
140 </table>
141 </dd>
142 </dl>
143 </div>
144 </div>
145 <a class="anchor" id="a311725af061d86e58cc89a588fa542f9"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::CompletionCallbackWithOutput" ref="a311725af061d86e58cc89a588fa542f9" args="(PP_CompletionCallback_Func func, void *user_data, int32_t flags, OutputStorageType *output)" -->
146 <div class="memitem">
147 <div class="memproto">
148 <div class="memtemplate">
149 template&lt;typename T &gt; </div>
150 <table class="memname">
151 <tr>
152 <td class="memname"><a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a> </td>
153 <td>(</td>
154 <td class="paramtype">PP_CompletionCallback_Func&#160;</td>
155 <td class="paramname"><em>func</em>, </td>
156 </tr>
157 <tr>
158 <td class="paramkey"></td>
159 <td></td>
160 <td class="paramtype">void *&#160;</td>
161 <td class="paramname"><em>user_data</em>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">int32_t&#160;</td>
167 <td class="paramname"><em>flags</em>, </td>
168 </tr>
169 <tr>
170 <td class="paramkey"></td>
171 <td></td>
172 <td class="paramtype"><a class="el" href="classpp_1_1_completion_callback_with_output.html#a333f3b00a9f6549b3b70291787f31459">OutputStorageType</a> *&#160;</td>
173 <td class="paramname"><em>output</em>&#160;</td>
174 </tr>
175 <tr>
176 <td></td>
177 <td>)</td>
178 <td></td><td><code> [inline]</code></td>
179 </tr>
180 </table>
181 </div>
182 <div class="memdoc">
183 <p>A constructor for creating a <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> that references the given output data. </p>
184 <dl class="params"><dt><b>Parameters:</b></dt><dd>
185 <table class="params">
186 <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The function to be called on completion.</td></tr>
187 <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>The user data to be passed to the callback function. This is optional and is typically used to help track state in case of multiple pending callbacks.</td></tr>
188 <tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>Bit field combination of <code>PP_CompletionCallback_Flag</code> flags used to control how non-NULL callbacks are scheduled by asynchronous methods.</td></tr>
189 <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>A pointer to the data associated with the callback. The caller must ensure that this pointer outlives the completion callback. </td></tr>
190 </table>
191 </dd>
192 </dl>
193 </div>
194 </div>
195 <hr /><h2>Member Function Documentation</h2>
196 <a class="anchor" id="a8fac51ce72828752c025ca888897f2ef"></a><!-- doxytag: member="pp::CompletionCallbackWithOutput::output" ref="a8fac51ce72828752c025ca888897f2ef" args="() const " -->
197 <div class="memitem">
198 <div class="memproto">
199 <div class="memtemplate">
200 template&lt;typename T &gt; </div>
201 <table class="memname">
202 <tr>
203 <td class="memname"><a class="el" href="classpp_1_1_completion_callback_with_output.html#aca381518bda2f9cb12c4ddc725da91ce">APIArgType</a> <a class="el" href="classpp_1_1_completion_callback_with_output.html">pp::CompletionCallbackWithOutput</a>&lt; T &gt;::<a class="el" href="classpp_1_1_completion_callback_with_output.html#a8fac51ce72828752c025ca888897f2ef">output</a> </td>
204 <td>(</td>
205 <td class="paramname"></td><td>)</td>
206 <td> const<code> [inline]</code></td>
207 </tr>
208 </table>
209 </div>
210 <div class="memdoc">
211 </div>
212 </div>
213 <hr />The documentation for this class was generated from the following file:<ul>
214 <li><a class="el" href="completion__callback_8h.html">completion_callback.h</a></li>
215 </ul>
216 </div><!-- contents -->
217 </div>
218 {{/partials.standard_nacl_api}}