| 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 CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
| 12 #include "chromeos/network/network_handler_callbacks.h" | 12 #include "chromeos/network/network_handler_callbacks.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class Value; | 15 class Value; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace net { |
| 19 class IPEndPoint; |
| 20 } |
| 21 |
| 18 namespace chromeos { | 22 namespace chromeos { |
| 19 | 23 |
| 20 // The NetworkDeviceHandler class allows making device specific requests on a | 24 // The NetworkDeviceHandler class allows making device specific requests on a |
| 21 // ChromeOS network device. All calls are asynchronous and interact with the | 25 // ChromeOS network device. All calls are asynchronous and interact with the |
| 22 // Shill device API. No calls will block on DBus calls. | 26 // Shill device API. No calls will block on DBus calls. |
| 23 // | 27 // |
| 24 // This is owned and its lifetime managed by the Chrome startup code. It's | 28 // This is owned and its lifetime managed by the Chrome startup code. It's |
| 25 // basically a singleton, but with explicit lifetime management. | 29 // basically a singleton, but with explicit lifetime management. |
| 26 // | 30 // |
| 27 // Note on callbacks: Because all the functions here are meant to be | 31 // Note on callbacks: Because all the functions here are meant to be |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 const network_handler::StringResultCallback& callback, | 206 const network_handler::StringResultCallback& callback, |
| 203 const network_handler::ErrorCallback& error_callback) = 0; | 207 const network_handler::ErrorCallback& error_callback) = 0; |
| 204 | 208 |
| 205 // Returns the TDLS status for the specified IP or MAC address for | 209 // Returns the TDLS status for the specified IP or MAC address for |
| 206 // the active wifi device. | 210 // the active wifi device. |
| 207 virtual void GetWifiTDLSStatus( | 211 virtual void GetWifiTDLSStatus( |
| 208 const std::string& ip_or_mac_address, | 212 const std::string& ip_or_mac_address, |
| 209 const network_handler::StringResultCallback& callback, | 213 const network_handler::StringResultCallback& callback, |
| 210 const network_handler::ErrorCallback& error_callback) = 0; | 214 const network_handler::ErrorCallback& error_callback) = 0; |
| 211 | 215 |
| 216 // Adds |ip_endpoint| to the list of tcp connections that the wifi device |
| 217 // should monitor to wake the system from suspend. |
| 218 virtual void AddWifiWakeOnPacketConnection( |
| 219 const net::IPEndPoint& ip_endpoint, |
| 220 const base::Closure& callback, |
| 221 const network_handler::ErrorCallback& error_callback) = 0; |
| 222 |
| 223 // Removes |ip_endpoint| from the list of tcp connections that the wifi device |
| 224 // should monitor to wake the system from suspend. |
| 225 virtual void RemoveWifiWakeOnPacketConnection( |
| 226 const net::IPEndPoint& ip_endpoint, |
| 227 const base::Closure& callback, |
| 228 const network_handler::ErrorCallback& error_callback) = 0; |
| 229 |
| 230 // Clears the list of tcp connections that the wifi device should monitor to |
| 231 // wake the system from suspend. |
| 232 virtual void RemoveAllWifiWakeOnPacketConnections( |
| 233 const base::Closure& callback, |
| 234 const network_handler::ErrorCallback& error_callback) = 0; |
| 235 |
| 212 private: | 236 private: |
| 213 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandler); | 237 DISALLOW_COPY_AND_ASSIGN(NetworkDeviceHandler); |
| 214 }; | 238 }; |
| 215 | 239 |
| 216 } // namespace chromeos | 240 } // namespace chromeos |
| 217 | 241 |
| 218 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ | 242 #endif // CHROMEOS_NETWORK_NETWORK_DEVICE_HANDLER_H_ |
| OLD | NEW |