22 #include <boost/bind.hpp> 28 using namespace rdata;
34 void addRR(
const Name& name,
const RRClass& rrclass,
47 if (type1 != rrset->getType()) {
52 return (dynamic_cast<const generic::RRSIG&>(*rdata1).typeCovered()
53 == dynamic_cast<const generic::RRSIG&>(
54 rit->getCurrent()).typeCovered());
65 if (current_rrset_ && (!isSameType(rrtype, rdata, current_rrset_) ||
66 current_rrset_->getClass() != rrclass ||
67 current_rrset_->getName() != name)) {
68 callback_(current_rrset_);
69 current_rrset_.reset();
72 if (!current_rrset_) {
73 current_rrset_ =
RRsetPtr(
new RRset(name, rrclass, rrtype, rrttl));
74 }
else if (current_rrset_->getTTL() != rrttl) {
76 current_rrset_->setTTL(std::min(current_rrset_->getTTL(), rrttl));
78 current_rrset_->addRdata(rdata);
82 impl_(new
Impl(callback))
The Name class encapsulates DNS names.
boost::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.
const AddRRsetCallback callback_
boost::shared_ptr< const Rdata > ConstRdataPtr
RRCollator(const AddRRsetCallback &callback)
Constructor.
static const RRType & RRSIG()
The RRClass class encapsulates DNS resource record classes.
boost::function< void(const RRsetPtr &rrset)> AddRRsetCallback
Callback functor type for RRCollator.
void addRR(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &rrttl, const RdataPtr &rdata)
AddRRCallback getCallback()
Return MasterLoader compatible callback.
The RRTTL class encapsulates TTLs used in DNS resource records.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Impl(const AddRRsetCallback &callback)
The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional R...
The RRType class encapsulates DNS resource record types.
boost::shared_ptr< RdataIterator > RdataIteratorPtr
A pointer-like type point to an RdataIterator object.
boost::shared_ptr< const AbstractRRset > ConstRRsetPtr
A pointer-like type pointing to an (immutable) RRset object.
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
void flush()
Call the callback on the remaining RRset, if any.
boost::shared_ptr< Rdata > RdataPtr
The RdataPtr type is a pointer-like type, pointing to an object of some concrete derived class of Rda...