| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class CHROMEOS_EXPORT NetworkDeviceHandlerImpl | 24 class CHROMEOS_EXPORT NetworkDeviceHandlerImpl |
| 25 : public NetworkDeviceHandler, | 25 : public NetworkDeviceHandler, |
| 26 public NetworkStateHandlerObserver { | 26 public NetworkStateHandlerObserver { |
| 27 public: | 27 public: |
| 28 virtual ~NetworkDeviceHandlerImpl(); | 28 virtual ~NetworkDeviceHandlerImpl(); |
| 29 | 29 |
| 30 // NetworkDeviceHandler overrides | 30 // NetworkDeviceHandler overrides |
| 31 virtual void GetDeviceProperties( | 31 virtual void GetDeviceProperties( |
| 32 const std::string& device_path, | 32 const std::string& device_path, |
| 33 const network_handler::DictionaryResultCallback& callback, | 33 const network_handler::DictionaryResultCallback& callback, |
| 34 const network_handler::ErrorCallback& error_callback) const OVERRIDE; | 34 const network_handler::ErrorCallback& error_callback) const override; |
| 35 | 35 |
| 36 virtual void SetDeviceProperty( | 36 virtual void SetDeviceProperty( |
| 37 const std::string& device_path, | 37 const std::string& device_path, |
| 38 const std::string& property_name, | 38 const std::string& property_name, |
| 39 const base::Value& value, | 39 const base::Value& value, |
| 40 const base::Closure& callback, | 40 const base::Closure& callback, |
| 41 const network_handler::ErrorCallback& error_callback) OVERRIDE; | 41 const network_handler::ErrorCallback& error_callback) override; |
| 42 | 42 |
| 43 virtual void RequestRefreshIPConfigs( | 43 virtual void RequestRefreshIPConfigs( |
| 44 const std::string& device_path, | 44 const std::string& device_path, |
| 45 const base::Closure& callback, | 45 const base::Closure& callback, |
| 46 const network_handler::ErrorCallback& error_callback) OVERRIDE; | 46 const network_handler::ErrorCallback& error_callback) override; |
| 47 | 47 |
| 48 virtual void ProposeScan(const std::string& device_path, | 48 virtual void ProposeScan(const std::string& device_path, |
| 49 const base::Closure& callback, | 49 const base::Closure& callback, |
| 50 const network_handler::ErrorCallback& error_callback) | 50 const network_handler::ErrorCallback& error_callback) |
| 51 OVERRIDE; | 51 override; |
| 52 | 52 |
| 53 virtual void RegisterCellularNetwork( | 53 virtual void RegisterCellularNetwork( |
| 54 const std::string& device_path, | 54 const std::string& device_path, |
| 55 const std::string& network_id, | 55 const std::string& network_id, |
| 56 const base::Closure& callback, | 56 const base::Closure& callback, |
| 57 const network_handler::ErrorCallback& error_callback) OVERRIDE; | 57 const network_handler::ErrorCallback& error_callback) override; |
| 58 | 58 |
| 59 virtual void SetCarrier(const std::string& device_path, | 59 virtual void SetCarrier(const std::string& device_path, |
| 60 const std::string& carrier, | 60 const std::string& carrier, |
| 61 const base::Closure& callback, | 61 const base::Closure& callback, |
| 62 const network_handler::ErrorCallback& error_callback) | 62 const network_handler::ErrorCallback& error_callback) |
| 63 OVERRIDE; | 63 override; |
| 64 | 64 |
| 65 virtual void RequirePin(const std::string& device_path, | 65 virtual void RequirePin(const std::string& device_path, |
| 66 bool require_pin, | 66 bool require_pin, |
| 67 const std::string& pin, | 67 const std::string& pin, |
| 68 const base::Closure& callback, | 68 const base::Closure& callback, |
| 69 const network_handler::ErrorCallback& error_callback) | 69 const network_handler::ErrorCallback& error_callback) |
| 70 OVERRIDE; | 70 override; |
| 71 | 71 |
| 72 virtual void EnterPin(const std::string& device_path, | 72 virtual void EnterPin(const std::string& device_path, |
| 73 const std::string& pin, | 73 const std::string& pin, |
| 74 const base::Closure& callback, | 74 const base::Closure& callback, |
| 75 const network_handler::ErrorCallback& error_callback) | 75 const network_handler::ErrorCallback& error_callback) |
| 76 OVERRIDE; | 76 override; |
| 77 | 77 |
| 78 virtual void UnblockPin(const std::string& device_path, | 78 virtual void UnblockPin(const std::string& device_path, |
| 79 const std::string& puk, | 79 const std::string& puk, |
| 80 const std::string& new_pin, | 80 const std::string& new_pin, |
| 81 const base::Closure& callback, | 81 const base::Closure& callback, |
| 82 const network_handler::ErrorCallback& error_callback) | 82 const network_handler::ErrorCallback& error_callback) |
| 83 OVERRIDE; | 83 override; |
| 84 | 84 |
| 85 virtual void ChangePin(const std::string& device_path, | 85 virtual void ChangePin(const std::string& device_path, |
| 86 const std::string& old_pin, | 86 const std::string& old_pin, |
| 87 const std::string& new_pin, | 87 const std::string& new_pin, |
| 88 const base::Closure& callback, | 88 const base::Closure& callback, |
| 89 const network_handler::ErrorCallback& error_callback) | 89 const network_handler::ErrorCallback& error_callback) |
| 90 OVERRIDE; | 90 override; |
| 91 | 91 |
| 92 virtual void SetCellularAllowRoaming(bool allow_roaming) OVERRIDE; | 92 virtual void SetCellularAllowRoaming(bool allow_roaming) override; |
| 93 | 93 |
| 94 virtual void SetWifiTDLSEnabled( | 94 virtual void SetWifiTDLSEnabled( |
| 95 const std::string& ip_or_mac_address, | 95 const std::string& ip_or_mac_address, |
| 96 bool enabled, | 96 bool enabled, |
| 97 const network_handler::StringResultCallback& callback, | 97 const network_handler::StringResultCallback& callback, |
| 98 const network_handler::ErrorCallback& error_callback) OVERRIDE; | 98 const network_handler::ErrorCallback& error_callback) override; |
| 99 | 99 |
| 100 virtual void GetWifiTDLSStatus( | 100 virtual void GetWifiTDLSStatus( |
| 101 const std::string& ip_or_mac_address, | 101 const std::string& ip_or_mac_address, |
| 102 const network_handler::StringResultCallback& callback, | 102 const network_handler::StringResultCallback& callback, |
| 103 const network_handler::ErrorCallback& error_callback) OVERRIDE; | 103 const network_handler::ErrorCallback& error_callback) override; |
| 104 | 104 |
| 105 // NetworkStateHandlerObserver overrides | 105 // NetworkStateHandlerObserver overrides |
| 106 virtual void DeviceListChanged() OVERRIDE; | 106 virtual void DeviceListChanged() override; |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 friend class NetworkHandler; | 109 friend class NetworkHandler; |
| 110 friend class NetworkDeviceHandlerTest; | 110 friend class NetworkDeviceHandlerTest; |
| 111 | 111 |
| 112 NetworkDeviceHandlerImpl(); | 112 NetworkDeviceHandlerImpl(); |
| 113 | 113 |
| 114 void Init(NetworkStateHandler* network_state_handler); | 114 void Init(NetworkStateHandler* network_state_handler); |
| 115 | 115 |
| 116 // Apply the current value of |cellular_allow_roaming_| to all existing | 116 // Apply the current value of |cellular_allow_roaming_| to all existing |
| 117 // cellular devices of Shill. | 117 // cellular devices of Shill. |
| 118 void ApplyCellularAllowRoamingToShill(); | 118 void ApplyCellularAllowRoamingToShill(); |
| 119 | 119 |
| 120 NetworkStateHandler* network_state_handler_; | 120 NetworkStateHandler* network_state_handler_; |
| 121 bool cellular_allow_roaming_; | 121 bool cellular_allow_roaming_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl); | 123 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandlerImpl); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace chromeos | 126 } // namespace chromeos |
| 127 | 127 |
| 128 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ | 128 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_IMPL_H_ |
| OLD | NEW |