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 CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ | 5 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ |
6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ | 6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Start connect to network identified by |network_guid|. Populates |error| | 93 // Start connect to network identified by |network_guid|. Populates |error| |
94 // on failure. | 94 // on failure. |
95 virtual void StartConnect(const std::string& network_guid, | 95 virtual void StartConnect(const std::string& network_guid, |
96 std::string* error) = 0; | 96 std::string* error) = 0; |
97 | 97 |
98 // Start disconnect from network identified by |network_guid|. Populates | 98 // Start disconnect from network identified by |network_guid|. Populates |
99 // |error| on failure. | 99 // |error| on failure. |
100 virtual void StartDisconnect(const std::string& network_guid, | 100 virtual void StartDisconnect(const std::string& network_guid, |
101 std::string* error) = 0; | 101 std::string* error) = 0; |
102 | 102 |
| 103 // Get WiFi Key for network identified by |network_guid| from the |
| 104 // system (if it has one) and store it in |key_data|. User privilege elevation |
| 105 // may be required, and function will fail if user privileges are not |
| 106 // sufficient. Populates |error| on failure. |
| 107 virtual void GetKeyFromSystem(const std::string& network_guid, |
| 108 std::string* key_data, |
| 109 std::string* error) = 0; |
| 110 |
103 // Set observers to run when |NetworksChanged| and |NetworksListChanged| | 111 // Set observers to run when |NetworksChanged| and |NetworksListChanged| |
104 // events needs to be sent. Notifications are posted on |message_loop_proxy|. | 112 // events needs to be sent. Notifications are posted on |message_loop_proxy|. |
105 virtual void SetEventObservers( | 113 virtual void SetEventObservers( |
106 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, | 114 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, |
107 const NetworkGuidListCallback& networks_changed_observer, | 115 const NetworkGuidListCallback& networks_changed_observer, |
108 const NetworkGuidListCallback& network_list_changed_observer) = 0; | 116 const NetworkGuidListCallback& network_list_changed_observer) = 0; |
109 | 117 |
110 // Request update of Connected Network information. Send |NetworksChanged| | 118 // Request update of Connected Network information. Send |NetworksChanged| |
111 // event on completion. | 119 // event on completion. |
112 virtual void RequestConnectedNetworkUpdate() = 0; | 120 virtual void RequestConnectedNetworkUpdate() = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 166 |
159 typedef std::list<NetworkProperties> NetworkList; | 167 typedef std::list<NetworkProperties> NetworkList; |
160 | 168 |
161 private: | 169 private: |
162 DISALLOW_COPY_AND_ASSIGN(WiFiService); | 170 DISALLOW_COPY_AND_ASSIGN(WiFiService); |
163 }; | 171 }; |
164 | 172 |
165 } // namespace wifi | 173 } // namespace wifi |
166 | 174 |
167 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ | 175 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ |
OLD | NEW |