| 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; | 5 module arc; |
| 6 | 6 |
| 7 [Extensible] | 7 [Extensible] |
| 8 enum NetworkResult { | 8 enum NetworkResult { |
| 9 SUCCESS = 0, | 9 SUCCESS = 0, |
| 10 FAILURE = 1, | 10 FAILURE = 1, |
| 11 }; | 11 }; |
| 12 | 12 |
| 13 [Extensible] |
| 14 enum GetNetworksRequestType { |
| 15 CONFIGURED_ONLY = 0, |
| 16 VISIBLE_ONLY = 1, |
| 17 }; |
| 18 |
| 13 struct WifiConfiguration { | 19 struct WifiConfiguration { |
| 14 // These correspond to ONC properties returned by | 20 // These correspond to ONC properties returned by |
| 15 // chrome.networkingPrivate.getNetworks(). | 21 // chrome.networkingPrivate.getNetworks(). |
| 16 // See components/onc/docs/onc_spec.html | 22 // See components/onc/docs/onc_spec.html |
| 17 string ssid; | 23 string ssid; |
| 18 int32 frequency; | 24 int32 frequency; |
| 19 int32 signal_strength; | 25 int32 signal_strength; |
| 20 string bssid; | 26 string bssid; |
| 21 string security; | 27 string security; |
| 22 }; | 28 }; |
| 23 | 29 |
| 24 struct NetworkData { | 30 struct NetworkData { |
| 25 NetworkResult status; | 31 NetworkResult status; |
| 26 array<WifiConfiguration> networks; | 32 array<WifiConfiguration> networks; |
| 27 }; | 33 }; |
| 28 | 34 |
| 29 interface NetHost { | 35 interface NetHost { |
| 30 // Sends a request to get configured or visible WiFi networks based on the | 36 // Sends a request to get configured or visible WiFi networks based on the |
| 31 // |configured_only| and |visible_only| flags. | 37 // |configured_only| and |visible_only| flags. |
| 32 GetNetworks@0(bool configured_only, bool visible_only) => (NetworkData data); | 38 GetNetworksDeprecated@0(bool configured_only, bool visible_only) => (NetworkDa
ta data); |
| 33 | 39 |
| 34 // Sends a request to get enabled / disabled status of WiFi. | 40 // Sends a request to get enabled / disabled status of WiFi. |
| 35 GetWifiEnabledState@1() => (bool is_enabled); | 41 GetWifiEnabledState@1() => (bool is_enabled); |
| 36 | 42 |
| 37 // Sends a request to start scan of WiFi APs. | 43 // Sends a request to start scan of WiFi APs. |
| 38 [MinVersion=1] StartScan@2(); | 44 [MinVersion=1] StartScan@2(); |
| 45 |
| 46 // Sends a request to get configured or visible WiFi networks based on the |
| 47 // request type. |
| 48 [MinVersion=2] GetNetworks@3(GetNetworksRequestType type) => (NetworkData data
); |
| 39 }; | 49 }; |
| 40 | 50 |
| 41 interface NetInstance { | 51 interface NetInstance { |
| 42 // Establishes full-duplex communication with the host. | 52 // Establishes full-duplex communication with the host. |
| 43 Init@0(NetHost host_ptr); | 53 Init@0(NetHost host_ptr); |
| 44 | 54 |
| 45 // Notifies the instance of a WiFI AP scan being completed. | 55 // Notifies the instance of a WiFI AP scan being completed. |
| 46 [MinVersion=1] ScanCompleted@1(); | 56 [MinVersion=1] ScanCompleted@1(); |
| 47 }; | 57 }; |
| OLD | NEW |