Darin Petkov | 33af05c | 2012-02-28 10:10:30 +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_DRIVER_ |
| 6 | #define SHILL_VPN_DRIVER_ |
| 7 | |
Paul Stewart | ca6abd4 | 2012-03-01 15:45:29 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 10 | #include <base/basictypes.h> |
| 11 | |
Darin Petkov | 79d74c9 | 2012-03-07 17:20:32 +0100 | [diff] [blame] | 12 | #include "shill/refptr_types.h" |
| 13 | |
Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 14 | namespace shill { |
| 15 | |
| 16 | class Error; |
Paul Stewart | ebd3856 | 2012-03-23 13:06:40 -0700 | [diff] [blame] | 17 | class PropertyStore; |
Darin Petkov | f3c71d7 | 2012-03-21 12:32:15 +0100 | [diff] [blame] | 18 | class StoreInterface; |
Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 19 | |
| 20 | class VPNDriver { |
| 21 | public: |
| 22 | virtual ~VPNDriver() {} |
| 23 | |
Paul Stewart | ca6abd4 | 2012-03-01 15:45:29 -0800 | [diff] [blame] | 24 | virtual bool ClaimInterface(const std::string &link_name, |
| 25 | int interface_index) = 0; |
Darin Petkov | 79d74c9 | 2012-03-07 17:20:32 +0100 | [diff] [blame] | 26 | virtual void Connect(const VPNServiceRefPtr &service, Error *error) = 0; |
Darin Petkov | 6aa2187 | 2012-03-09 16:10:19 +0100 | [diff] [blame] | 27 | virtual void Disconnect() = 0; |
Darin Petkov | f3c71d7 | 2012-03-21 12:32:15 +0100 | [diff] [blame] | 28 | virtual bool Load(StoreInterface *storage, const std::string &storage_id) = 0; |
| 29 | virtual bool Save(StoreInterface *storage, const std::string &storage_id) = 0; |
Paul Stewart | ebd3856 | 2012-03-23 13:06:40 -0700 | [diff] [blame] | 30 | virtual void InitPropertyStore(PropertyStore *store) = 0; |
Paul Stewart | 39964fa | 2012-04-04 09:50:25 -0700 | [diff] [blame] | 31 | virtual std::string GetProviderType() const = 0; |
Darin Petkov | 33af05c | 2012-02-28 10:10:30 +0100 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_VPN_DRIVER_ |