PPB_NetworkMonitor Struct Reference

Data Fields

PP_Resource(* Create )(PP_Instance instance)
int32_t(* UpdateNetworkList )(PP_Resource network_monitor, PP_Resource *network_list, struct PP_CompletionCallback callback)
PP_Bool(* IsNetworkMonitor )(PP_Resource resource)

Detailed Description

The PPB_NetworkMonitor allows to get network interfaces configuration and monitor network configuration changes.

Permissions: Apps permission socket with subrule network-state is required for UpdateNetworkList(). For more details about network communication permissions, please see: http://developer.chrome.com/apps/app_network.html


Field Documentation

Creates a Network Monitor resource.

Parameters:
[in]instanceA PP_Instance identifying one instance of a module.
Returns:
A PP_Resource corresponding to a network monitor or 0 on failure.

Determines if the specified resource is a NetworkMonitor object.

Parameters:
[in]resourceA PP_Resource resource.
Returns:
Returns PP_TRUE if resource is a PPB_NetworkMonitor, PP_FALSE otherwise.
int32_t(* PPB_NetworkMonitor::UpdateNetworkList)(PP_Resource network_monitor, PP_Resource *network_list, struct PP_CompletionCallback callback)

Gets current network configuration.

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 PPB_NetworkList resource every time.

Parameters:
[in]network_monitorA PP_Resource corresponding to a network monitor.
[out]network_listThe PPB_NetworkList resource with the current state of network interfaces.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns:
An int32_t containing an error code from pp_errors.h. PP_ERROR_NOACCESS will be returned if the caller doesn't have required permissions.

The documentation for this struct was generated from the following file: