OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
7 | 7 |
8 // This header is introduced to make it easy to switch from chromeos_network.cc | 8 // This header is introduced to make it easy to switch from chromeos_network.cc |
9 // to Chrome's own DBus code. crosbug.com/16557 | 9 // to Chrome's own DBus code. crosbug.com/16557 |
10 // All calls to functions in chromeos_network.h should be made through | 10 // All calls to functions in chromeos_network.h should be made through |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // pre-cached in the library, so the call may block whilst the results are | 286 // pre-cached in the library, so the call may block whilst the results are |
287 // read over IPC. | 287 // read over IPC. |
288 // Returns false if an error occurred in reading the results. Note that | 288 // Returns false if an error occurred in reading the results. Note that |
289 // a true return code only indicates the result set was successfully read, | 289 // a true return code only indicates the result set was successfully read, |
290 // it does not imply a scan has successfully completed yet. | 290 // it does not imply a scan has successfully completed yet. |
291 bool CrosGetWifiAccessPoints(WifiAccessPointVector* result); | 291 bool CrosGetWifiAccessPoints(WifiAccessPointVector* result); |
292 | 292 |
293 // Configures the network service specified by |properties|. | 293 // Configures the network service specified by |properties|. |
294 void CrosConfigureService(const base::DictionaryValue& properties); | 294 void CrosConfigureService(const base::DictionaryValue& properties); |
295 | 295 |
| 296 // Converts a |prefix_length| to a netmask. (for IPv4 only) |
| 297 // e.g. a |prefix_length| of 24 is converted to a netmask of "255.255.255.0". |
| 298 // Invalid prefix lengths will return the empty string. |
| 299 std::string CrosPrefixLengthToNetmask(int32 prefix_length); |
| 300 |
| 301 // Converts a |netmask| to a prefixlen. (for IPv4 only) |
| 302 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 |
| 303 int32 CrosNetmaskToPrefixLength(const std::string& netmask); |
| 304 |
296 } // namespace chromeos | 305 } // namespace chromeos |
297 | 306 |
298 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ | 307 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ |
OLD | NEW |