Kea 2.7.5
d2_zone.h
Go to the documentation of this file.
1// Copyright (C) 2013-2021 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 D2_ZONE_H
8#define D2_ZONE_H
9
10#include <dns/name.h>
11#include <dns/rrclass.h>
12
13#include <boost/shared_ptr.hpp>
14
15namespace isc {
16namespace d2 {
17
32class D2Zone {
33public:
38 D2Zone(const dns::Name& name, const dns::RRClass& rrclass);
39
43
44
47 const dns::Name& getName() const { return (name_); }
48
52 const dns::RRClass& getClass() const { return (rrclass_); }
54
61 std::string toText() const;
62
66
67
73 bool operator==(const D2Zone& rhs) const {
74 return ((rrclass_ == rhs.rrclass_) && (name_ == rhs.name_));
75 }
76
83 bool operator!=(const D2Zone& rhs) const {
84 return (!operator==(rhs));
85 }
87
88private:
89 dns::Name name_;
90 dns::RRClass rrclass_;
91};
92
93typedef boost::shared_ptr<D2Zone> D2ZonePtr;
94
104std::ostream& operator<<(std::ostream& os, const D2Zone& zone);
105
106} // namespace d2
107} // namespace isc
108
109#endif // D2_ZONE_H
The D2Zone encapsulates the Zone section in DNS Update message.
Definition d2_zone.h:32
std::string toText() const
Returns text representation of the Zone.
Definition d2_zone.cc:18
bool operator!=(const D2Zone &rhs) const
Inequality operator to compare D2Zone objects in query and response messages.
Definition d2_zone.h:83
const dns::RRClass & getClass() const
Returns the Zone class.
Definition d2_zone.h:52
bool operator==(const D2Zone &rhs) const
Equality operator to compare D2Zone objects in query and response messages.
Definition d2_zone.h:73
const dns::Name & getName() const
Returns the Zone name.
Definition d2_zone.h:47
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition d2_zone.cc:14
The Name class encapsulates DNS names.
Definition name.h:219
The RRClass class encapsulates DNS resource record classes.
Definition rrclass.h:89
boost::shared_ptr< D2Zone > D2ZonePtr
Definition d2_zone.h:93
Defines the logger used by the top-level component of kea-lfc.