Darin Petkov | c90fe52 | 2011-07-15 13:59:47 -0700 | [diff] [blame] | 1 | // 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 | |
| 9 | using std::string; |
| 10 | using std::vector; |
| 11 | |
| 12 | namespace shill { |
| 13 | |
| 14 | ModemManagerProxy::ModemManagerProxy(ModemManager *manager, |
| 15 | const string &path, |
| 16 | const string &service) |
| 17 | : connection_(DBus::Connection::SystemBus()), |
| 18 | proxy_(manager, &connection_, path, service) {} |
| 19 | |
| 20 | ModemManagerProxy::~ModemManagerProxy() {} |
| 21 | |
| 22 | vector<DBus::Path> ModemManagerProxy::EnumerateDevices() { |
| 23 | return proxy_.EnumerateDevices(); |
| 24 | } |
| 25 | |
| 26 | ModemManagerProxy::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 | |
| 33 | ModemManagerProxy::Proxy::~Proxy() {} |
| 34 | |
| 35 | void ModemManagerProxy::Proxy::DeviceAdded(const DBus::Path &device) { |
| 36 | LOG(INFO) << "Modem device added: " << device; |
| 37 | } |
| 38 | |
| 39 | void ModemManagerProxy::Proxy::DeviceRemoved(const DBus::Path &device) { |
| 40 | LOG(INFO) << "Modem device removed: " << device; |
| 41 | } |
| 42 | |
| 43 | } // namespace shill |