1 {{+bindTo:partials.standard_nacl_api}} 2 <h1>PPB_NetworkMonitor Struct 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 </div> 10 <!--header--> 11 <div class="contents"> 12 <!-- doxytag: class="PPB_NetworkMonitor" --><h2> 13 Data Fields</h2><table class="memberdecls"> 14 15 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* </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> 16 <tr><td class="memItemLeft" align="right" valign="top">int32_t(* </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> 17 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* </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> 18 </table> 19 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2> 20 <div class="textblock"><p>The <code>PPB_NetworkMonitor</code> allows to get network interfaces configuration and monitor network configuration changes. </p> 21 <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> 22 </div><hr /><h2>Field Documentation</h2> 23 <a class="anchor" id="a854eb22d3a1241f6d03602392fa7a6af"></a><!-- doxytag: member="PPB_NetworkMonitor::Create" ref="a854eb22d3a1241f6d03602392fa7a6af" args=")(PP_Instance instance)" --> 24 <div class="memitem"> 25 <div class="memproto"> 26 <table class="memname"> 27 <tr> 28 <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> 29 </tr> 30 </table> 31 </div> 32 <div class="memdoc"> 33 <p>Creates a Network Monitor resource. </p> 34 <dl class="params"><dt><b>Parameters:</b></dt><dd> 35 <table class="params"> 36 <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> 37 </table> 38 </dd> 39 </dl> 40 <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> 41 </div> 42 </div> 43 <a class="anchor" id="ac631ae11ea28c1274eed22b7725ccfe4"></a><!-- doxytag: member="PPB_NetworkMonitor::IsNetworkMonitor" ref="ac631ae11ea28c1274eed22b7725ccfe4" args=")(PP_Resource resource)" --> 44 <div class="memitem"> 45 <div class="memproto"> 46 <table class="memname"> 47 <tr> 48 <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> 49 </tr> 50 </table> 51 </div> 52 <div class="memdoc"> 53 <p>Determines if the specified <code>resource</code> is a <code>NetworkMonitor</code> object. </p> 54 <dl class="params"><dt><b>Parameters:</b></dt><dd> 55 <table class="params"> 56 <tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> resource.</td></tr> 57 </table> 58 </dd> 59 </dl> 60 <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> 61 </div> 62 </div> 63 <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)" --> 64 <div class="memitem"> 65 <div class="memproto"> 66 <table class="memname"> 67 <tr> 68 <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> 69 </tr> 70 </table> 71 </div> 72 <div class="memdoc"> 73 <p>Gets current network configuration. </p> 74 <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> 75 <dl class="params"><dt><b>Parameters:</b></dt><dd> 76 <table class="params"> 77 <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> 78 <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> 79 <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> 80 </table> 81 </dd> 82 </dl> 83 <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> 84 </div> 85 </div> 86 <hr />The documentation for this struct was generated from the following file:<ul> 87 <li><a class="el" href="ppb__network__monitor_8h.html">ppb_network_monitor.h</a></li> 88 </ul> 89 </div><!-- contents --> 90 </div> 91 {{/partials.standard_nacl_api}} 92