blob: 19a0bd9aa2da90838ad2633a7660663cffaaacb1 [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_DRIVER_
6#define SHILL_VPN_DRIVER_
7
Paul Stewartca6abd42012-03-01 15:45:29 -08008#include <string>
9
Darin Petkov33af05c2012-02-28 10:10:30 +010010#include <base/basictypes.h>
11
Darin Petkov79d74c92012-03-07 17:20:32 +010012#include "shill/refptr_types.h"
13
Darin Petkov33af05c2012-02-28 10:10:30 +010014namespace shill {
15
16class Error;
Paul Stewartebd38562012-03-23 13:06:40 -070017class PropertyStore;
Darin Petkovf3c71d72012-03-21 12:32:15 +010018class StoreInterface;
Darin Petkov33af05c2012-02-28 10:10:30 +010019
20class VPNDriver {
21 public:
22 virtual ~VPNDriver() {}
23
Paul Stewartca6abd42012-03-01 15:45:29 -080024 virtual bool ClaimInterface(const std::string &link_name,
25 int interface_index) = 0;
Darin Petkov79d74c92012-03-07 17:20:32 +010026 virtual void Connect(const VPNServiceRefPtr &service, Error *error) = 0;
Darin Petkov6aa21872012-03-09 16:10:19 +010027 virtual void Disconnect() = 0;
Darin Petkovf3c71d72012-03-21 12:32:15 +010028 virtual bool Load(StoreInterface *storage, const std::string &storage_id) = 0;
29 virtual bool Save(StoreInterface *storage, const std::string &storage_id) = 0;
Paul Stewartebd38562012-03-23 13:06:40 -070030 virtual void InitPropertyStore(PropertyStore *store) = 0;
Paul Stewart39964fa2012-04-04 09:50:25 -070031 virtual std::string GetProviderType() const = 0;
Darin Petkov33af05c2012-02-28 10:10:30 +010032};
33
34} // namespace shill
35
36#endif // SHILL_VPN_DRIVER_