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_DBUS_ADAPTOR_H_ |
| 6 | #define SHILL_DBUS_ADAPTOR_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 10 | #include <base/basictypes.h> |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 11 | #include <dbus-c++/dbus.h> |
| 12 | |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 13 | namespace shill { |
| 14 | |
| 15 | #define SHILL_INTERFACE "org.chromium.flimflam" |
| 16 | #define SHILL_PATH "/org/chromium/flimflam" |
| 17 | |
| 18 | // Superclass for all DBus-backed Adaptor objects |
| 19 | class DBusAdaptor : public DBus::ObjectAdaptor { |
| 20 | public: |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 21 | DBusAdaptor(DBus::Connection* conn, const std::string& object_path); |
| 22 | virtual ~DBusAdaptor(); |
| 23 | |
| 24 | static ::DBus::Variant BoolToVariant(bool value); |
| 25 | static ::DBus::Variant UInt32ToVariant(uint32 value); |
| 26 | static ::DBus::Variant IntToVariant(int value); |
| 27 | static ::DBus::Variant StringToVariant(const std::string& value); |
| 28 | |
| 29 | protected: |
| 30 | DISALLOW_COPY_AND_ASSIGN(DBusAdaptor); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } // namespace shill |
| 34 | #endif // SHILL_DBUS_ADAPTOR_H_ |