blob: d95e7ca4f3b5dc358ed737b85fd241586e32b987 [file] [log] [blame]
Peter Qiubf8e36c2014-12-03 22:59:45 -08001// 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
14namespace apmanager {
15
16class 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_