Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: chrome/browser/chromeos/cros/cros_network_functions.h

Issue 11367048: This is the first pass at making GetIPConfigs asynchronous. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_network_functions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_
7 7
8 // This header is introduced to make it easy to switch from chromeos_network.cc 8 // This header is introduced to make it easy to switch from chromeos_network.cc
9 // to Chrome's own DBus code. crosbug.com/16557 9 // to Chrome's own DBus code. crosbug.com/16557
10 // All calls to functions in chromeos_network.h should be made through 10 // All calls to functions in chromeos_network.h should be made through
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // automatic registration mode before initiating registration. 256 // automatic registration mode before initiating registration.
257 void CrosRequestCellularRegister(const std::string& device_path, 257 void CrosRequestCellularRegister(const std::string& device_path,
258 const std::string& network_id, 258 const std::string& network_id,
259 const NetworkOperationCallback& callback); 259 const NetworkOperationCallback& callback);
260 260
261 // Enables or disables the specific network device for connection. 261 // Enables or disables the specific network device for connection.
262 // Set offline mode. This will turn off all radios. 262 // Set offline mode. This will turn off all radios.
263 // Returns false on failure and true on success. 263 // Returns false on failure and true on success.
264 bool CrosSetOfflineMode(bool offline); 264 bool CrosSetOfflineMode(bool offline);
265 265
266 // Gets a list of all the NetworkIPConfigs using a given device path,
267 // and returns the information via callback.
268 void CrosListIPConfigs(const std::string& device_path,
269 const NetworkGetIPConfigsCallback& callback);
270
271 // DEPRECATED, DO NOT USE: Use the asynchronous CrosListIPConfigs, above,
272 // instead.
266 // Gets a list of all the NetworkIPConfigs using a given device path. 273 // Gets a list of all the NetworkIPConfigs using a given device path.
267 // Optionally, you can get ipconfig-paths and the hardware address. 274 // Optionally, you can get ipconfig-paths and the hardware address. Pass NULL as
268 // Pass NULL as |ipconfig_paths| and |hardware_address| if you are not 275 // |ipconfig_paths| and |hardware_address| if you are not interested in these
269 // interested in these values. 276 // values.
270 bool CrosListIPConfigs(const std::string& device_path, 277 bool CrosListIPConfigsAndBlock(const std::string& device_path,
271 NetworkIPConfigVector* ipconfig_vector, 278 NetworkIPConfigVector* ipconfig_vector,
272 std::vector<std::string>* ipconfig_paths, 279 std::vector<std::string>* ipconfig_paths,
273 std::string* hardware_address); 280 std::string* hardware_address);
274 281
275 // Adds a IPConfig of the given type to the device 282 // Adds a IPConfig of the given type to the device
276 bool CrosAddIPConfig(const std::string& device_path, IPConfigType type); 283 bool CrosAddIPConfig(const std::string& device_path, IPConfigType type);
277 284
278 // Removes an existing IP Config 285 // Removes an existing IP Config
279 bool CrosRemoveIPConfig(const std::string& ipconfig_path); 286 bool CrosRemoveIPConfig(const std::string& ipconfig_path);
280 287
281 // Refreshes the IP config |ipconfig_path| to pick up changes in 288 // Refreshes the IP config |ipconfig_path| to pick up changes in
282 // configuration, and renew the DHCP lease, if any. 289 // configuration, and renew the DHCP lease, if any.
283 void CrosRequestIPConfigRefresh(const std::string& ipconfig_path); 290 void CrosRequestIPConfigRefresh(const std::string& ipconfig_path);
(...skipping 19 matching lines...) Expand all
303 int32 CrosNetmaskToPrefixLength(const std::string& netmask); 310 int32 CrosNetmaskToPrefixLength(const std::string& netmask);
304 311
305 // Changes the active cellular carrier. 312 // Changes the active cellular carrier.
306 void CrosSetCarrier(const std::string& device_path, 313 void CrosSetCarrier(const std::string& device_path,
307 const std::string& carrier, 314 const std::string& carrier,
308 const NetworkOperationCallback& callback); 315 const NetworkOperationCallback& callback);
309 316
310 } // namespace chromeos 317 } // namespace chromeos
311 318
312 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_ 319 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_NETWORK_FUNCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_network_functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698