OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 /** | 6 /** |
7 * @fileoverview Typedefs for CrOncDataElement.data. Note: These 'types' define | 7 * @fileoverview Typedefs for CrOncDataElement.data. Note: These 'types' define |
8 * a subset of ONC properties in the ONC data dictionary. The first letter is | 8 * a subset of ONC properties in the ONC data dictionary. The first letter is |
9 * capitalized to match the ONC spec and avoid an extra layer of translation. | 9 * capitalized to match the ONC spec and avoid an extra layer of translation. |
10 * See components/onc/docs/onc_spec.html for the complete spec. | 10 * See components/onc/docs/onc_spec.html for the complete spec. |
11 */ | 11 */ |
12 | 12 |
13 var CrOnc = {}; | 13 var CrOnc = {}; |
14 | 14 |
| 15 /** @enum {string} */ |
| 16 CrOnc.Type = { |
| 17 CELLULAR: 'Cellular', |
| 18 ETHERNET: 'Ethernet', |
| 19 VPN: 'VPN', |
| 20 WIFI: 'WiFi', |
| 21 WIMAX: 'WiMAX', |
| 22 }; |
| 23 |
| 24 /** @enum {string} */ |
| 25 CrOnc.ConnectionState = { |
| 26 CONNECTED: 'Connected', |
| 27 CONNECTING: 'Connecting', |
| 28 NOT_CONNECTED: 'NotConnected', |
| 29 }; |
| 30 |
| 31 /** @enum {string} */ |
| 32 CrOnc.NetworkTechnology = { |
| 33 EDGE: 'EDGE', |
| 34 EVDO: 'EVDO', |
| 35 GPRS: 'GPRS', |
| 36 GSM: 'GSM', |
| 37 HSPA: 'HSPA', |
| 38 HSPA_PLUS: 'HSPA+', |
| 39 LTE: 'LTE', |
| 40 LTE_ADVANCED: 'LTE Advanced', |
| 41 UMTS: 'UMTS', |
| 42 UNKNOWN: 'Unknown', |
| 43 }; |
| 44 |
| 45 /** @enum {string} */ |
| 46 CrOnc.RoamingState = { |
| 47 HOME: 'Home', |
| 48 REQUIRED: 'Required', |
| 49 ROAMING: 'Roaming', |
| 50 UNKNOWN: 'Unknown', |
| 51 }; |
| 52 |
| 53 /** @enum {string} */ |
| 54 CrOnc.Security = { |
| 55 NONE: 'None', |
| 56 WEP_8021X: 'WEP-8021X', |
| 57 WEP_PSK: 'WEP-PSK', |
| 58 WPA_EAP: 'WPA-EAP', |
| 59 WPA_PSK: 'WPA-PSK', |
| 60 }; |
| 61 |
15 /** @typedef {string|!Object} */ | 62 /** @typedef {string|!Object} */ |
16 CrOnc.ManagedStringType; | 63 CrOnc.ManagedStringType; |
17 | 64 |
18 /** | 65 /** |
19 * @typedef {{NetworkTechnology: string, Strength: number}} | 66 * @typedef {{ |
| 67 * NetworkTechnology: CrOnc.NetworkTechnology, |
| 68 * RoamingState: CrOnc.RoamingState, |
| 69 * Strength: number |
| 70 * }} |
20 */ | 71 */ |
21 CrOnc.CellularType; | 72 CrOnc.CellularType; |
22 | 73 |
23 /** | 74 /** |
24 * @typedef {{Security: string, Strength: number}} | 75 * @typedef {{Security: CrOnc.Security, Strength: number}} |
25 */ | 76 */ |
26 CrOnc.WiFiType; | 77 CrOnc.WiFiType; |
27 | 78 |
28 /** | 79 /** |
29 * @typedef {{Strength: number}} | 80 * @typedef {{Strength: number}} |
30 */ | 81 */ |
31 CrOnc.WiMAXType; | 82 CrOnc.WiMAXType; |
32 | 83 |
33 /** @enum {string} */ | |
34 CrOnc.Type = { | |
35 CELLULAR: "Cellular", | |
36 ETHERNET: "Ethernet", | |
37 VPN: "VPN", | |
38 WIFI: "WiFi", | |
39 WIMAX: "WiMAX", | |
40 }; | |
41 | |
42 /** | 84 /** |
43 * @typedef {{ | 85 * @typedef {{ |
44 * Cellular: CrOnc.CellularType, | 86 * Cellular: CrOnc.CellularType, |
45 * ConnectionState: string, | 87 * ConnectionState: CrOnc.ConnectionState, |
46 * GUID: string, | 88 * GUID: string, |
47 * Name: CrOnc.ManagedStringType, | 89 * Name: CrOnc.ManagedStringType, |
48 * Type: string, | 90 * Type: CrOnc.Type, |
49 * WiFi: CrOnc.WiFiType, | 91 * WiFi: CrOnc.WiFiType, |
50 * WiMAX: CrOnc.WiMAXType | 92 * WiMAX: CrOnc.WiMAXType |
51 * }} | 93 * }} |
52 */ | 94 */ |
53 CrOnc.NetworkConfigType; | 95 CrOnc.NetworkConfigType; |
OLD | NEW |