| 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_CONNECT_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_CONNECT_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static void Shutdown(); | 73 static void Shutdown(); |
| 74 | 74 |
| 75 // Returns the global NetworkConnect object if initialized or NULL. | 75 // Returns the global NetworkConnect object if initialized or NULL. |
| 76 static NetworkConnect* Get(); | 76 static NetworkConnect* Get(); |
| 77 | 77 |
| 78 virtual ~NetworkConnect(); | 78 virtual ~NetworkConnect(); |
| 79 | 79 |
| 80 // Requests a network connection and handles any errors and notifications. | 80 // Requests a network connection and handles any errors and notifications. |
| 81 virtual void ConnectToNetworkId(const std::string& network_id) = 0; | 81 virtual void ConnectToNetworkId(const std::string& network_id) = 0; |
| 82 | 82 |
| 83 // Requests a network disconnection. Ignores any errors and notifications. |
| 84 virtual void DisconnectFromNetworkId(const std::string& network_id) = 0; |
| 85 |
| 83 // Maybe show the configuration UI after a connect failure based on the | 86 // Maybe show the configuration UI after a connect failure based on the |
| 84 // network state and error name. Returns true if the UI is shown. | 87 // network state and error name. Returns true if the UI is shown. |
| 85 virtual bool MaybeShowConfigureUI(const std::string& network_id, | 88 virtual bool MaybeShowConfigureUI(const std::string& network_id, |
| 86 const std::string& connect_error) = 0; | 89 const std::string& connect_error) = 0; |
| 87 | 90 |
| 88 // Enables or disables a network technology. If |technology| refers to | 91 // Enables or disables a network technology. If |technology| refers to |
| 89 // cellular and the device cannot be enabled due to a SIM lock, this function | 92 // cellular and the device cannot be enabled due to a SIM lock, this function |
| 90 // will launch the SIM unlock dialog. | 93 // will launch the SIM unlock dialog. |
| 91 virtual void SetTechnologyEnabled( | 94 virtual void SetTechnologyEnabled( |
| 92 const chromeos::NetworkTypePattern& technology, | 95 const chromeos::NetworkTypePattern& technology, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 protected: | 127 protected: |
| 125 NetworkConnect(); | 128 NetworkConnect(); |
| 126 | 129 |
| 127 private: | 130 private: |
| 128 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); | 131 DISALLOW_COPY_AND_ASSIGN(NetworkConnect); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace chromeos | 134 } // namespace chromeos |
| 132 | 135 |
| 133 #endif // CHROMEOS_NETWORK_NETWORK_CONNECT_H_ | 136 #endif // CHROMEOS_NETWORK_NETWORK_CONNECT_H_ |
| OLD | NEW |