| 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_NETWORK_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 // once the transition is complete. | 1541 // once the transition is complete. |
| 1542 virtual void SetCarrier(const std::string& carrier, | 1542 virtual void SetCarrier(const std::string& carrier, |
| 1543 const NetworkOperationCallback& completed) = 0; | 1543 const NetworkOperationCallback& completed) = 0; |
| 1544 | 1544 |
| 1545 // Return true if GSM SIM card can work only with enabled roaming. | 1545 // Return true if GSM SIM card can work only with enabled roaming. |
| 1546 virtual bool IsCellularAlwaysInRoaming() = 0; | 1546 virtual bool IsCellularAlwaysInRoaming() = 0; |
| 1547 | 1547 |
| 1548 // Request a scan for new wifi networks. | 1548 // Request a scan for new wifi networks. |
| 1549 virtual void RequestNetworkScan() = 0; | 1549 virtual void RequestNetworkScan() = 0; |
| 1550 | 1550 |
| 1551 // Reads out the results of the last wifi scan. These results are not | |
| 1552 // pre-cached in the library, so the call may block whilst the results are | |
| 1553 // read over IPC. | |
| 1554 // Returns false if an error occurred in reading the results. Note that | |
| 1555 // a true return code only indicates the result set was successfully read, | |
| 1556 // it does not imply a scan has successfully completed yet. | |
| 1557 virtual bool GetWifiAccessPoints(WifiAccessPointVector* result) = 0; | |
| 1558 | |
| 1559 // TODO(joth): Add GetCellTowers to retrieve a CellTowerVector. | 1551 // TODO(joth): Add GetCellTowers to retrieve a CellTowerVector. |
| 1560 | 1552 |
| 1561 // Return true if a profile matching |type| is loaded. | 1553 // Return true if a profile matching |type| is loaded. |
| 1562 virtual bool HasProfileType(NetworkProfileType type) const = 0; | 1554 virtual bool HasProfileType(NetworkProfileType type) const = 0; |
| 1563 | 1555 |
| 1564 // Returns false if there is no way to connect to this network, even with | 1556 // Returns false if there is no way to connect to this network, even with |
| 1565 // user input (e.g. it requires a user profile but none is available). | 1557 // user input (e.g. it requires a user profile but none is available). |
| 1566 virtual bool CanConnectToNetwork(const Network* network) const = 0; | 1558 virtual bool CanConnectToNetwork(const Network* network) const = 0; |
| 1567 | 1559 |
| 1568 // Refresh the IP configuration of the given network after changes. Puts | 1560 // Refresh the IP configuration of the given network after changes. Puts |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1714 const std::string& service_path) = 0; | 1706 const std::string& service_path) = 0; |
| 1715 | 1707 |
| 1716 // Factory function, creates a new instance and returns ownership. | 1708 // Factory function, creates a new instance and returns ownership. |
| 1717 // For normal usage, access the singleton via CrosLibrary::Get(). | 1709 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1718 static NetworkLibrary* GetImpl(bool stub); | 1710 static NetworkLibrary* GetImpl(bool stub); |
| 1719 }; | 1711 }; |
| 1720 | 1712 |
| 1721 } // namespace chromeos | 1713 } // namespace chromeos |
| 1722 | 1714 |
| 1723 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1715 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |