7 #ifndef MASTER_LOADER_CALLBACKS_H
8 #define MASTER_LOADER_CALLBACKS_H
12 #include <boost/shared_ptr.hpp>
24 typedef boost::shared_ptr<Rdata>
RdataPtr;
38 typedef std::function<void(
const Name& name,
const RRClass& rrclass,
61 typedef std::function<void(
const std::string& source_name,
77 if (!error_ || !warning_) {
79 "Empty function passed as callback");
94 void error(
const std::string& source_name,
size_t source_line,
95 const std::string& reason)
const
97 error_(source_name, source_line, reason);
111 void warning(
const std::string& source_name,
size_t source_line,
112 const std::string& reason)
const
114 warning_(source_name, source_line, reason);
128 const IssueCallback error_, warning_;
134 #endif // MASTER_LOADER_CALLBACKS_H
The Name class encapsulates DNS names.
A generic exception that is thrown if a parameter given to a method or function is considered invalid...
The Rdata class is an abstract base class that provides a set of common interfaces to manipulate conc...
static MasterLoaderCallbacks getNullCallbacks()
Return a callbacks instance with null callbacks.
std::function< void(const std::string &source_name, size_t source_line, const std::string &reason)> IssueCallback
Type of one callback to report problems.
The RRClass class encapsulates DNS resource record classes.
void warning(const std::string &source_name, size_t source_line, const std::string &reason) const
Call callback for potential problems.
MasterLoaderCallbacks(const IssueCallback &error, const IssueCallback &warning)
Constructor.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
The RRTTL class encapsulates TTLs used in DNS resource records.
Defines the logger used by the top-level component of kea-dhcp-ddns.
The RRType class encapsulates DNS resource record types.
std::function< void(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &rrttl, const rdata::RdataPtr &rdata)> AddRRCallback
Type of callback to add a RR.
Set of issue callbacks for a loader.
boost::shared_ptr< Rdata > RdataPtr
The RdataPtr type is a pointer-like type, pointing to an object of some concrete derived class of Rda...
void error(const std::string &source_name, size_t source_line, const std::string &reason) const
Call callback for serious errors.