blob: 1a03da693872120691d990c16eee90b01d2703d2 [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_NetworkProxy 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_NetworkProxy" --><h2>
Data Fields</h2><table class="memberdecls">
<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___network_proxy__1__0.html#af417cbf01c96db637472ac31bb4c6fbb">GetProxyForURL</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> url, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> *proxy_string, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This interface provides a way to determine the appropriate proxy settings for a given URL. </p>
<p>Permissions: Apps permission <code>socket</code> with subrule <code>resolve-proxy</code> is required for using this API. For more details about network communication permissions, please see: <a href="http://developer.chrome.com/apps/app_network.html">http://developer.chrome.com/apps/app_network.html</a> </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="af417cbf01c96db637472ac31bb4c6fbb"></a><!-- doxytag: member="PPB_NetworkProxy::GetProxyForURL" ref="af417cbf01c96db637472ac31bb4c6fbb" args=")(PP_Instance instance, struct PP_Var url, struct PP_Var *proxy_string, struct PP_CompletionCallback callback)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___network_proxy__1__0.html#af417cbf01c96db637472ac31bb4c6fbb">PPB_NetworkProxy::GetProxyForURL</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> url, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> *proxy_string, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieves the proxy that will be used for the given URL. </p>
<p>The result will be a string in PAC format. For more details about PAC format, please see <a href="http://en.wikipedia.org/wiki/Proxy_auto-config">http://en.wikipedia.org/wiki/Proxy_auto-config</a></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>
<tr><td class="paramdir">[in]</td><td class="paramname">url</td><td>A string <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 a URL.</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">proxy_string</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> that GetProxyForURL will set upon successful completion. If the call fails, <code>proxy_string </code> will be unchanged. Otherwise, it will be set to a string <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 appropriate PAC string for <code>url</code>. If set, <code>proxy_string</code> will have a reference count of 1 which the plugin must manage.</td></tr>
<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.</td></tr>
</table>
</dd>
</dl>
<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>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__network__proxy_8h.html">ppb_network_proxy.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}