20#include <boost/shared_ptr.hpp>
21#include <boost/noncopyable.hpp>
70class CfgMgr :
public boost::noncopyable {
89 void setDataDir(
const std::string& datadir,
bool unspecified =
true);
231 family_ = family == AF_INET ? AF_INET : AF_INET6;
261 void mergeIntoCfg(
const SrvConfigPtr& taget_config,
const uint32_t seq);
284 typedef std::map<uint32_t, SrvConfigPtr> SrvConfigMap;
288 SrvConfigMap external_configs_;
Defines elements for storing the names of client classes.
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
util::Optional< std::string > getDataDir() const
returns path do the data directory
CfgMgr()
Protected constructor.
virtual ~CfgMgr()=default
virtual destructor
const D2ClientConfigPtr & getD2ClientConfig() const
Fetches the DHCP-DDNS configuration pointer.
D2ClientMgr & getD2ClientMgr()
Fetches the DHCP-DDNS manager.
uint16_t getFamily() const
Returns address family.
void setFamily(uint16_t family)
Sets address family (AF_INET or AF_INET6)
void clear()
Remove current, staging, and external configurations.
SrvConfigPtr createExternalCfg()
Creates an external configuration and returns pointer to it.
void setD2ClientConfig(D2ClientConfigPtr &new_config)
Updates the DHCP-DDNS client configuration to the given value.
static CfgMgr & instance()
returns a single instance of Configuration Manager
void mergeIntoStagingCfg(const uint32_t seq)
Merges external configuration with the given sequence number into the staging configuration.
void mergeIntoCurrentCfg(const uint32_t seq)
Merges external configuration with the given sequence number into the current configuration.
void setDataDir(const std::string &datadir, bool unspecified=true)
Sets new data directory.
SrvConfigPtr getStagingCfg()
Returns a pointer to the staging configuration.
bool ddnsEnabled()
Convenience method for checking if DHCP-DDNS updates are enabled.
void commit()
Commits the staging configuration.
void clearStagingConfiguration()
Remove staging configuration.
SrvConfigPtr getCurrentCfg()
Returns a pointer to the current configuration.
D2ClientMgr isolates Kea from the details of being a D2 client.
Exception thrown when the same interface has been specified twice.
DuplicateListeningIface(const char *file, size_t line, const char *what)
A template representing an optional value.
Defines the D2ClientMgr class.
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
boost::shared_ptr< D2ClientMgr > D2ClientMgrPtr
Defines a pointer for D2ClientMgr instances.
Defines the logger used by the top-level component of kea-lfc.