chromium/native_client_sdk/doc_generated/pepper_beta/c/struct_p_p_b___network_monitor__1__0.html

{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_NetworkMonitor 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_NetworkMonitor" --><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___network_monitor__1__0.html#a854eb22d3a1241f6d03602392fa7a6af">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
<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_monitor__1__0.html#ade2323702ca75e315fac9e4fa6a9f5d5">UpdateNetworkList</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> network_monitor, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> *network_list, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</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___network_monitor__1__0.html#ac631ae11ea28c1274eed22b7725ccfe4">IsNetworkMonitor</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_NetworkMonitor</code> allows to get network interfaces configuration and monitor network configuration changes. </p>
<p>Permissions: Apps permission <code>socket</code> with subrule <code>network-state</code> is required for <code><a class="el" href="struct_p_p_b___network_monitor__1__0.html#ade2323702ca75e315fac9e4fa6a9f5d5" title="Gets current network configuration.">UpdateNetworkList()</a></code>. 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="a854eb22d3a1241f6d03602392fa7a6af"></a><!-- doxytag: member="PPB_NetworkMonitor::Create" ref="a854eb22d3a1241f6d03602392fa7a6af" 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___network_monitor__1__0.html#a854eb22d3a1241f6d03602392fa7a6af">PPB_NetworkMonitor::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a Network Monitor resource. </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> corresponding to a network monitor or 0 on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="ac631ae11ea28c1274eed22b7725ccfe4"></a><!-- doxytag: member="PPB_NetworkMonitor::IsNetworkMonitor" ref="ac631ae11ea28c1274eed22b7725ccfe4" 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___network_monitor__1__0.html#ac631ae11ea28c1274eed22b7725ccfe4">PPB_NetworkMonitor::IsNetworkMonitor</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determines if the specified <code>resource</code> is a <code>NetworkMonitor</code> object. </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> resource.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns <code>PP_TRUE</code> if <code>resource</code> is a <code>PPB_NetworkMonitor</code>, <code>PP_FALSE</code> otherwise. </dd></dl>
</div>
</div>
<a class="anchor" id="ade2323702ca75e315fac9e4fa6a9f5d5"></a><!-- doxytag: member="PPB_NetworkMonitor::UpdateNetworkList" ref="ade2323702ca75e315fac9e4fa6a9f5d5" args=")(PP_Resource network_monitor, PP_Resource *network_list, 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_monitor__1__0.html#ade2323702ca75e315fac9e4fa6a9f5d5">PPB_NetworkMonitor::UpdateNetworkList</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> network_monitor, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> *network_list, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets current network configuration. </p>
<p>When called for the first time, completes as soon as the current network configuration is received from the browser. Each consequent call will wait for network list changes, returning a new <code>PPB_NetworkList</code> resource every time.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">network_monitor</td><td>A <code>PP_Resource</code> corresponding to a network monitor. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">network_list</td><td>The <code>PPB_NetworkList</code><code> resource with the current state of network interfaces. </code></td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td><code></code><code>A </code><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><code></code><code> An int32_t containing an error code from </code><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>. <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have required permissions. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__network__monitor_8h.html">ppb_network_monitor.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}