mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 1 | // 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 | |
| 12 | namespace shill { |
| 13 | |
| 14 | class ControlInterface; |
| 15 | class EventDispatcher; |
| 16 | class Manager; |
| 17 | class Metrics; |
| 18 | class PPPDevice; |
| 19 | |
| 20 | class PPPDeviceFactory { |
| 21 | public: |
| 22 | virtual ~PPPDeviceFactory(); |
| 23 | |
| 24 | // This is a singleton. Use PPPDeviceFactory::GetInstance()->Foo(). |
Paul Stewart | 1a212a6 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 25 | static PPPDeviceFactory* GetInstance(); |
mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 26 | |
Paul Stewart | 1a212a6 | 2015-06-16 13:13:10 -0700 | [diff] [blame^] | 27 | virtual PPPDevice* CreatePPPDevice( |
| 28 | ControlInterface* control, |
| 29 | EventDispatcher* dispatcher, |
| 30 | Metrics* metrics, |
| 31 | Manager* manager, |
| 32 | const std::string& link_name, |
mukesh agrawal | f407d59 | 2013-07-31 11:37:57 -0700 | [diff] [blame] | 33 | 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_ |