Kea  1.9.9-git
cfg_host_operations.h
Go to the documentation of this file.
1 // Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef CFG_HOST_OPERATIONS_H
8 #define CFG_HOST_OPERATIONS_H
9 
10 #include <cc/cfg_to_element.h>
11 #include <dhcpsrv/host.h>
12 #include <boost/shared_ptr.hpp>
13 #include <list>
14 #include <string>
15 
16 namespace isc {
17 namespace dhcp {
18 
20 class CfgHostOperations;
21 
23 
24 typedef boost::shared_ptr<CfgHostOperations> CfgHostOperationsPtr;
26 
28 typedef boost::shared_ptr<const CfgHostOperations>
30 
32 
44 public:
45 
47  typedef std::list<Host::IdentifierType> IdentifierTypes;
48 
54 
56 
57  static CfgHostOperationsPtr createConfig4();
59 
61  static CfgHostOperationsPtr createConfig6();
63 
70  void addIdentifierType(const std::string& identifier_name);
71 
74  const IdentifierTypes& getIdentifierTypes() const {
75  return (identifier_types_);
76  }
77 
79  void clearIdentifierTypes();
80 
84  virtual isc::data::ElementPtr toElement() const;
85 
86 private:
87 
90  IdentifierTypes identifier_types_;
91 
92 };
93 
94 }
95 }
96 
97 #endif // CFG_HOST_OPERATIONS_H
void addIdentifierType(const std::string &identifier_name)
Adds new identifier type to a collection of identifiers to be used by the server to search for host r...
static CfgHostOperationsPtr createConfig4()
Factory function for DHCPv4.
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
std::list< Host::IdentifierType > IdentifierTypes
Type of the container holding ordered list of identifiers.
Abstract class for configuration Cfg_* classes.
Represents global configuration for host reservations.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
static CfgHostOperationsPtr createConfig6()
Factory function for DHCPv6.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void clearIdentifierTypes()
Removes existing identifier types.
const IdentifierTypes & getIdentifierTypes() const
Returns const reference to ordered collection of identifiers to be used by the server to search for h...
boost::shared_ptr< const CfgHostOperations > ConstCfgHostOperationsPtr
Pointer to the const object.
boost::shared_ptr< CfgHostOperations > CfgHostOperationsPtr
Pointer to the Non-const object.