blob: 68d5d08ee8a4ca491af378b1a7a223e7ad5bf849 [file] [log] [blame]
Chris Masoned7732e42011-05-20 11:08:56 -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#ifndef SHILL_DBUS_ADAPTOR_H_
6#define SHILL_DBUS_ADAPTOR_H_
7
8#include <string>
9
Chris Masoned0ceb8c2011-06-02 10:05:39 -070010#include <base/basictypes.h>
Chris Masoned7732e42011-05-20 11:08:56 -070011#include <dbus-c++/dbus.h>
12
Chris Masoned7732e42011-05-20 11:08:56 -070013namespace 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
19class DBusAdaptor : public DBus::ObjectAdaptor {
20 public:
Chris Masoned0ceb8c2011-06-02 10:05:39 -070021 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 Masoned7732e42011-05-20 11:08:56 -070031};
32
33} // namespace shill
34#endif // SHILL_DBUS_ADAPTOR_H_