blob: 21a0a9356e4332e9638335953fef1bd4a918ca84 [file] [log] [blame]
Darin Petkovc90fe522011-07-15 13:59:47 -07001// Copyright (c) 2011 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/modem_manager_proxy.h"
6
7#include <base/logging.h>
8
9using std::string;
10using std::vector;
11
12namespace shill {
13
14ModemManagerProxy::ModemManagerProxy(ModemManager *manager,
15 const string &path,
16 const string &service)
17 : connection_(DBus::Connection::SystemBus()),
18 proxy_(manager, &connection_, path, service) {}
19
20ModemManagerProxy::~ModemManagerProxy() {}
21
22vector<DBus::Path> ModemManagerProxy::EnumerateDevices() {
23 return proxy_.EnumerateDevices();
24}
25
26ModemManagerProxy::Proxy::Proxy(ModemManager *manager,
27 DBus::Connection *connection,
28 const string &path,
29 const string &service)
30 : DBus::ObjectProxy(*connection, path, service.c_str()),
31 manager_(manager) {}
32
33ModemManagerProxy::Proxy::~Proxy() {}
34
35void ModemManagerProxy::Proxy::DeviceAdded(const DBus::Path &device) {
36 LOG(INFO) << "Modem device added: " << device;
37}
38
39void ModemManagerProxy::Proxy::DeviceRemoved(const DBus::Path &device) {
40 LOG(INFO) << "Modem device removed: " << device;
41}
42
43} // namespace shill