summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/shill_manager_client.h
diff options
context:
space:
mode:
authorsemenzato <semenzato@chromium.org>2014-09-15 17:05:26 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-16 00:11:43 +0000
commit88a95a70fa94bb578b371490d0f9868584b7096e (patch)
tree7111c31fc148d5647336adf512862c2920565232 /chromeos/dbus/shill_manager_client.h
parent1afc65175c84ddf6087f65da818bbdbba6d28101 (diff)
downloadchromium_src-88a95a70fa94bb578b371490d0f9868584b7096e.zip
chromium_src-88a95a70fa94bb578b371490d0f9868584b7096e.tar.gz
chromium_src-88a95a70fa94bb578b371490d0f9868584b7096e.tar.bz2
GCM: D-Bus methods for wake-on-packet
Program the NIC to wake-on-packet for packets arriving from the GCM server. Chrome notifies the connection manager (shill) by calling D-Bus methods. The return status indicates if the operation succeeded or not (depending on hardware support and the type of connection). Keywords: wowlan, wake-on-lan, wake-on-wlan BUG=360295 TEST=verified dbus methods are called, and packets are sent on the TEST=connection passed to the methods. Also verified that shill TEST=programs the NIC correctly, and packets wake up the device. Review URL: https://codereview.chromium.org/409883006 Cr-Commit-Position: refs/heads/master@{#294936}
Diffstat (limited to 'chromeos/dbus/shill_manager_client.h')
-rw-r--r--chromeos/dbus/shill_manager_client.h42
1 files changed, 31 insertions, 11 deletions
diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h
index 9b9541d..8bc7251 100644
--- a/chromeos/dbus/shill_manager_client.h
+++ b/chromeos/dbus/shill_manager_client.h
@@ -14,10 +14,12 @@
#include "chromeos/dbus/shill_client_helper.h"
namespace dbus {
-
class ObjectPath;
+}
-} // namespace dbus
+namespace net {
+class IPEndPoint;
+}
namespace chromeos {
@@ -193,35 +195,53 @@ class CHROMEOS_EXPORT ShillManagerClient : public DBusClient {
const ObjectPathCallback& callback,
const ErrorCallback& error_callback) = 0;
- // Verify that the given data corresponds to a trusted device, and return true
- // to the callback if it is.
+ // Verifies that the given data corresponds to a trusted device, and returns
+ // true to the callback if it is.
virtual void VerifyDestination(const VerificationProperties& properties,
const BooleanCallback& callback,
const ErrorCallback& error_callback) = 0;
- // Verify that the given data corresponds to a trusted device, and if it is,
- // return the encrypted credentials for connecting to the network represented
+ // Verifies that the given data corresponds to a trusted device, and if it is,
+ // returns the encrypted credentials for connecting to the network represented
// by the given |service_path|, encrypted using the |public_key| for the
- // trusted device. If the device is not trusted, return the empty string.
+ // trusted device. If the device is not trusted, returns the empty string.
virtual void VerifyAndEncryptCredentials(
const VerificationProperties& properties,
const std::string& service_path,
const StringCallback& callback,
const ErrorCallback& error_callback) = 0;
- // Verify that the given data corresponds to a trusted device, and return the
- // |data| encrypted using the |public_key| for the trusted device. If the
- // device is not trusted, return the empty string.
+ // Verifies that the given data corresponds to a trusted device, and returns
+ // the |data| encrypted using the |public_key| for the trusted device. If the
+ // device is not trusted, returns the empty string.
virtual void VerifyAndEncryptData(const VerificationProperties& properties,
const std::string& data,
const StringCallback& callback,
const ErrorCallback& error_callback) = 0;
- // For each technology present, connect to the "best" service available.
+ // For each technology present, connects to the "best" service available.
// Called once the user is logged in and certificates are loaded.
virtual void ConnectToBestServices(const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
+ // Requests that shill program the NIC so that packets incoming on
+ // |ip_connection| wake up the CPU.
+ virtual void AddWakeOnPacketConnection(
+ const net::IPEndPoint& ip_endpoint,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Removes a request to wake up on packets coming on |ip_connection|.
+ virtual void RemoveWakeOnPacketConnection(
+ const net::IPEndPoint& ip_endpoint,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
+ // Clears all requests to wake up on packets.
+ virtual void RemoveAllWakeOnPacketConnections(
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Returns an interface for testing (stub only), or returns NULL.
virtual TestInterface* GetTestInterface() = 0;