Chris Masone | d7732e4 | 2011-05-20 11:08:56 -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 | #ifndef SHILL_DEVICE_DBUS_ADAPTOR_H_ |
| 6 | #define SHILL_DEVICE_DBUS_ADAPTOR_H_ |
| 7 | |
| 8 | #include <map> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/basictypes.h> |
| 12 | |
| 13 | #include "shill/adaptor_interfaces.h" |
| 14 | #include "shill/dbus_adaptor.h" |
| 15 | #include "shill/flimflam-device.h" |
| 16 | |
| 17 | namespace shill { |
| 18 | class Device; |
| 19 | |
| 20 | // Subclass of DBusAdaptor for Device objects |
| 21 | class DeviceDBusAdaptor : public org::chromium::flimflam::Device_adaptor, |
| 22 | public DBusAdaptor, |
| 23 | public DeviceAdaptorInterface { |
| 24 | public: |
| 25 | static const char kInterfaceName[]; |
| 26 | static const char kPath[]; |
| 27 | |
| 28 | DeviceDBusAdaptor(DBus::Connection& conn, Device *device); |
| 29 | virtual ~DeviceDBusAdaptor(); |
| 30 | void UpdateEnabled(); |
| 31 | |
| 32 | // Implementation of Device_adaptor |
| 33 | std::map<std::string, ::DBus::Variant> GetProperties(::DBus::Error &error); |
| 34 | void SetProperty(const std::string& , |
| 35 | const ::DBus::Variant& , |
| 36 | ::DBus::Error &error); |
| 37 | void ProposeScan(::DBus::Error &error); |
| 38 | ::DBus::Path AddIPConfig(const std::string& , ::DBus::Error &error); |
| 39 | |
| 40 | private: |
| 41 | Device *device_; |
| 42 | DISALLOW_COPY_AND_ASSIGN(DeviceDBusAdaptor); |
| 43 | }; |
| 44 | |
| 45 | } // namespace shill |
| 46 | #endif // SHILL_DEVICE_DBUS_ADAPTOR_H_ |