OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 // Called when the state of a single network has changed, | 1264 // Called when the state of a single network has changed, |
1265 // for example signal strength or connection state. | 1265 // for example signal strength or connection state. |
1266 virtual void OnNetworkChanged(NetworkLibrary* cros, | 1266 virtual void OnNetworkChanged(NetworkLibrary* cros, |
1267 const Network* network) = 0; | 1267 const Network* network) = 0; |
1268 protected: | 1268 protected: |
1269 ~NetworkObserver() {} | 1269 ~NetworkObserver() {} |
1270 }; | 1270 }; |
1271 | 1271 |
1272 class NetworkDeviceObserver { | 1272 class NetworkDeviceObserver { |
1273 public: | 1273 public: |
1274 // Called when the state of a single device has changed, | 1274 // Called when the state of a single device has changed. |
1275 // for example SIMLock state for cellular. | |
1276 virtual void OnNetworkDeviceChanged(NetworkLibrary* cros, | 1275 virtual void OnNetworkDeviceChanged(NetworkLibrary* cros, |
1277 const NetworkDevice* device) {} | 1276 const NetworkDevice* device) {} |
1278 | 1277 |
1279 // Called when |device| got notification about new networks available. | 1278 // Called when |device| got notification about new networks available. |
1280 virtual void OnNetworkDeviceFoundNetworks(NetworkLibrary* cros, | 1279 virtual void OnNetworkDeviceFoundNetworks(NetworkLibrary* cros, |
1281 const NetworkDevice* device) {} | 1280 const NetworkDevice* device) {} |
| 1281 |
| 1282 // Called when |device| got notification about SIM lock change. |
| 1283 virtual void OnNetworkDeviceSimLockChanged(NetworkLibrary* cros, |
| 1284 const NetworkDevice* device) {} |
1282 protected: | 1285 protected: |
1283 ~NetworkDeviceObserver() {} | 1286 ~NetworkDeviceObserver() {} |
1284 }; | 1287 }; |
1285 | 1288 |
1286 class CellularDataPlanObserver { | 1289 class CellularDataPlanObserver { |
1287 public: | 1290 public: |
1288 // Called when the cellular data plan has changed. | 1291 // Called when the cellular data plan has changed. |
1289 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj) = 0; | 1292 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj) = 0; |
1290 protected: | 1293 protected: |
1291 ~CellularDataPlanObserver() {} | 1294 ~CellularDataPlanObserver() {} |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 virtual void SwitchToPreferredNetwork() = 0; | 1630 virtual void SwitchToPreferredNetwork() = 0; |
1628 | 1631 |
1629 // Factory function, creates a new instance and returns ownership. | 1632 // Factory function, creates a new instance and returns ownership. |
1630 // For normal usage, access the singleton via CrosLibrary::Get(). | 1633 // For normal usage, access the singleton via CrosLibrary::Get(). |
1631 static NetworkLibrary* GetImpl(bool stub); | 1634 static NetworkLibrary* GetImpl(bool stub); |
1632 }; | 1635 }; |
1633 | 1636 |
1634 } // namespace chromeos | 1637 } // namespace chromeos |
1635 | 1638 |
1636 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1639 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
OLD | NEW |