| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // |service_path|. A network can be initially configured by calling | 81 // |service_path|. A network can be initially configured by calling |
| 82 // CreateConfiguration or if it is managed by a policy. The given properties | 82 // CreateConfiguration or if it is managed by a policy. The given properties |
| 83 // will be merged with the existing settings, and it won't clear any existing | 83 // will be merged with the existing settings, and it won't clear any existing |
| 84 // properties. | 84 // properties. |
| 85 void SetProperties( | 85 void SetProperties( |
| 86 const std::string& service_path, | 86 const std::string& service_path, |
| 87 const base::DictionaryValue& user_settings, | 87 const base::DictionaryValue& user_settings, |
| 88 const base::Closure& callback, | 88 const base::Closure& callback, |
| 89 const network_handler::ErrorCallback& error_callback) const; | 89 const network_handler::ErrorCallback& error_callback) const; |
| 90 | 90 |
| 91 // Initiates a connection with network that has |service_path|. |callback| is | |
| 92 // called if the connection request was successfully handled. That doesn't | |
| 93 // mean that the connection was successfully established. | |
| 94 void Connect(const std::string& service_path, | |
| 95 const base::Closure& callback, | |
| 96 const network_handler::ErrorCallback& error_callback) const; | |
| 97 | |
| 98 // Initiates a disconnect with the network at |service_path|. |callback| is | |
| 99 // called if the diconnect request was successfully handled. That doesn't mean | |
| 100 // that the network is already diconnected. | |
| 101 void Disconnect(const std::string& service_path, | |
| 102 const base::Closure& callback, | |
| 103 const network_handler::ErrorCallback& error_callback) const; | |
| 104 | |
| 105 // Initially configures an unconfigured network with the given user settings | 91 // Initially configures an unconfigured network with the given user settings |
| 106 // and returns the new identifier to |callback| if successful. Fails if the | 92 // and returns the new identifier to |callback| if successful. Fails if the |
| 107 // network was already configured by a call to this function or because of a | 93 // network was already configured by a call to this function or because of a |
| 108 // policy. | 94 // policy. |
| 109 void CreateConfiguration( | 95 void CreateConfiguration( |
| 110 const base::DictionaryValue& properties, | 96 const base::DictionaryValue& properties, |
| 111 const network_handler::StringResultCallback& callback, | 97 const network_handler::StringResultCallback& callback, |
| 112 const network_handler::ErrorCallback& error_callback) const; | 98 const network_handler::ErrorCallback& error_callback) const; |
| 113 | 99 |
| 114 // Removes the user's configuration from the network with |service_path|. The | 100 // Removes the user's configuration from the network with |service_path|. The |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 137 |
| 152 // For Shill client callbacks | 138 // For Shill client callbacks |
| 153 base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_; | 139 base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_; |
| 154 | 140 |
| 155 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandler); | 141 DISALLOW_COPY_AND_ASSIGN(ManagedNetworkConfigurationHandler); |
| 156 }; | 142 }; |
| 157 | 143 |
| 158 } // namespace chromeos | 144 } // namespace chromeos |
| 159 | 145 |
| 160 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 146 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
| OLD | NEW |