blob: b39a159fc38ff9f76e78e8c15186f34929d1ea1c [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_URLRequestInfo Struct 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="PPB_URLRequestInfo" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af46135ad86d3444f19a8aa30dd5cd202">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ab23f1a2c86c64b64e806ba85cc5d1817">IsURLRequestInfo</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#a47e9163b0ee627496a249171dc5c53be">SetProperty</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, <a class="el" href="group___enums.html#ga41975630f0a4c49e47d4a21754f8402d">PP_URLRequestProperty</a> property, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ac27a819ffd3ac75686e436f09c8c0ac1">AppendDataToBody</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, const void *data, uint32_t len)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af6edaa0b0f19cb902e5e1d8b3ad2a43b">AppendFileToBody</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, int64_t start_offset, int64_t number_of_bytes, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> expected_last_modified_time)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_URLRequestInfo</code> interface is used to create and handle URL requests. </p>
<p>This API is used in conjunction with <code>PPB_URLLoader</code>. Refer to <code>PPB_URLLoader</code> for further information. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="ac27a819ffd3ac75686e436f09c8c0ac1"></a><!-- doxytag: member="PPB_URLRequestInfo::AppendDataToBody" ref="ac27a819ffd3ac75686e436f09c8c0ac1" args=")(PP_Resource request, const void *data, uint32_t len)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ac27a819ffd3ac75686e436f09c8c0ac1">PPB_URLRequestInfo::AppendDataToBody</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, const void *data, uint32_t len)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ac27a819ffd3ac75686e436f09c8c0ac1" title="AppendDataToBody() appends data to the request body.">AppendDataToBody()</a> appends data to the request body. </p>
<p>A Content-Length request header will be automatically generated.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">request</td><td>A <code>PP_Resource</code> corresponding to a <code>URLRequestInfo</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>A pointer to a buffer holding the data. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>The length, in bytes, of the data.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if successful, <code>PP_FALSE</code> if any of the parameters are invalid. </dd></dl>
</div>
</div>
<a class="anchor" id="af6edaa0b0f19cb902e5e1d8b3ad2a43b"></a><!-- doxytag: member="PPB_URLRequestInfo::AppendFileToBody" ref="af6edaa0b0f19cb902e5e1d8b3ad2a43b" args=")(PP_Resource request, PP_Resource file_ref, int64_t start_offset, int64_t number_of_bytes, PP_Time expected_last_modified_time)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af6edaa0b0f19cb902e5e1d8b3ad2a43b">PPB_URLRequestInfo::AppendFileToBody</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> file_ref, int64_t start_offset, int64_t number_of_bytes, <a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a> expected_last_modified_time)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af6edaa0b0f19cb902e5e1d8b3ad2a43b" title="AppendFileToBody() appends a file, to be uploaded, to the request body.">AppendFileToBody()</a> appends a file, to be uploaded, to the request body. </p>
<p>A content-length request header will be automatically generated.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">request</td><td>A <code>PP_Resource</code> corresponding to a <code>URLRequestInfo</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">file_ref</td><td>A <code>PP_Resource</code> corresponding to a file reference. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">start_offset</td><td>An optional starting point offset within the file. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">number_of_bytes</td><td>An optional number of bytes of the file to be included. If <code>number_of_bytes</code> is -1, then the sub-range to upload extends to the end of the file. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">expected_last_modified_time</td><td>An optional (non-zero) last modified time stamp used to validate that the file was not modified since the given time before it was uploaded. The upload will fail with an error code of <code>PP_ERROR_FILECHANGED</code> if the file has been modified since the given time. If <code>expected_last_modified_time</code> is 0, then no validation is performed.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if successful, <code>PP_FALSE</code> if any of the parameters are invalid. </dd></dl>
</div>
</div>
<a class="anchor" id="af46135ad86d3444f19a8aa30dd5cd202"></a><!-- doxytag: member="PPB_URLRequestInfo::Create" ref="af46135ad86d3444f19a8aa30dd5cd202" args=")(PP_Instance instance)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af46135ad86d3444f19a8aa30dd5cd202">PPB_URLRequestInfo::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#af46135ad86d3444f19a8aa30dd5cd202" title="Create() creates a new URLRequestInfo object.">Create()</a> creates a new <code>URLRequestInfo</code> object. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<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>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> identifying the <code>URLRequestInfo</code> if successful, 0 if the instance is invalid. </dd></dl>
</div>
</div>
<a class="anchor" id="ab23f1a2c86c64b64e806ba85cc5d1817"></a><!-- doxytag: member="PPB_URLRequestInfo::IsURLRequestInfo" ref="ab23f1a2c86c64b64e806ba85cc5d1817" args=")(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ab23f1a2c86c64b64e806ba85cc5d1817">PPB_URLRequestInfo::IsURLRequestInfo</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#ab23f1a2c86c64b64e806ba85cc5d1817" title="IsURLRequestInfo() determines if a resource is a URLRequestInfo.">IsURLRequestInfo()</a> determines if a resource is a <code>URLRequestInfo</code>. </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 <code>URLRequestInfo</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the resource is a <code>URLRequestInfo</code>, <code>PP_FALSE</code> if the resource is invalid or some type other than <code>URLRequestInfo</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a47e9163b0ee627496a249171dc5c53be"></a><!-- doxytag: member="PPB_URLRequestInfo::SetProperty" ref="a47e9163b0ee627496a249171dc5c53be" args=")(PP_Resource request, PP_URLRequestProperty property, struct PP_Var value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#a47e9163b0ee627496a249171dc5c53be">PPB_URLRequestInfo::SetProperty</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> request, <a class="el" href="group___enums.html#ga41975630f0a4c49e47d4a21754f8402d">PP_URLRequestProperty</a> property, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___u_r_l_request_info__1__0.html#a47e9163b0ee627496a249171dc5c53be" title="SetProperty() sets a request property.">SetProperty()</a> sets a request property. </p>
<p>The value of the property must be the correct type according to the property being set.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">request</td><td>A <code>PP_Resource</code> corresponding to a <code>URLRequestInfo</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">property</td><td>A <code>PP_URLRequestProperty</code> identifying the property to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>A <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> containing the property value.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if successful, <code>PP_FALSE</code> if any of the parameters are invalid. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__url__request__info_8h.html">ppb_url_request_info.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}