1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace":"networkingPrivate",
10 "implemented_in": "chrome/browser/extensions/api/networking_private/networking_private_api.h"
12 "platforms": ["chromeos", "win", "mac"],
15 "id": "NetworkProperties",
17 "additionalProperties": { "type": "any" }
20 "id": "ManagedNetworkProperties",
22 "additionalProperties": { "type": "any" }
25 "id": "VerificationProperties",
30 "description": "A string containing a PEM-encoded X.509 certificate for use in verifying the signed data."
34 "description": "A string containing a PEM-encoded RSA public key to be used to compare with the one in signedData"
38 "description": "A string containing a base64-encoded random binary data for use in verifying the signed data."
42 "description": "A string containing the identifying data string signed by the device."
46 "description": "A string containing the serial number of the device."
50 "description": "A string containing the SSID of the device. Only set if the device has already been setup once."
54 "description": "A string containing the BSSID of the device. Only set if the device has already been setup."
61 "enum": ["Ethernet", "WiFi", "Cellular"]
64 "id": "CaptivePortalStatus",
66 "enum": ["Unknown", "Offline", "Online", "Portal", "ProxyAuthRequired"]
71 "name": "getProperties",
72 "description": "Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values).",
75 "name": "networkGuid",
77 "description": "The unique identifier of the network to get properties from."
85 "$ref": "NetworkProperties",
86 "description": "Results of the query for network properties."
93 "name": "getManagedProperties",
94 "description": "Gets the merged properties of the network with id networkGuid from the sources: User settings, shared settings, user policy, device policy and the currently active settings.",
97 "name": "networkGuid",
99 "description": "The unique identifier of the network to get properties from."
106 "name": "properties",
107 "$ref": "ManagedNetworkProperties",
108 "description": "Results of the query for managed network properties."
116 "description": "Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than getProperties, which requires a round trip to query the networking subsystem. It only returns a subset of the properties returned by getProperties.",
119 "name": "networkGuid",
121 "description": "The unique identifier of the network to set properties on."
128 "name": "properties",
129 "$ref": "NetworkProperties",
130 "description": "Results of the query for network properties."
137 "name": "setProperties",
138 "description": "Sets the properties of the network with id networkGuid.",
141 "name": "networkGuid",
143 "description": "The unique identifier of the network to set properties on."
146 "name": "properties",
147 "$ref": "NetworkProperties",
148 "description": "The properties to set on the network."
158 "name": "createNetwork",
159 "description": "Creates a new network configuration from propeties. If a matching configured network already exists, this will fail. Otherwise returns the guid of the new network.",
164 "description": "If true, share this network configuration with other users."
167 "name": "properties",
168 "$ref": "NetworkProperties",
169 "description": "The properties to configure the new network with."
184 "name": "getVisibleNetworks",
185 "description": "Returns a list of visible network objects with the following ONC properties: GUID, Type, Name, ConnectionState, ErrorState, WiFi.Security, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState. Cellular.OutOfCredits",
190 "enum": ["Ethernet", "WiFi", "Bluetooth", "Cellular", "VPN", "All"],
191 "description": "The type of networks to return."
199 "name": "networkList",
201 "items": { "$ref": "NetworkProperties" }
208 "name": "getEnabledNetworkTypes",
209 "description": "Returns a list of the enabled network type.",
217 "name": "networkList",
219 "items": { "$ref": "NetworkType" }
226 "name": "enableNetworkType",
227 "description": "Enable the specified network type.",
230 "name": "networkType",
231 "$ref": "NetworkType"
236 "name": "disableNetworkType",
237 "description": "Disable the specified network type.",
240 "name": "networkType",
241 "$ref": "NetworkType"
246 "name": "requestNetworkScan",
247 "description": "Requests that the networking subsystem scan for new networks and update the list returned by getVisibleNetworks. This is only a request: the network subsystem can choose to ignore it. If the list is updated, then the onNetworkListChanged event will be fired.",
251 "name": "startConnect",
252 "description": "Starts a connection to the network with networkGuid.",
255 "name": "networkGuid",
257 "description": "The unique identifier of the network to connect to."
264 "description": "A callback function that indicates that a connection has been initiated."
269 "name": "startDisconnect",
270 "description": "Starts a disconnect from the network with networkGuid.",
273 "name": "networkGuid",
275 "description": "The unique identifier of the network to disconnect from."
282 "description": "A callback function that indicates that a disconnect has been initiated."
287 "name": "verifyDestination",
288 "description": "Verifies that the device is a trusted device.",
291 "name": "properties",
292 "$ref": "VerificationProperties",
293 "description": "Properties of the destination to use in verifying that it is a trusted device."
304 "description": "A callback function that indicates whether or not the device is a trusted device."
309 "name": "verifyAndEncryptCredentials",
310 "description": "Verifies that the device is a trusted device and retrieves encrypted network credentials.",
313 "name": "properties",
314 "$ref": "VerificationProperties",
315 "description": "Properties of the destination to use in verifying that it is a trusted device."
320 "description": "A string containing the unique identifier of the network to get credentials for."
327 "name": "credentials",
331 "description": "A callback function that receives base64-encoded encrypted credential data to send to a trusted device."
336 "name": "verifyAndEncryptData",
337 "description": "Verifies that the device is a trusted device and encrypts supplied data with device public key.",
340 "name": "properties",
341 "$ref": "VerificationProperties",
342 "description": "Properties of the destination to use in verifying that it is a trusted device."
347 "description": "A string containing the base64-encoded data to encrypt."
354 "name": "encryptedData",
358 "description": "A callback function that receives base64-encoded encrypted data to send to a trusted device."
363 "name": "setWifiTDLSEnabledState",
364 "description": "Enables TDLS for wifi traffic with a specified peer if available.",
367 "name": "ip_or_mac_address",
369 "description": "The IP or MAC address of the peer with which to enable a TDLS connection."
374 "description": "If true, enable TDLS, otherwise disable TDLS."
385 "description": "A callback function that receives a string with an error or the current TDLS status. 'Failed' indicates that the request failed (e.g. MAC address lookup failed). 'Timeout' indicates that the lookup timed out. Otherwise a valid status is returned (see getWifiTDLSStatus)."
390 "name": "getWifiTDLSStatus",
391 "description": "Returns the current TDLS status for the specified peer.",
394 "name": "ip_or_mac_address",
396 "description": "The IP or MAC address of the peer."
407 "description": "A callback function that receives a string with the current TDLS status which can be 'Connected', 'Disabled', 'Disconnected', 'Nonexistent', or 'Unknown'"
412 "name": "getCaptivePortalStatus",
413 "description": "Returns captive portal status for the network with networkGuid.",
416 "name": "networkPath",
418 "description": "The path of the network to get captive portal status."
426 "$ref": "CaptivePortalStatus",
427 "description": "Results of the query for network captive portal status."
436 "name": "onNetworksChanged",
438 "description": "Fired when the properties change on any of the networks. Sends a list of identifiers for networks whose properties have changed.",
443 "items": { "type": "string" }
448 "name": "onNetworkListChanged",
450 "description": "Fired when the list of networks has changed. Sends a complete list of identifiers for all the current networks.",
455 "items": { "type": "string" }
460 "name": "onPortalDetectionCompleted",
462 "description": "Fired when a portal detection for a network completes. Sends a name of the network and corresponding captive portal status.",
465 "name": "networkPath",
470 "$ref": "CaptivePortalStatus"