Chromium Code Reviews| 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 module arc.mojom; | 5 module arc.mojom; |
| 6 | 6 |
| 7 [Extensible] | 7 [Extensible] |
| 8 enum NetworkResult { | 8 enum NetworkResult { |
| 9 SUCCESS = 0, | 9 SUCCESS = 0, |
| 10 FAILURE = 1, | 10 FAILURE = 1, |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 struct ConfiguredNetworkDetails { | 32 struct ConfiguredNetworkDetails { |
| 33 string passphrase; | 33 string passphrase; |
| 34 bool autoconnect; | 34 bool autoconnect; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 union NetworkDetails { | 37 union NetworkDetails { |
| 38 VisibleNetworkDetails visible; | 38 VisibleNetworkDetails visible; |
| 39 ConfiguredNetworkDetails configured; | 39 ConfiguredNetworkDetails configured; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 [Extensible] | |
| 43 enum IPAddressType { | |
| 44 IPV4, | |
| 45 IPV6, | |
| 46 }; | |
| 47 | |
| 48 struct IPConfiguration { | |
| 49 string gateway; | |
| 50 string ip_address; | |
| 51 array<string> name_servers; | |
| 52 int32 routing_prefix; | |
| 53 IPAddressType type; | |
| 54 string web_proxy_auto_discovery_url; | |
| 55 }; | |
| 56 | |
| 57 [Extensible] | |
| 58 enum SecurityType { | |
| 59 NONE, | |
| 60 WEP_PSK, | |
| 61 WEP_8021X, | |
| 62 WPA_PSK, | |
| 63 WPA_EAP, | |
| 64 }; | |
| 65 | |
| 66 struct WiFi { | |
|
Luis Héctor Chávez
2016/05/14 20:07:29
WifiInfo? WifiConfiguration?
Kevin Cernekee
2016/05/15 21:02:34
Acknowledged.
| |
| 67 string bssid; | |
| 68 int32 frequency; | |
| 69 string hex_ssid; | |
| 70 bool hidden_ssid; | |
| 71 SecurityType security; | |
| 72 int32 signal_strength; | |
| 73 }; | |
| 74 | |
| 75 [Extensible] | |
| 76 enum NetworkType { | |
| 77 CELLULAR, | |
| 78 ETHERNET, | |
| 79 VPN, | |
| 80 WIFI, | |
| 81 WIMAX, | |
| 82 }; | |
| 83 | |
| 84 struct NetworkConfiguration { | |
| 85 ConnectionStateType connection_state; | |
| 86 string guid; | |
| 87 array<IPConfiguration>? ip_configs; | |
| 88 string? mac_address; | |
| 89 NetworkType type; | |
| 90 WiFi? wifi; | |
|
Luis Héctor Chávez
2016/05/14 20:07:29
This looks like it will be null or not depending o
Kevin Cernekee
2016/05/15 21:02:34
Acknowledged.
| |
| 91 }; | |
| 92 | |
| 42 struct WifiConfiguration { | 93 struct WifiConfiguration { |
| 43 // These correspond to ONC properties returned by | 94 // These correspond to ONC properties returned by |
| 44 // chrome.networkingPrivate.getNetworks() and createNetwork(). | 95 // chrome.networkingPrivate.getNetworks() and createNetwork(). |
| 45 // See components/onc/docs/onc_spec.html | 96 // See components/onc/docs/onc_spec.html |
| 46 | 97 |
| 47 // SSID encoded as a series of hex bytes, e.g. "61626364" | 98 // SSID encoded as a series of hex bytes, e.g. "61626364" |
| 48 // This allows for handling SSIDs which are not valid UTF-8 strings. | 99 // This allows for handling SSIDs which are not valid UTF-8 strings. |
| 49 [MinVersion=2] string? hexssid@6; | 100 [MinVersion=2] string? hexssid@6; |
| 50 | 101 |
| 51 [MinVersion=1] string? guid@5; | 102 [MinVersion=1] string? guid@5; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 146 |
| 96 // Deletes an existing network. | 147 // Deletes an existing network. |
| 97 [MinVersion=4] ForgetNetwork@6(string guid) => (NetworkResult status); | 148 [MinVersion=4] ForgetNetwork@6(string guid) => (NetworkResult status); |
| 98 | 149 |
| 99 // Initiates a network connection. If called when connected to a different | 150 // Initiates a network connection. If called when connected to a different |
| 100 // network, it will drop the current connection first. | 151 // network, it will drop the current connection first. |
| 101 [MinVersion=4] StartConnect@7(string guid) => (NetworkResult status); | 152 [MinVersion=4] StartConnect@7(string guid) => (NetworkResult status); |
| 102 | 153 |
| 103 // Disconnects from network |guid|. | 154 // Disconnects from network |guid|. |
| 104 [MinVersion=4] StartDisconnect@8(string guid) => (NetworkResult status); | 155 [MinVersion=4] StartDisconnect@8(string guid) => (NetworkResult status); |
| 156 | |
| 157 // Retrieve details (IP, SSID, etc.) about the current network connection. | |
| 158 [MinVersion=5] GetDefaultNetwork@9() => ( | |
| 159 NetworkConfiguration? logical_default, | |
| 160 NetworkConfiguration? physical_default); | |
| 105 }; | 161 }; |
| 106 | 162 |
| 107 interface NetInstance { | 163 interface NetInstance { |
| 108 // Establishes full-duplex communication with the host. | 164 // Establishes full-duplex communication with the host. |
| 109 Init@0(NetHost host_ptr); | 165 Init@0(NetHost host_ptr); |
| 110 | 166 |
| 111 // Notifies the instance of a WiFI AP scan being completed. | 167 // Notifies the instance of a WiFI AP scan being completed. |
| 112 [MinVersion=1] ScanCompleted@1(); | 168 [MinVersion=1] ScanCompleted@1(); |
| 169 | |
| 170 [MinVersion=2] DefaultNetworkChanged@2( | |
| 171 NetworkConfiguration? logical_default, | |
| 172 NetworkConfiguration? physical_default); | |
| 113 }; | 173 }; |
| OLD | NEW |