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 CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // registered or if the network is registered and its HasConnectedToHost value | 233 // registered or if the network is registered and its HasConnectedToHost value |
234 // was already true, this function does nothing. Returns whether the value was | 234 // was already true, this function does nothing. Returns whether the value was |
235 // actually changed. | 235 // actually changed. |
236 bool SetTetherNetworkHasConnectedToHost(const std::string& guid); | 236 bool SetTetherNetworkHasConnectedToHost(const std::string& guid); |
237 | 237 |
238 // Remove a Tether NetworkState, using the same |guid| passed to | 238 // Remove a Tether NetworkState, using the same |guid| passed to |
239 // AddTetherNetworkState(). If no network with GUID |guid| is registered, this | 239 // AddTetherNetworkState(). If no network with GUID |guid| is registered, this |
240 // function does nothing. Returns whether the network was actually removed. | 240 // function does nothing. Returns whether the network was actually removed. |
241 bool RemoveTetherNetworkState(const std::string& guid); | 241 bool RemoveTetherNetworkState(const std::string& guid); |
242 | 242 |
| 243 // Disassociates the Tether network specified by |tether_network_guid| from |
| 244 // its associated Wi-Fi network. Returns whether the networkd were |
| 245 // successfully disassociated. |
| 246 bool DisassociateTetherNetworkStateFromWifiNetwork( |
| 247 const std::string& tether_network_guid); |
| 248 |
243 // Inform NetworkStateHandler that the provided Tether network with the | 249 // Inform NetworkStateHandler that the provided Tether network with the |
244 // provided guid |tether_network_guid| is associated with the Wi-Fi network | 250 // provided guid |tether_network_guid| is associated with the Wi-Fi network |
245 // with the provided guid |wifi_network_guid|. This Wi-Fi network can now be | 251 // with the provided guid |wifi_network_guid|. This Wi-Fi network can now be |
246 // hidden in the UI, and the Tether network will act as its proxy. Returns | 252 // hidden in the UI, and the Tether network will act as its proxy. Returns |
247 // false if the association failed (e.g., one or both networks don't exist). | 253 // false if the association failed (e.g., one or both networks don't exist). |
248 bool AssociateTetherNetworkStateWithWifiNetwork( | 254 bool AssociateTetherNetworkStateWithWifiNetwork( |
249 const std::string& tether_network_guid, | 255 const std::string& tether_network_guid, |
250 const std::string& wifi_network_guid); | 256 const std::string& wifi_network_guid); |
251 | 257 |
252 // Set the connection_state of the Tether NetworkState corresponding to the | 258 // Set the connection_state of the Tether NetworkState corresponding to the |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 524 |
519 // Ensure that Shutdown() gets called exactly once. | 525 // Ensure that Shutdown() gets called exactly once. |
520 bool did_shutdown_ = false; | 526 bool did_shutdown_ = false; |
521 | 527 |
522 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); | 528 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
523 }; | 529 }; |
524 | 530 |
525 } // namespace chromeos | 531 } // namespace chromeos |
526 | 532 |
527 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ | 533 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ |
OLD | NEW |