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: /apps/app_network.html
Field Documentation
PP_Resource(* PPB_NetworkMonitor::Create)(PP_Instance instance) |
Creates a Network Monitor resource.
- Parameters:
[in] instance A PP_Instance
identifying one instance of a module.
- Returns:
- A
PP_Resource
corresponding to a network monitor or 0 on failure.
PP_Bool(* PPB_NetworkMonitor::IsNetworkMonitor)(PP_Resource resource) |
Determines if the specified resource
is a NetworkMonitor
object.
- Parameters:
[in] resource A PP_Resource
resource.
- Returns:
- Returns
PP_TRUE
ifresource
is aPPB_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_monitor A PP_Resource
corresponding to a network monitor.[out] network_list The PPB_NetworkList
resource with the current state of network interfaces.
[in] callback A
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: