blob: 2eb9e62ea16371ff9a7575c5e3163a6eb902af25 [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 "shill/vpn.h"
#include "shill/vpn_service.h"
using std::string;
namespace shill {
VPN::VPN(ControlInterface *control,
EventDispatcher *dispatcher,
Metrics *metrics,
Manager *manager,
const string &link_name,
int interface_index)
: Device(control, dispatcher, metrics, manager, link_name, "",
interface_index, Technology::kVPN) {}
VPN::~VPN() {}
bool VPN::TechnologyIs(const Technology::Identifier type) const {
return type == Technology::kVPN;
}
void VPN::SelectService(const VPNServiceRefPtr &service) {
VLOG(2) << __func__;
Device::SelectService(service);
}
void VPN::UpdateIPConfig(const IPConfig::Properties &properties) {
VLOG(2) << __func__;
ipconfig()->set_properties(properties);
OnIPConfigUpdated(ipconfig(), true);
}
void VPN::OnDisconnected() {
VLOG(2) << __func__;
OnIPConfigUpdated(ipconfig(), false);
}
} // namespace shill