| 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 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 // once the transition is complete. | 1551 // once the transition is complete. |
| 1552 virtual void SetCarrier(const std::string& carrier, | 1552 virtual void SetCarrier(const std::string& carrier, |
| 1553 const NetworkOperationCallback& completed) = 0; | 1553 const NetworkOperationCallback& completed) = 0; |
| 1554 | 1554 |
| 1555 // Return true if GSM SIM card can work only with enabled roaming. | 1555 // Return true if GSM SIM card can work only with enabled roaming. |
| 1556 virtual bool IsCellularAlwaysInRoaming() = 0; | 1556 virtual bool IsCellularAlwaysInRoaming() = 0; |
| 1557 | 1557 |
| 1558 // Request a scan for new wifi networks. | 1558 // Request a scan for new wifi networks. |
| 1559 virtual void RequestNetworkScan() = 0; | 1559 virtual void RequestNetworkScan() = 0; |
| 1560 | 1560 |
| 1561 // Reads out the results of the last wifi scan. These results are not | |
| 1562 // pre-cached in the library, so the call may block whilst the results are | |
| 1563 // read over IPC. | |
| 1564 // Returns false if an error occurred in reading the results. Note that | |
| 1565 // a true return code only indicates the result set was successfully read, | |
| 1566 // it does not imply a scan has successfully completed yet. | |
| 1567 virtual bool GetWifiAccessPoints(WifiAccessPointVector* result) = 0; | |
| 1568 | |
| 1569 // TODO(joth): Add GetCellTowers to retrieve a CellTowerVector. | 1561 // TODO(joth): Add GetCellTowers to retrieve a CellTowerVector. |
| 1570 | 1562 |
| 1571 // Return true if a profile matching |type| is loaded. | 1563 // Return true if a profile matching |type| is loaded. |
| 1572 virtual bool HasProfileType(NetworkProfileType type) const = 0; | 1564 virtual bool HasProfileType(NetworkProfileType type) const = 0; |
| 1573 | 1565 |
| 1574 // Returns false if there is no way to connect to this network, even with | 1566 // Returns false if there is no way to connect to this network, even with |
| 1575 // user input (e.g. it requires a user profile but none is available). | 1567 // user input (e.g. it requires a user profile but none is available). |
| 1576 virtual bool CanConnectToNetwork(const Network* network) const = 0; | 1568 virtual bool CanConnectToNetwork(const Network* network) const = 0; |
| 1577 | 1569 |
| 1578 // Refresh the IP configuration of the given network after changes. Puts | 1570 // Refresh the IP configuration of the given network after changes. Puts |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 const std::string& service_path) = 0; | 1716 const std::string& service_path) = 0; |
| 1725 | 1717 |
| 1726 // Factory function, creates a new instance and returns ownership. | 1718 // Factory function, creates a new instance and returns ownership. |
| 1727 // For normal usage, access the singleton via CrosLibrary::Get(). | 1719 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1728 static NetworkLibrary* GetImpl(bool stub); | 1720 static NetworkLibrary* GetImpl(bool stub); |
| 1729 }; | 1721 }; |
| 1730 | 1722 |
| 1731 } // namespace chromeos | 1723 } // namespace chromeos |
| 1732 | 1724 |
| 1733 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1725 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |