Chromium Code Reviews| Index: chromeos/dbus/shill_manager_client.cc |
| diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc |
| index 0ad602f22bbb52656ea07c47ee1b11451972b10f..f03ee38f38c406c80433c45c04e9a6286c78309f 100644 |
| --- a/chromeos/dbus/shill_manager_client.cc |
| +++ b/chromeos/dbus/shill_manager_client.cc |
| @@ -14,6 +14,7 @@ |
| #include "dbus/object_path.h" |
| #include "dbus/object_proxy.h" |
| #include "dbus/values_util.h" |
| +#include "net/base/ip_endpoint.h" |
| #include "third_party/cros_system_api/dbus/service_constants.h" |
| namespace chromeos { |
| @@ -210,6 +211,51 @@ class ShillManagerClientImpl : public ShillManagerClient { |
| error_callback); |
| } |
| + virtual void AddWakeOnPacketConnection( |
| + const net::IPEndPoint& ip_endpoint, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) OVERRIDE { |
| + if (ip_endpoint.address().size() == 0) { |
|
Daniel Erat
2014/09/24 17:22:57
nit: ip_endpoint.address().empty()
|
| + LOG(ERROR) << "AddWakeOnPacketConnection: null address"; |
| + return; |
| + } |
| + dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
| + shill::kAddWakeOnPacketConnectionFunction); |
| + dbus::MessageWriter writer(&method_call); |
| + writer.AppendString(net::IPAddressToString(ip_endpoint.address())); |
| + helper_->CallVoidMethodWithErrorCallback(&method_call, |
| + callback, |
| + error_callback); |
| + } |
| + |
| + virtual void RemoveWakeOnPacketConnection( |
| + const net::IPEndPoint& ip_endpoint, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) OVERRIDE { |
| + if (ip_endpoint.address().size() == 0) { |
|
Daniel Erat
2014/09/24 17:22:57
nit: ip_endpoint.address().empty()
|
| + LOG(ERROR) << "RemoveWakeOnPacketConnection: null address"; |
| + return; |
| + } |
| + dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
| + shill::kRemoveWakeOnPacketConnectionFunction); |
| + dbus::MessageWriter writer(&method_call); |
| + writer.AppendString(net::IPAddressToString(ip_endpoint.address())); |
| + helper_->CallVoidMethodWithErrorCallback(&method_call, |
| + callback, |
| + error_callback); |
| + } |
| + |
| + virtual void RemoveAllWakeOnPacketConnections( |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) OVERRIDE { |
| + dbus::MethodCall method_call( |
| + shill::kFlimflamManagerInterface, |
| + shill::kRemoveAllWakeOnPacketConnectionsFunction); |
| + helper_->CallVoidMethodWithErrorCallback(&method_call, |
| + callback, |
| + error_callback); |
| + } |
| + |
| virtual TestInterface* GetTestInterface() OVERRIDE { |
| return NULL; |
| } |