blob: e0494a562424fb2be69dd75ca31719e22f35f82e [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#ifndef SHILL_VPN_SERVICE_
6#define SHILL_VPN_SERVICE_
7
8#include <base/memory/scoped_ptr.h>
9#include <gtest/gtest_prod.h> // for FRIEND_TEST
10
11#include "shill/service.h"
12
13namespace shill {
14
15class VPNDriver;
16
17class VPNService : public Service {
18 public:
Darin Petkov79d74c92012-03-07 17:20:32 +010019 VPNService(ControlInterface *control,
Darin Petkov33af05c2012-02-28 10:10:30 +010020 EventDispatcher *dispatcher,
21 Metrics *metrics,
22 Manager *manager,
23 VPNDriver *driver); // Takes ownership of |driver|.
24 virtual ~VPNService();
25
26 // Inherited from Service.
27 virtual void Connect(Error *error);
Darin Petkov33af05c2012-02-28 10:10:30 +010028 virtual std::string GetStorageIdentifier() const;
Paul Stewartca6abd42012-03-01 15:45:29 -080029 VPNDriver *driver() { return driver_.get(); }
Darin Petkov33af05c2012-02-28 10:10:30 +010030
31 private:
32 FRIEND_TEST(VPNServiceTest, GetDeviceRpcId);
33
34 virtual std::string GetDeviceRpcId(Error *error);
35
36 scoped_ptr<VPNDriver> driver_;
37
38 DISALLOW_COPY_AND_ASSIGN(VPNService);
39};
40
41} // namespace shill
42
43#endif // SHILL_VPN_SERVICE_