blob: 469feebcdbf779879bacabb0acb2ebb510e0dcfd [file] [log] [blame]
Darin Petkov33af05c2012-02-28 10:10:30 +01001// Copyright (c) 2012 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/vpn_service.h"
6
7#include <base/logging.h>
8
9#include "shill/technology.h"
10#include "shill/vpn_driver.h"
11
12using std::string;
13
14namespace shill {
15
Darin Petkov79d74c92012-03-07 17:20:32 +010016VPNService::VPNService(ControlInterface *control,
Darin Petkov33af05c2012-02-28 10:10:30 +010017 EventDispatcher *dispatcher,
18 Metrics *metrics,
19 Manager *manager,
20 VPNDriver *driver)
Darin Petkov79d74c92012-03-07 17:20:32 +010021 : Service(control, dispatcher, metrics, manager, Technology::kVPN),
Darin Petkov33af05c2012-02-28 10:10:30 +010022 driver_(driver) {}
23
24VPNService::~VPNService() {}
25
26void VPNService::Connect(Error *error) {
Darin Petkov6aa21872012-03-09 16:10:19 +010027 Service::Connect(error);
Darin Petkov79d74c92012-03-07 17:20:32 +010028 driver_->Connect(this, error);
Darin Petkov33af05c2012-02-28 10:10:30 +010029}
30
Darin Petkov6aa21872012-03-09 16:10:19 +010031void VPNService::Disconnect(Error *error) {
32 Service::Disconnect(error);
33 driver_->Disconnect();
34}
35
Darin Petkov33af05c2012-02-28 10:10:30 +010036string VPNService::GetStorageIdentifier() const {
37 NOTIMPLEMENTED();
38 return "";
39}
40
41string VPNService::GetDeviceRpcId(Error *error) {
42 NOTIMPLEMENTED();
43 error->Populate(Error::kNotSupported);
44 return "/";
45}
46
47} // namespace shill