blob: 1351df6b4b1e73a8ba86527d8398e7cc19972cd2 [file] [log] [blame]
// Copyright (c) 2012 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.
#include <map>
#include <string>
#include <base/macros.h>
#include "wimax_manager/dbus_adaptor.h"
#include "wimax_manager/dbus_adaptors/org.chromium.WiMaxManager.Device.h"
#include "wimax_manager/network.h"
namespace wimax_manager {
class Device;
class DeviceDBusAdaptor : public org::chromium::WiMaxManager::Device_adaptor,
public DBusAdaptor {
DeviceDBusAdaptor(DBus::Connection* connection, Device* device);
virtual ~DeviceDBusAdaptor() = default;
static std::string GetDeviceObjectPath(const Device& device);
virtual void Enable(DBus::Error& error); // NOLINT
virtual void Disable(DBus::Error& error); // NOLINT
virtual void ScanNetworks(DBus::Error& error); // NOLINT
virtual void Connect(const DBus::Path& network_object_path,
const std::map<std::string, DBus::Variant>& parameters,
DBus::Error& error); // NOLINT
virtual void Disconnect(DBus::Error& error); // NOLINT
void UpdateMACAddress();
void UpdateNetworks();
void UpdateRFInfo();
void UpdateStatus();
NetworkRefPtr FindNetworkByDBusObjectPath(
const DBus::Path& network_object_path) const;
// Overrides PropertiesAdaptor::on_set_property to handle
// org.freedesktop.DBus.Properties.Set calls.
virtual void on_set_property(DBus::InterfaceAdaptor& interface, // NOLINT
const std::string& property,
const DBus::Variant& value);
Device* device_;
} // namespace wimax_manager