blob: 1e1b522de84bcf5ab2384ed5835c06bcf6f497fb [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHILL_DEVICE_DBUS_ADAPTOR_H_
#define SHILL_DEVICE_DBUS_ADAPTOR_H_
#include <map>
#include <string>
#include <base/basictypes.h>
#include "shill/adaptor_interfaces.h"
#include "shill/dbus_adaptor.h"
#include "shill/device.h"
#include "shill/flimflam-device.h"
namespace shill {
// Subclass of DBusAdaptor for Device objects
class DeviceDBusAdaptor : public org::chromium::flimflam::Device_adaptor,
public DBusAdaptor,
public DeviceAdaptorInterface {
public:
static const char kInterfaceName[];
static const char kPath[];
DeviceDBusAdaptor(DBus::Connection* conn, DeviceRefPtr device);
virtual ~DeviceDBusAdaptor();
// Implementation of DeviceAdaptorInterface.
void UpdateEnabled();
void EmitBoolChanged(const std::string& name, bool value);
void EmitUintChanged(const std::string& name, uint32 value);
void EmitIntChanged(const std::string& name, int value);
void EmitStringChanged(const std::string& name, const std::string& value);
// Implementation of Device_adaptor.
std::map<std::string, ::DBus::Variant> GetProperties(::DBus::Error &error);
void SetProperty(const std::string& ,
const ::DBus::Variant& ,
::DBus::Error &error);
void ProposeScan(::DBus::Error &error);
::DBus::Path AddIPConfig(const std::string& , ::DBus::Error &error);
private:
DeviceRefPtr device_;
DISALLOW_COPY_AND_ASSIGN(DeviceDBusAdaptor);
};
} // namespace shill
#endif // SHILL_DEVICE_DBUS_ADAPTOR_H_