summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/doc_generated/pepper_stable/cpp/classpp_1_1_resource.html
blob: 7845d8db5d1f3051b540974c2acbc5b7c8f18ced (plain)
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
{{+bindTo:partials.standard_nacl_api}}
<h1>pp::Resource Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->



</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::Resource:</div>
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_resource__inherit__graph.png" border="0" usemap="#pp_1_1_resource_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_resource_inherit__map" id="pp_1_1_resource_inherit__map">
<area shape="rect" id="node2" href="classpp_1_1_audio.html" title="An audio resource." alt="" coords="216,5,299,32"></area><area shape="rect" id="node3" href="classpp_1_1_audio_buffer.html" title="pp::AudioBuffer" alt="" coords="197,56,317,83"></area><area shape="rect" id="node4" href="classpp_1_1_audio_config.html" title="A 16 bit stereo AudioConfig resource." alt="" coords="196,107,319,133"></area><area shape="rect" id="node5" href="classpp_1_1_compositor.html" title="The Compositor interface is used for setting CompositorLayer layers to the Chromium compositor for co..." alt="" coords="197,157,317,184"></area><area shape="rect" id="node6" href="classpp_1_1_compositor_layer.html" title="pp::CompositorLayer" alt="" coords="180,208,335,235"></area><area shape="rect" id="node7" href="classpp_1_1_file_i_o.html" title="The FileIO class represents a regular file." alt="" coords="218,259,297,285"></area><area shape="rect" id="node8" href="classpp_1_1_file_ref.html" title='The FileRef class represents a "weak pointer" to a file in a file system.' alt="" coords="215,309,300,336"></area><area shape="rect" id="node9" href="classpp_1_1_file_system.html" title="The FileSystem class identifies the file system type associated with a file." alt="" coords="200,360,315,387"></area><area shape="rect" id="node10" href="classpp_1_1_graphics2_d.html" title="pp::Graphics2D" alt="" coords="197,411,317,437"></area><area shape="rect" id="node11" href="classpp_1_1_graphics3_d.html" title="This class represents a 3D rendering context in the browser." alt="" coords="197,461,317,488"></area><area shape="rect" id="node12" href="classpp_1_1_host_resolver.html" title="The HostResolver class supports host name resolution." alt="" coords="193,512,322,539"></area><area shape="rect" id="node13" href="classpp_1_1_image_data.html" title="pp::ImageData" alt="" coords="199,563,316,589"></area><area shape="rect" id="node14" href="classpp_1_1_input_event.html" title="This class represents an input event resource." alt="" coords="200,613,315,640"></area><area shape="rect" id="node20" href="classpp_1_1_media_stream_audio_track.html" title="The MediaStreamAudioTrack class contains methods for receiving audio buffers from a MediaStream audio..." alt="" coords="157,664,357,691"></area><area shape="rect" id="node21" href="classpp_1_1_media_stream_video_track.html" title="The MediaStreamVideoTrack class contains methods for receiving video frames from a MediaStream video ..." alt="" coords="157,715,357,741"></area><area shape="rect" id="node22" href="classpp_1_1_message_loop.html" title="A message loop allows PPAPI calls to be issued on a thread." alt="" coords="190,765,325,792"></area><area shape="rect" id="node23" href="classpp_1_1_net_address.html" title="The NetAddress class represents a network address." alt="" coords="197,816,318,843"></area><area shape="rect" id="node24" href="classpp_1_1_network_list.html" title="pp::NetworkList" alt="" coords="197,867,317,893"></area><area shape="rect" id="node25" href="classpp_1_1_network_monitor.html" title="pp::NetworkMonitor" alt="" coords="184,917,331,944"></area><area shape="rect" id="node26" href="classpp_1_1_t_c_p_socket.html" title="The TCPSocket class provides TCP socket operations." alt="" coords="201,968,314,995"></area><area shape="rect" id="node27" href="classpp_1_1_u_d_p_socket.html" title="The UDPSocket class provides UDP socket operations." alt="" coords="198,1019,317,1045"></area><area shape="rect" id="node28" href="classpp_1_1_u_r_l_loader.html" title="URLLoader provides an API for loading URLs." alt="" coords="200,1069,315,1096"></area><area shape="rect" id="node29" href="classpp_1_1_u_r_l_request_info.html" title="URLRequestInfo provides an API for creating and manipulating URL requests." alt="" coords="185,1120,330,1147"></area><area shape="rect" id="node30" href="classpp_1_1_u_r_l_response_info.html" title="URLResponseInfo provides an API for examining URL responses." alt="" coords="180,1171,335,1197"></area><area shape="rect" id="node31" href="classpp_1_1_video_decoder.html" title="Video decoder interface." alt="" coords="189,1221,325,1248"></area><area shape="rect" id="node32" href="classpp_1_1_video_frame.html" title="pp::VideoFrame" alt="" coords="196,1272,319,1299"></area><area shape="rect" id="node33" href="classpp_1_1_view.html" title="This class represents the state of the view for an instance and contains functions for retrieving the..." alt="" coords="220,1323,295,1349"></area><area shape="rect" id="node34" href="classpp_1_1_web_socket.html" title="The WebSocket class providing bi-directional, full-duplex, communications over a single TCP socket..." alt="" coords="199,1373,315,1400"></area><area shape="rect" id="node15" href="classpp_1_1_i_m_e_input_event.html" title="pp::IMEInputEvent" alt="" coords="424,512,560,539"></area><area shape="rect" id="node16" href="classpp_1_1_keyboard_input_event.html" title="pp::KeyboardInputEvent" alt="" coords="405,563,579,589"></area><area shape="rect" id="node17" href="classpp_1_1_mouse_input_event.html" title="This class handles mouse events." alt="" coords="414,613,570,640"></area><area shape="rect" id="node18" href="classpp_1_1_touch_input_event.html" title="pp::TouchInputEvent" alt="" coords="417,664,567,691"></area><area shape="rect" id="node19" href="classpp_1_1_wheel_input_event.html" title="pp::WheelInputEvent" alt="" coords="416,715,568,741"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_resource-members.html">List of all members.</a></p>
<h2>
Public Member Functions</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a56679e93a58101c8dce5dc510811a094">Resource</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#ab0f664099ca06367180f220ea7e0b831">Resource</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a081165265e2bd8217eaa2be2aeeb3aa3">~Resource</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#aaf808a98bdaa7998d82e19514aa87423">operator=</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9">is_null</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Resource&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a46a6123de0b007ad3fcb6f666534ccb4">pp_resource</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PP_Resource&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a81b9246381bdddacca3ac25f6ded2bfd">detach</a> ()</td></tr>
</table><h2>
Protected Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a555de93fdf4793f7db1183bf71d20580">Resource</a> (PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a907d3d6b7e292587c8cb9ff30d0a418d">Resource</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a3eda014529127a818df8d5bb5ec2fdf0">PassRefFromConstructor</a> (PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#ad4016f37d3022863ca0188acb26ac9c4">Clear</a> ()</td></tr>
</table><h2>
Friends</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_resource.html#a966ff6c3e1475d52398924cc6d3cbb6d">Var</a></td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A reference counted module resource. </p>
</div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a56679e93a58101c8dce5dc510811a094"></a><!-- doxytag: member="pp::Resource::Resource" ref="a56679e93a58101c8dce5dc510811a094" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_resource.html#a56679e93a58101c8dce5dc510811a094">pp::Resource::Resource</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The default constructor. </p>
</div>
</div>
<a class="anchor" id="ab0f664099ca06367180f220ea7e0b831"></a><!-- doxytag: member="pp::Resource::Resource" ref="ab0f664099ca06367180f220ea7e0b831" args="(const Resource &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_resource.html#a56679e93a58101c8dce5dc510811a094">pp::Resource::Resource</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor for copying a resource. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a081165265e2bd8217eaa2be2aeeb3aa3"></a><!-- doxytag: member="pp::Resource::~Resource" ref="a081165265e2bd8217eaa2be2aeeb3aa3" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classpp_1_1_resource.html#a081165265e2bd8217eaa2be2aeeb3aa3">pp::Resource::~Resource</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<a class="anchor" id="a555de93fdf4793f7db1183bf71d20580"></a><!-- doxytag: member="pp::Resource::Resource" ref="a555de93fdf4793f7db1183bf71d20580" args="(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_resource.html#a56679e93a58101c8dce5dc510811a094">pp::Resource::Resource</a> </td>
<td>(</td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [explicit, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor used when a <code>PP_Resource</code> is provided as a return value whose reference count we need to increment. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to a resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a907d3d6b7e292587c8cb9ff30d0a418d"></a><!-- doxytag: member="pp::Resource::Resource" ref="a907d3d6b7e292587c8cb9ff30d0a418d" args="(PassRef, PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_resource.html#a56679e93a58101c8dce5dc510811a094">pp::Resource::Resource</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructor used when a <code>PP_Resource</code> already has a ref count assigned. </p>
<p>Add additional refcount is not taken. </p>
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="ad4016f37d3022863ca0188acb26ac9c4"></a><!-- doxytag: member="pp::Resource::Clear" ref="ad4016f37d3022863ca0188acb26ac9c4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_resource.html#ad4016f37d3022863ca0188acb26ac9c4">pp::Resource::Clear</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets this resource to null. This releases ownership of the resource. </p>
</div>
</div>
<a class="anchor" id="a81b9246381bdddacca3ac25f6ded2bfd"></a><!-- doxytag: member="pp::Resource::detach" ref="a81b9246381bdddacca3ac25f6ded2bfd" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Resource <a class="el" href="classpp_1_1_resource.html#a81b9246381bdddacca3ac25f6ded2bfd">pp::Resource::detach</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This function releases ownership of this resource and returns it to the caller. </p>
<p>Note that the reference count on the resource is unchanged and the caller needs to release the resource.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The detached <code>PP_Resource</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a859068e34cdc2dc0b78754c255323aa9"></a><!-- doxytag: member="pp::Resource::is_null" ref="a859068e34cdc2dc0b78754c255323aa9" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9">pp::Resource::is_null</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This functions determines if this resource is invalid or uninitialized. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if this resource is invalid or uninitialized. </dd></dl>
</div>
</div>
<a class="anchor" id="aaf808a98bdaa7998d82e19514aa87423"></a><!-- doxytag: member="pp::Resource::operator=" ref="aaf808a98bdaa7998d82e19514aa87423" args="(const Resource &amp;other)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classpp_1_1_resource.html">Resource</a>&amp; pp::Resource::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This function assigns one <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> to another <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A <a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a> containing the assigned <a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a3eda014529127a818df8d5bb5ec2fdf0"></a><!-- doxytag: member="pp::Resource::PassRefFromConstructor" ref="a3eda014529127a818df8d5bb5ec2fdf0" args="(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_resource.html#a3eda014529127a818df8d5bb5ec2fdf0">pp::Resource::PassRefFromConstructor</a> </td>
<td>(</td>
<td class="paramtype">PP_Resource&#160;</td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>PassRefFromConstructor is called by derived class' constructors to initialize this <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> with a <code>PP_Resource</code> that has already had its reference count incremented by <code><a class="el" href="classpp_1_1_core.html#a09c663df7fcb527b3e5e71ea07531899" title="AddRefResource() increments the reference count for the provided resource.">Core::AddRefResource</a></code>. </p>
<p>It also assumes this object has no current resource.</p>
<p>The intended usage of this function that the derived class constructor will call the default <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> constructor, then make a call to create a resource. It then wants to assign the new resource (which, since it was returned by the browser, already had its reference count increased).</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> corresponding to a resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a46a6123de0b007ad3fcb6f666534ccb4"></a><!-- doxytag: member="pp::Resource::pp_resource" ref="a46a6123de0b007ad3fcb6f666534ccb4" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PP_Resource <a class="el" href="classpp_1_1_resource.html#a46a6123de0b007ad3fcb6f666534ccb4">pp::Resource::pp_resource</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr /><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a966ff6c3e1475d52398924cc6d3cbb6d"></a><!-- doxytag: member="pp::Resource::Var" ref="a966ff6c3e1475d52398924cc6d3cbb6d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">friend class <a class="el" href="classpp_1_1_var.html">Var</a><code> [friend]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="resource_8h.html">resource.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}