| Index: chromeos/dbus/shill_device_client.cc
|
| diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
|
| index 1a523ffd3342167b0d6abd70336a9ebdeaf7120e..5fd63b95a75a74220ee467e83df0e85fac6be473 100644
|
| --- a/chromeos/dbus/shill_device_client.cc
|
| +++ b/chromeos/dbus/shill_device_client.cc
|
| @@ -14,6 +14,8 @@
|
| #include "dbus/object_path.h"
|
| #include "dbus/object_proxy.h"
|
| #include "dbus/values_util.h"
|
| +#include "net/base/ip_endpoint.h"
|
| +#include "net/base/net_util.h"
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
|
|
| namespace chromeos {
|
| @@ -23,7 +25,7 @@ namespace {
|
| // The ShillDeviceClient implementation.
|
| class ShillDeviceClientImpl : public ShillDeviceClient {
|
| public:
|
| - explicit ShillDeviceClientImpl()
|
| + ShillDeviceClientImpl()
|
| : bus_(NULL) {
|
| }
|
|
|
| @@ -206,6 +208,54 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
|
| &method_call, callback, error_callback);
|
| }
|
|
|
| + void AddWakeOnPacketConnection(
|
| + const dbus::ObjectPath& device_path,
|
| + const net::IPEndPoint& ip_endpoint,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback) override {
|
| + if (ip_endpoint.address().empty()) {
|
| + LOG(ERROR) << "AddWakeOnPacketConnection: null address";
|
| + return;
|
| + }
|
| + dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
|
| + shill::kAddWakeOnPacketConnectionFunction);
|
| + dbus::MessageWriter writer(&method_call);
|
| + writer.AppendString(net::IPAddressToString(ip_endpoint.address()));
|
| + GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
|
| + callback,
|
| + error_callback);
|
| + }
|
| +
|
| + void RemoveWakeOnPacketConnection(
|
| + const dbus::ObjectPath& device_path,
|
| + const net::IPEndPoint& ip_endpoint,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback) override {
|
| + if (ip_endpoint.address().empty()) {
|
| + LOG(ERROR) << "RemoveWakeOnPacketConnection: null address";
|
| + return;
|
| + }
|
| + dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
|
| + shill::kRemoveWakeOnPacketConnectionFunction);
|
| + dbus::MessageWriter writer(&method_call);
|
| + writer.AppendString(net::IPAddressToString(ip_endpoint.address()));
|
| + GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
|
| + callback,
|
| + error_callback);
|
| + }
|
| +
|
| + void RemoveAllWakeOnPacketConnections(
|
| + const dbus::ObjectPath& device_path,
|
| + const base::Closure& callback,
|
| + const ErrorCallback& error_callback) override {
|
| + dbus::MethodCall method_call(
|
| + shill::kFlimflamDeviceInterface,
|
| + shill::kRemoveAllWakeOnPacketConnectionsFunction);
|
| + GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
|
| + callback,
|
| + error_callback);
|
| + }
|
| +
|
| virtual TestInterface* GetTestInterface() override {
|
| return NULL;
|
| }
|
|
|