OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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_H_ | 5 #ifndef CHROMEOS_NETWORK_H_ |
6 #define CHROMEOS_NETWORK_H_ | 6 #define CHROMEOS_NETWORK_H_ |
7 | 7 |
8 #include <base/basictypes.h> | 8 #include <base/basictypes.h> |
9 | 9 |
10 namespace chromeos { // NOLINT | 10 namespace chromeos { // NOLINT |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // | 142 // |
143 // returns false on failure and true on success. | 143 // returns false on failure and true on success. |
144 // | 144 // |
145 // Note, a successful call to this function only indicates that the | 145 // Note, a successful call to this function only indicates that the |
146 // connection process has started. You will have to query the connection state | 146 // connection process has started. You will have to query the connection state |
147 // to determine if the connection was established successfully. | 147 // to determine if the connection was established successfully. |
148 extern bool (*ConnectToNetworkWithCertInfo)(const char* service_path, | 148 extern bool (*ConnectToNetworkWithCertInfo)(const char* service_path, |
149 const char* passphrase, | 149 const char* passphrase, |
150 const char* identity, | 150 const char* identity, |
151 const char* certpath); | 151 const char* certpath); |
| 152 |
152 // Connects to the network with the |service_path|. | 153 // Connects to the network with the |service_path|. |
153 // | 154 // |
154 // Set |passphrase| to NULL if the network doesn't require authentication. | 155 // Set |passphrase| to NULL if the network doesn't require authentication. |
155 // returns false on failure and true on success. | 156 // returns false on failure and true on success. |
156 // | 157 // |
157 // Note, a successful call to this function only indicates that the | 158 // Note, a successful call to this function only indicates that the |
158 // connection process has started. You will have to query the connection state | 159 // connection process has started. You will have to query the connection state |
159 // to determine if the connection was established successfully. | 160 // to determine if the connection was established successfully. |
160 extern bool (*ConnectToNetwork)(const char* service_path, | 161 extern bool (*ConnectToNetwork)(const char* service_path, |
161 const char* passphrase); | 162 const char* passphrase); |
162 | 163 |
| 164 // Disconnects from the network with the |service_path|. |
| 165 extern bool (*DisconnectFromNetwork)(const char* service_path); |
| 166 |
163 // This will delete this service from the list of remembered service. | 167 // This will delete this service from the list of remembered service. |
164 // | 168 // |
165 // Returns false on failure and true on success. | 169 // Returns false on failure and true on success. |
166 extern bool (*DeleteRememberedService)(const char* service_path); | 170 extern bool (*DeleteRememberedService)(const char* service_path); |
167 | 171 |
168 // Deletes a SystemInfo type that was allocated in the ChromeOS dll. We need | 172 // Deletes a SystemInfo type that was allocated in the ChromeOS dll. We need |
169 // to do this to safely pass data over the dll boundary between our .so and | 173 // to do this to safely pass data over the dll boundary between our .so and |
170 // Chrome. | 174 // Chrome. |
171 extern void (*FreeSystemInfo)(SystemInfo* system); | 175 extern void (*FreeSystemInfo)(SystemInfo* system); |
172 | 176 |
(...skipping 29 matching lines...) Expand all Loading... |
202 // Set offline mode. This will turn off all radios. | 206 // Set offline mode. This will turn off all radios. |
203 // | 207 // |
204 // Returns false on failure and true on success. | 208 // Returns false on failure and true on success. |
205 extern bool (*SetOfflineMode)(bool offline); | 209 extern bool (*SetOfflineMode)(bool offline); |
206 | 210 |
207 // Set auto_connect for service. | 211 // Set auto_connect for service. |
208 // | 212 // |
209 // Returns true on success. | 213 // Returns true on success. |
210 extern bool (*SetAutoConnect)(const char* service_path, bool auto_connect); | 214 extern bool (*SetAutoConnect)(const char* service_path, bool auto_connect); |
211 | 215 |
| 216 // Set passphrase for service. |
| 217 // |
| 218 // Returns true on success. |
| 219 extern bool (*SetPassphrase)(const char* service_path, const char* passphrase); |
| 220 |
212 // Gets a list of all the IPConfigs using a given device path | 221 // Gets a list of all the IPConfigs using a given device path |
213 extern IPConfigStatus* (*ListIPConfigs)(const char* device_path); | 222 extern IPConfigStatus* (*ListIPConfigs)(const char* device_path); |
214 | 223 |
215 // Add a IPConfig of the given type to the device | 224 // Add a IPConfig of the given type to the device |
216 extern bool (*AddIPConfig)(const char* device_path, IPConfigType type); | 225 extern bool (*AddIPConfig)(const char* device_path, IPConfigType type); |
217 | 226 |
218 // Save the IP config data | 227 // Save the IP config data |
219 extern bool (*SaveIPConfig)(IPConfig* config); | 228 extern bool (*SaveIPConfig)(IPConfig* config); |
220 | 229 |
221 // Remove an existing IP Config | 230 // Remove an existing IP Config |
222 extern bool (*RemoveIPConfig)(IPConfig* config); | 231 extern bool (*RemoveIPConfig)(IPConfig* config); |
223 | 232 |
224 // Free a found IPConfig | 233 // Free a found IPConfig |
225 extern void (*FreeIPConfig)(IPConfig* config); | 234 extern void (*FreeIPConfig)(IPConfig* config); |
226 | 235 |
227 // Free out a full status | 236 // Free out a full status |
228 extern void (*FreeIPConfigStatus)(IPConfigStatus* status); | 237 extern void (*FreeIPConfigStatus)(IPConfigStatus* status); |
229 | 238 |
230 } // namespace chromeos | 239 } // namespace chromeos |
231 | 240 |
232 #endif // CHROMEOS_NETWORK_H_ | 241 #endif // CHROMEOS_NETWORK_H_ |
OLD | NEW |