blob: 9276e5a5414402ce8f2344c741a1a34647828024 [file] [log] [blame]
Darin Petkov096b3472012-05-15 10:26:22 +02001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "shill/wimax_manager_proxy.h"
6
7#include <base/logging.h>
Ben Chanb879d142012-05-15 11:10:32 -07008#include <chromeos/dbus/service_constants.h>
Darin Petkov096b3472012-05-15 10:26:22 +02009
10#include "shill/error.h"
11#include "shill/scope_logger.h"
12
13using std::vector;
14
15namespace shill {
16
Darin Petkov096b3472012-05-15 10:26:22 +020017WiMaxManagerProxy::WiMaxManagerProxy(DBus::Connection *connection)
18 : proxy_(connection) {}
19
20WiMaxManagerProxy::~WiMaxManagerProxy() {}
21
22vector<RpcIdentifier> WiMaxManagerProxy::Devices(Error *error) {
23 SLOG(DBus, 2) << __func__;
24 vector<DBus::Path> dbus_devices;
25 try {
26 dbus_devices = proxy_.Devices();
27 } catch (const DBus::Error &e) {
28 Error::PopulateAndLog(error, Error::kOperationFailed, e.what());
29 }
30 vector<RpcIdentifier> devices;
31 for (vector<DBus::Path>::const_iterator it = dbus_devices.begin();
32 it != dbus_devices.end(); ++it) {
33 devices.push_back(*it);
34 }
35 return devices;
36}
37
38WiMaxManagerProxy::Proxy::Proxy(DBus::Connection *connection)
39 : DBus::ObjectProxy(*connection,
Ben Chanb879d142012-05-15 11:10:32 -070040 wimax_manager::kWiMaxManagerServicePath,
41 wimax_manager::kWiMaxManagerServiceName) {}
Darin Petkov096b3472012-05-15 10:26:22 +020042
43WiMaxManagerProxy::Proxy::~Proxy() {}
44
45} // namespace shill