blob: 5159978377105037eb40e56fcb937bbf7c82b6fc [file] [log] [blame]
mukesh agrawalf407d592013-07-31 11:37:57 -07001// Copyright (c) 2013 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_PPP_DEVICE_FACTORY_H_
6#define SHILL_PPP_DEVICE_FACTORY_H_
7
8#include <string>
9
10#include <base/lazy_instance.h>
11
12namespace shill {
13
14class ControlInterface;
15class EventDispatcher;
16class Manager;
17class Metrics;
18class PPPDevice;
19
20class PPPDeviceFactory {
21 public:
22 virtual ~PPPDeviceFactory();
23
24 // This is a singleton. Use PPPDeviceFactory::GetInstance()->Foo().
Paul Stewart1a212a62015-06-16 13:13:10 -070025 static PPPDeviceFactory* GetInstance();
mukesh agrawalf407d592013-07-31 11:37:57 -070026
Paul Stewart1a212a62015-06-16 13:13:10 -070027 virtual PPPDevice* CreatePPPDevice(
28 ControlInterface* control,
29 EventDispatcher* dispatcher,
30 Metrics* metrics,
31 Manager* manager,
32 const std::string& link_name,
mukesh agrawalf407d592013-07-31 11:37:57 -070033 int interface_index);
34
35 protected:
36 PPPDeviceFactory();
37
38 private:
39 friend struct base::DefaultLazyInstanceTraits<PPPDeviceFactory>;
40
41 DISALLOW_COPY_AND_ASSIGN(PPPDeviceFactory);
42};
43
44} // namespace shill
45
46#endif // SHILL_PPP_DEVICE_FACTORY_H_