OLD | NEW |
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 #include "chromeos/dbus/shill_device_client.h" | 5 #include "chromeos/dbus/shill_device_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 virtual void Reset(const dbus::ObjectPath& device_path, | 185 virtual void Reset(const dbus::ObjectPath& device_path, |
186 const base::Closure& callback, | 186 const base::Closure& callback, |
187 const ErrorCallback& error_callback) OVERRIDE { | 187 const ErrorCallback& error_callback) OVERRIDE { |
188 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, | 188 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, |
189 shill::kResetFunction); | 189 shill::kResetFunction); |
190 GetHelper(device_path)->CallVoidMethodWithErrorCallback( | 190 GetHelper(device_path)->CallVoidMethodWithErrorCallback( |
191 &method_call, callback, error_callback); | 191 &method_call, callback, error_callback); |
192 } | 192 } |
193 | 193 |
| 194 virtual void PerformTDLSOperation( |
| 195 const dbus::ObjectPath& device_path, |
| 196 const std::string& operation, |
| 197 const std::string& peer, |
| 198 const StringCallback& callback, |
| 199 const ErrorCallback& error_callback) OVERRIDE { |
| 200 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, |
| 201 shill::kPerformTDLSOperationFunction); |
| 202 dbus::MessageWriter writer(&method_call); |
| 203 writer.AppendString(operation); |
| 204 writer.AppendString(peer); |
| 205 GetHelper(device_path)->CallStringMethodWithErrorCallback( |
| 206 &method_call, callback, error_callback); |
| 207 } |
| 208 |
194 virtual TestInterface* GetTestInterface() OVERRIDE { | 209 virtual TestInterface* GetTestInterface() OVERRIDE { |
195 return NULL; | 210 return NULL; |
196 } | 211 } |
197 | 212 |
198 protected: | 213 protected: |
199 virtual void Init(dbus::Bus* bus) OVERRIDE { | 214 virtual void Init(dbus::Bus* bus) OVERRIDE { |
200 bus_ = bus; | 215 bus_ = bus; |
201 } | 216 } |
202 | 217 |
203 private: | 218 private: |
(...skipping 28 matching lines...) Expand all Loading... |
232 ShillDeviceClient::ShillDeviceClient() {} | 247 ShillDeviceClient::ShillDeviceClient() {} |
233 | 248 |
234 ShillDeviceClient::~ShillDeviceClient() {} | 249 ShillDeviceClient::~ShillDeviceClient() {} |
235 | 250 |
236 // static | 251 // static |
237 ShillDeviceClient* ShillDeviceClient::Create() { | 252 ShillDeviceClient* ShillDeviceClient::Create() { |
238 return new ShillDeviceClientImpl(); | 253 return new ShillDeviceClientImpl(); |
239 } | 254 } |
240 | 255 |
241 } // namespace chromeos | 256 } // namespace chromeos |
OLD | NEW |