Enable Enterprise enrollment on desktop builds.
[chromium-blink-merge.git] / chrome / common / extensions / api / networking_private.json
blobb9f66e8b7381bc812c98c05548c972d2eb30f519
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.
6   {
7     "namespace":"networkingPrivate",
8     "description": "none",
9     "compiler_options": {
10       "implemented_in": "chrome/browser/extensions/api/networking_private/networking_private_api.h"
11     },
12     "platforms": ["chromeos", "win", "mac"],
13     "types" : [
14       {
15         "id": "NetworkProperties",
16         "type": "object",
17         "additionalProperties": { "type": "any" }
18       },
19       {
20         "id": "ManagedNetworkProperties",
21         "type": "object",
22         "additionalProperties": { "type": "any" }
23       },
24       {
25         "id": "VerificationProperties",
26         "type": "object",
27         "properties": {
28           "certificate": {
29             "type": "string",
30             "description": "A string containing a PEM-encoded X.509 certificate for use in verifying the signed data."
31           },
32           "publicKey": {
33             "type": "string",
34             "description": "A string containing a PEM-encoded RSA public key to be used to compare with the one in signedData"
35           },
36           "nonce": {
37             "type": "string",
38             "description": "A string containing a base64-encoded random binary data for use in verifying the signed data."
39           },
40           "signedData": {
41             "type": "string",
42             "description": "A string containing the identifying data string signed by the device."
43           },
44           "deviceSerial": {
45             "type": "string",
46             "description": "A string containing the serial number of the device."
47           },
48           "deviceSsid": {
49             "type": "string",
50             "description": "A string containing the SSID of the device.  Only set if the device has already been setup once."
51           },
52           "deviceBssid": {
53             "type": "string",
54             "description": "A string containing the BSSID of the device.  Only set if the device has already been setup."
55           }
56         }
57       },
58       {
59         "id": "NetworkType",
60         "type": "string",
61         "enum": ["Ethernet", "WiFi", "Cellular"]
62       },
63       {
64         "id": "CaptivePortalStatus",
65         "type": "string",
66         "enum": ["Unknown", "Offline", "Online", "Portal", "ProxyAuthRequired"]
67       }
68     ],
69     "functions": [
70       {
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).",
73         "parameters": [
74           {
75             "name": "networkGuid",
76             "type": "string",
77             "description": "The unique identifier of the network to get properties from."
78           },
79           {
80             "name": "callback",
81             "type": "function",
82             "parameters": [
83               {
84                 "name": "properties",
85                 "$ref": "NetworkProperties",
86                 "description": "Results of the query for network properties."
87               }
88             ]
89           }
90         ]
91       },
92       {
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.",
95         "parameters": [
96           {
97             "name": "networkGuid",
98             "type": "string",
99             "description": "The unique identifier of the network to get properties from."
100           },
101           {
102             "name": "callback",
103             "type": "function",
104             "parameters": [
105               {
106                 "name": "properties",
107                 "$ref": "ManagedNetworkProperties",
108                 "description": "Results of the query for managed network properties."
109               }
110             ]
111           }
112         ]
113       },
114       {
115         "name": "getState",
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.",
117         "parameters": [
118           {
119             "name": "networkGuid",
120             "type": "string",
121             "description": "The unique identifier of the network to set properties on."
122           },
123           {
124             "name": "callback",
125             "type": "function",
126             "parameters": [
127               {
128                 "name": "properties",
129                 "$ref": "NetworkProperties",
130                 "description": "Results of the query for network properties."
131               }
132             ]
133           }
134         ]
135       },
136       {
137         "name": "setProperties",
138         "description": "Sets the properties of the network with id networkGuid.",
139         "parameters": [
140           {
141             "name": "networkGuid",
142             "type": "string",
143             "description": "The unique identifier of the network to set properties on."
144           },
145           {
146             "name": "properties",
147             "$ref": "NetworkProperties",
148             "description": "The properties to set on the network."
149           },
150           {
151             "name": "callback",
152             "type": "function",
153             "parameters": []
154           }
155         ]
156       },
157       {
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.",
160         "parameters": [
161           {
162             "name": "shared",
163             "type": "boolean",
164             "description": "If true, share this network configuration with other users."
165           },
166           {
167             "name": "properties",
168             "$ref": "NetworkProperties",
169             "description": "The properties to configure the new network with."
170           },
171           {
172             "name": "callback",
173             "type": "function",
174             "parameters": [
175               {
176                 "name": "guid",
177                 "type": "string"
178               }
179             ]
180           }
181         ]
182       },
183       {
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",
186         "parameters": [
187           {
188             "name": "type",
189             "type": "string",
190             "enum": ["Ethernet", "WiFi", "Bluetooth", "Cellular", "VPN", "All"],
191             "description": "The type of networks to return."
192           },
193           {
194             "name": "callback",
195             "type": "function",
196             "optional": true,
197             "parameters": [
198               {
199                 "name": "networkList",
200                 "type": "array",
201                 "items": { "$ref": "NetworkProperties" }
202               }
203             ]
204           }
205         ]
206       },
207       {
208         "name": "getEnabledNetworkTypes",
209         "description": "Returns a list of the enabled network type.",
210         "parameters": [
211           {
212             "name": "callback",
213             "type": "function",
214             "optional": true,
215             "parameters": [
216               {
217                 "name": "networkList",
218                 "type": "array",
219                 "items": { "$ref": "NetworkType" }
220               }
221             ]
222           }
223         ]
224       },
225       {
226         "name": "enableNetworkType",
227         "description": "Enable the specified network type.",
228         "parameters": [
229           {
230             "name": "networkType",
231             "$ref": "NetworkType"
232           }
233         ]
234       },
235       {
236         "name": "disableNetworkType",
237         "description": "Disable the specified network type.",
238         "parameters": [
239           {
240             "name": "networkType",
241             "$ref": "NetworkType"
242           }
243         ]
244       },
245       {
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.",
248         "parameters": []
249       },
250       {
251         "name": "startConnect",
252         "description": "Starts a connection to the network with networkGuid.",
253         "parameters": [
254           {
255             "name": "networkGuid",
256             "type": "string",
257             "description": "The unique identifier of the network to connect to."
258           },
259           {
260             "name": "callback",
261             "type": "function",
262             "optional": true,
263             "parameters": [],
264             "description": "A callback function that indicates that a connection has been initiated."
265           }
266         ]
267       },
268       {
269         "name": "startDisconnect",
270         "description": "Starts a disconnect from the network with networkGuid.",
271         "parameters": [
272           {
273             "name": "networkGuid",
274             "type": "string",
275             "description": "The unique identifier of the network to disconnect from."
276           },
277           {
278             "name": "callback",
279             "type": "function",
280             "optional": true,
281             "parameters": [],
282             "description": "A callback function that indicates that a disconnect has been initiated."
283           }
284         ]
285       },
286       {
287         "name": "verifyDestination",
288         "description": "Verifies that the device is a trusted device.",
289         "parameters": [
290           {
291             "name": "properties",
292             "$ref": "VerificationProperties",
293             "description": "Properties of the destination to use in verifying that it is a trusted device."
294           },
295           {
296             "name": "callback",
297             "type": "function",
298             "parameters": [
299               {
300                 "name": "verified",
301                 "type": "boolean"
302               }
303             ],
304             "description": "A callback function that indicates whether or not the device is a trusted device."
305           }
306         ]
307       },
308       {
309         "name": "verifyAndEncryptCredentials",
310         "description": "Verifies that the device is a trusted device and retrieves encrypted network credentials.",
311         "parameters": [
312           {
313             "name": "properties",
314             "$ref": "VerificationProperties",
315             "description": "Properties of the destination to use in verifying that it is a trusted device."
316           },
317           {
318             "name": "guid",
319             "type": "string",
320             "description": "A string containing the unique identifier of the network to get credentials for."
321           },
322           {
323             "name": "callback",
324             "type": "function",
325             "parameters": [
326               {
327                 "name": "credentials",
328                 "type": "string"
329               }
330             ],
331             "description": "A callback function that receives base64-encoded encrypted credential data to send to a trusted device."
332           }
333         ]
334       },
335       {
336         "name": "verifyAndEncryptData",
337         "description": "Verifies that the device is a trusted device and encrypts supplied data with device public key.",
338         "parameters": [
339           {
340             "name": "properties",
341             "$ref": "VerificationProperties",
342             "description": "Properties of the destination to use in verifying that it is a trusted device."
343           },
344           {
345             "name": "data",
346             "type": "string",
347             "description": "A string containing the base64-encoded data to encrypt."
348           },
349           {
350             "name": "callback",
351             "type": "function",
352             "parameters": [
353               {
354                 "name": "encryptedData",
355                 "type": "string"
356               }
357             ],
358             "description": "A callback function that receives base64-encoded encrypted data to send to a trusted device."
359           }
360         ]
361       },
362       {
363         "name": "setWifiTDLSEnabledState",
364         "description": "Enables TDLS for wifi traffic with a specified peer if available.",
365         "parameters": [
366           {
367             "name": "ip_or_mac_address",
368             "type": "string",
369             "description": "The IP or MAC address of the peer with which to enable a TDLS connection."
370           },
371           {
372             "name": "enabled",
373             "type": "boolean",
374             "description": "If true, enable TDLS, otherwise disable TDLS."
375           },
376           {
377             "name": "callback",
378             "type": "function",
379             "parameters": [
380               {
381                 "name": "status",
382                 "type": "string"
383               }
384             ],
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)."
386           }
387         ]
388       },
389       {
390         "name": "getWifiTDLSStatus",
391         "description": "Returns the current TDLS status for the specified peer.",
392         "parameters": [
393           {
394             "name": "ip_or_mac_address",
395             "type": "string",
396             "description": "The IP or MAC address of the peer."
397           },
398           {
399             "name": "callback",
400             "type": "function",
401             "parameters": [
402               {
403                 "name": "status",
404                 "type": "string"
405               }
406             ],
407             "description": "A callback function that receives a string with the current TDLS status which can be 'Connected', 'Disabled', 'Disconnected', 'Nonexistent', or 'Unknown'"
408           }
409         ]
410       },
411       {
412         "name": "getCaptivePortalStatus",
413         "description": "Returns captive portal status for the network with networkGuid.",
414         "parameters": [
415           {
416             "name": "networkPath",
417             "type": "string",
418             "description": "The path of the network to get captive portal status."
419           },
420           {
421             "name": "callback",
422             "type": "function",
423             "parameters": [
424               {
425                 "name": "status",
426                 "$ref": "CaptivePortalStatus",
427                 "description": "Results of the query for network captive portal status."
428               }
429             ]
430           }
431         ]
432       }
433     ],
434     "events": [
435       {
436         "name": "onNetworksChanged",
437         "type": "function",
438         "description": "Fired when the properties change on any of the networks.  Sends a list of identifiers for networks whose properties have changed.",
439         "parameters": [
440           {
441             "name": "changes",
442             "type": "array",
443             "items": { "type": "string" }
444           }
445         ]
446       },
447       {
448         "name": "onNetworkListChanged",
449         "type": "function",
450         "description": "Fired when the list of networks has changed.  Sends a complete list of identifiers for all the current networks.",
451         "parameters": [
452           {
453             "name": "changes",
454             "type": "array",
455             "items": { "type": "string" }
456           }
457         ]
458       },
459       {
460         "name": "onPortalDetectionCompleted",
461         "type": "function",
462         "description": "Fired when a portal detection for a network completes. Sends a name of the network and corresponding captive portal status.",
463         "parameters": [
464           {
465             "name": "networkPath",
466             "type": "string"
467           },
468           {
469             "name": "status",
470             "$ref": "CaptivePortalStatus"
471           }
472         ]
473       }
474     ]
475   }