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_manager_client.h" | 5 #include "chromeos/dbus/shill_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 virtual void ConnectToBestServices( | 203 virtual void ConnectToBestServices( |
204 const base::Closure& callback, | 204 const base::Closure& callback, |
205 const ErrorCallback& error_callback) OVERRIDE { | 205 const ErrorCallback& error_callback) OVERRIDE { |
206 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, | 206 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
207 shill::kConnectToBestServicesFunction); | 207 shill::kConnectToBestServicesFunction); |
208 helper_->CallVoidMethodWithErrorCallback(&method_call, | 208 helper_->CallVoidMethodWithErrorCallback(&method_call, |
209 callback, | 209 callback, |
210 error_callback); | 210 error_callback); |
211 } | 211 } |
212 | 212 |
| 213 virtual void AddWakeOnPacketConnection( |
| 214 const std::string& ip_connection, |
| 215 const base::Closure& callback, |
| 216 const ErrorCallback& error_callback) OVERRIDE { |
| 217 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
| 218 shill::kAddWakeOnPacketConnectionFunction); |
| 219 dbus::MessageWriter writer(&method_call); |
| 220 writer.AppendString(ip_connection); |
| 221 helper_->CallVoidMethodWithErrorCallback(&method_call, |
| 222 callback, |
| 223 error_callback); |
| 224 } |
| 225 |
| 226 virtual void RemoveWakeOnPacketConnection( |
| 227 const std::string& ip_connection, |
| 228 const base::Closure& callback, |
| 229 const ErrorCallback& error_callback) OVERRIDE { |
| 230 dbus::MethodCall method_call(shill::kFlimflamManagerInterface, |
| 231 shill::kRemoveWakeOnPacketConnectionFunction); |
| 232 dbus::MessageWriter writer(&method_call); |
| 233 writer.AppendString(ip_connection); |
| 234 helper_->CallVoidMethodWithErrorCallback(&method_call, |
| 235 callback, |
| 236 error_callback); |
| 237 } |
| 238 |
| 239 virtual void RemoveAllWakeOnPacketConnections( |
| 240 const base::Closure& callback, |
| 241 const ErrorCallback& error_callback) OVERRIDE { |
| 242 dbus::MethodCall method_call( |
| 243 shill::kFlimflamManagerInterface, |
| 244 shill::kRemoveAllWakeOnPacketConnectionsFunction); |
| 245 dbus::MessageWriter writer(&method_call); |
| 246 helper_->CallVoidMethodWithErrorCallback(&method_call, |
| 247 callback, |
| 248 error_callback); |
| 249 } |
| 250 |
213 virtual TestInterface* GetTestInterface() OVERRIDE { | 251 virtual TestInterface* GetTestInterface() OVERRIDE { |
214 return NULL; | 252 return NULL; |
215 } | 253 } |
216 | 254 |
217 protected: | 255 protected: |
218 virtual void Init(dbus::Bus* bus) OVERRIDE { | 256 virtual void Init(dbus::Bus* bus) OVERRIDE { |
219 proxy_ = bus->GetObjectProxy(shill::kFlimflamServiceName, | 257 proxy_ = bus->GetObjectProxy(shill::kFlimflamServiceName, |
220 dbus::ObjectPath(shill::kFlimflamServicePath)); | 258 dbus::ObjectPath(shill::kFlimflamServicePath)); |
221 helper_.reset(new ShillClientHelper(proxy_)); | 259 helper_.reset(new ShillClientHelper(proxy_)); |
222 helper_->MonitorPropertyChanged(shill::kFlimflamManagerInterface); | 260 helper_->MonitorPropertyChanged(shill::kFlimflamManagerInterface); |
(...skipping 18 matching lines...) Expand all Loading... |
241 } | 279 } |
242 | 280 |
243 // ShillManagerClient::VerificationProperties implementation. | 281 // ShillManagerClient::VerificationProperties implementation. |
244 ShillManagerClient::VerificationProperties::VerificationProperties() { | 282 ShillManagerClient::VerificationProperties::VerificationProperties() { |
245 } | 283 } |
246 | 284 |
247 ShillManagerClient::VerificationProperties::~VerificationProperties() { | 285 ShillManagerClient::VerificationProperties::~VerificationProperties() { |
248 } | 286 } |
249 | 287 |
250 } // namespace chromeos | 288 } // namespace chromeos |
OLD | NEW |