| Kea 3.0.2-git

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
15 namespace isc {
16 namespace d2 {
17
32 class D2Zone {
33 public:
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 }
86
87
88 private:
89 dns::Name name_;
90 dns::RRClass rrclass_;
91};
92
93 typedef 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
isc::d2::D2Zone
The D2Zone encapsulates the Zone section in DNS Update message.
Definition d2_zone.h:32
isc::d2::D2Zone::toText
std::string toText() const
Returns text representation of the Zone.
Definition d2_zone.cc:18
isc::d2::D2Zone::operator!=
bool operator!=(const D2Zone &rhs) const
Inequality operator to compare D2Zone objects in query and response messages.
Definition d2_zone.h:83
isc::d2::D2Zone::getClass
const dns::RRClass & getClass() const
Returns the Zone class.
Definition d2_zone.h:52
isc::d2::D2Zone::operator==
bool operator==(const D2Zone &rhs) const
Equality operator to compare D2Zone objects in query and response messages.
Definition d2_zone.h:73
isc::d2::D2Zone::getName
const dns::Name & getName() const
Returns the Zone name.
Definition d2_zone.h:47
isc::d2::D2Zone::D2Zone
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition d2_zone.cc:14
isc::dns::Name
The Name class encapsulates DNS names.
Definition name.h:219
isc::dns::RRClass
The RRClass class encapsulates DNS resource record classes.
Definition rrclass.h:89
name.h
isc::asiolink::operator<<
std::ostream & operator<<(std::ostream &os, const IOAddress &address)
Insert the IOAddress as a string into stream.
Definition io_address.cc:131
isc::d2
Definition check_exists_add.cc:19
isc::d2::D2ZonePtr
boost::shared_ptr< D2Zone > D2ZonePtr
Definition d2_zone.h:93
isc::dns::name
Definition name.cc:69
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
rrclass.h