Peter Qiu | bf8e36c | 2014-12-03 22:59:45 -0800 | [diff] [blame] | 1 | // Copyright 2014 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 APMANAGER_DHCP_SERVER_FACTORY_H_ |
| 6 | #define APMANAGER_DHCP_SERVER_FACTORY_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/lazy_instance.h> |
| 11 | |
| 12 | #include "apmanager/dhcp_server.h" |
| 13 | |
| 14 | namespace apmanager { |
| 15 | |
| 16 | class DHCPServerFactory { |
| 17 | public: |
| 18 | virtual ~DHCPServerFactory(); |
| 19 | |
| 20 | // This is a singleton. Use DHCPServerFactory::GetInstance()->Foo(). |
| 21 | static DHCPServerFactory* GetInstance(); |
| 22 | |
| 23 | virtual DHCPServer* CreateDHCPServer(uint16_t server_address_index, |
| 24 | const std::string& interface_name); |
| 25 | |
| 26 | protected: |
| 27 | DHCPServerFactory(); |
| 28 | |
| 29 | private: |
| 30 | friend struct base::DefaultLazyInstanceTraits<DHCPServerFactory>; |
| 31 | |
| 32 | DISALLOW_COPY_AND_ASSIGN(DHCPServerFactory); |
| 33 | }; |
| 34 | |
| 35 | } // namespace apmanager |
| 36 | |
| 37 | #endif // APMANAGER_DHCP_SERVER_FACTORY_H_ |