blob: 2a3ada1b742e728a9d89ec6b13c195199656c629 [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 Petkov6aa21872012-03-09 16:10:19 +010028 virtual void Disconnect(Error *error);
Darin Petkov33af05c2012-02-28 10:10:30 +010029 virtual std::string GetStorageIdentifier() const;
Darin Petkov6aa21872012-03-09 16:10:19 +010030
31 VPNDriver *driver() const { return driver_.get(); }
Darin Petkov33af05c2012-02-28 10:10:30 +010032
33 private:
34 FRIEND_TEST(VPNServiceTest, GetDeviceRpcId);
35
36 virtual std::string GetDeviceRpcId(Error *error);
37
38 scoped_ptr<VPNDriver> driver_;
39
40 DISALLOW_COPY_AND_ASSIGN(VPNService);
41};
42
43} // namespace shill
44
45#endif // SHILL_VPN_SERVICE_