blob: 12c20f03efe5ccfb8b60e3573b0920f4cfd0b4bf [file] [log] [blame]
Darin Petkove02b3ca2011-05-31 16:00:44 -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#include "shill/ipconfig.h"
6
7#include <base/logging.h>
8
9#include "shill/device.h"
10
11using std::string;
12
13namespace shill {
14
Chris Masonec1e50412011-06-07 13:04:53 -070015IPConfig::IPConfig(DeviceConstRefPtr device) : device_(device) {
Darin Petkove02b3ca2011-05-31 16:00:44 -070016 VLOG(2) << "IPConfig created.";
17}
18
19IPConfig::~IPConfig() {
20 VLOG(2) << "IPConfig destroyed.";
21}
22
23const string &IPConfig::GetDeviceName() const {
Chris Masonec1e50412011-06-07 13:04:53 -070024 return device()->UniqueName();
Darin Petkove02b3ca2011-05-31 16:00:44 -070025}
26
Darin Petkove7cb7f82011-06-03 13:21:51 -070027bool IPConfig::Request() {
28 return false;
29}
30
31bool IPConfig::Renew() {
32 return false;
33}
34
35void IPConfig::UpdateProperties(const Properties &properties) {
36 properties_ = properties;
Darin Petkovefb09c32011-06-07 20:24:17 -070037 if (update_callback_.get()) {
38 update_callback_->Run(this);
39 }
40}
41
42void IPConfig::RegisterUpdateCallback(
43 Callback1<IPConfigRefPtr>::Type *callback) {
44 update_callback_.reset(callback);
Darin Petkove7cb7f82011-06-03 13:21:51 -070045}
46
Darin Petkove02b3ca2011-05-31 16:00:44 -070047} // namespace shill