Darin Petkov | f20994f | 2012-03-05 16:12:19 +0100 | [diff] [blame] | 1 | // 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_ |
| 6 | #define SHILL_VPN_ |
| 7 | |
| 8 | #include "shill/device.h" |
| 9 | |
| 10 | namespace shill { |
| 11 | |
| 12 | class VPN : public Device { |
| 13 | public: |
| 14 | VPN(ControlInterface *control, |
| 15 | EventDispatcher *dispatcher, |
| 16 | Metrics *metrics, |
| 17 | Manager *manager, |
| 18 | const std::string &link_name, |
| 19 | int interface_index); |
| 20 | |
| 21 | virtual ~VPN(); |
| 22 | |
Eric Shienbrood | 9a24553 | 2012-03-07 14:20:39 -0500 | [diff] [blame] | 23 | virtual void Start(Error *error, const EnabledStateChangedCallback &callback); |
| 24 | virtual void Stop(Error *error, const EnabledStateChangedCallback &callback); |
Paul Stewart | 536820d | 2012-03-19 16:05:59 -0700 | [diff] [blame] | 25 | |
Darin Petkov | f20994f | 2012-03-05 16:12:19 +0100 | [diff] [blame] | 26 | virtual bool TechnologyIs(const Technology::Identifier type) const; |
| 27 | |
Darin Petkov | 79d74c9 | 2012-03-07 17:20:32 +0100 | [diff] [blame] | 28 | virtual void UpdateIPConfig(const IPConfig::Properties &properties); |
| 29 | virtual void OnDisconnected(); |
| 30 | |
| 31 | // Expose protected device methods to the VPN driver. |
| 32 | void SelectService(const VPNServiceRefPtr &service); |
| 33 | |
Darin Petkov | f20994f | 2012-03-05 16:12:19 +0100 | [diff] [blame] | 34 | private: |
| 35 | DISALLOW_COPY_AND_ASSIGN(VPN); |
| 36 | }; |
| 37 | |
| 38 | } // namespace shill |
| 39 | |
| 40 | #endif // SHILL_VPN_ |