blob: 12c20f03efe5ccfb8b60e3573b0920f4cfd0b4bf [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.
#include "shill/ipconfig.h"
#include <base/logging.h>
#include "shill/device.h"
using std::string;
namespace shill {
IPConfig::IPConfig(DeviceConstRefPtr device) : device_(device) {
VLOG(2) << "IPConfig created.";
}
IPConfig::~IPConfig() {
VLOG(2) << "IPConfig destroyed.";
}
const string &IPConfig::GetDeviceName() const {
return device()->UniqueName();
}
bool IPConfig::Request() {
return false;
}
bool IPConfig::Renew() {
return false;
}
void IPConfig::UpdateProperties(const Properties &properties) {
properties_ = properties;
if (update_callback_.get()) {
update_callback_->Run(this);
}
}
void IPConfig::RegisterUpdateCallback(
Callback1<IPConfigRefPtr>::Type *callback) {
update_callback_.reset(callback);
}
} // namespace shill