Kea  1.9.9-git
d2_zone.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2015 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  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  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 
88 private:
89  dns::Name name_;
90  dns::RRClass rrclass_;
91 };
92 
93 typedef boost::shared_ptr<D2Zone> D2ZonePtr;
94 
104 std::ostream& operator<<(std::ostream& os, const D2Zone& zone);
105 
106 } // namespace d2
107 } // namespace isc
108 
109 #endif // D2_ZONE_H
The Name class encapsulates DNS names.
Definition: name.h:223
std::ostream & operator<<(std::ostream &os, const D2Params &config)
Dumps the contents of a D2Params as text to an output stream.
Definition: d2_config.cc:120
const dns::RRClass & getClass() const
Returns the Zone class.
Definition: d2_zone.h:52
boost::shared_ptr< D2Zone > D2ZonePtr
Definition: d2_zone.h:93
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
const dns::Name & getName() const
Returns the Zone name.
Definition: d2_zone.h:47
The D2Zone encapsulates the Zone section in DNS Update message.
Definition: d2_zone.h:32
Defines the logger used by the top-level component of kea-dhcp-ddns.
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition: d2_zone.cc:14
bool operator!=(const D2Zone &rhs) const
Inequality operator to compare D2Zone objects in query and response messages.
Definition: d2_zone.h:83
bool operator==(const D2Zone &rhs) const
Equality operator to compare D2Zone objects in query and response messages.
Definition: d2_zone.h:73
std::string toText() const
Returns text representation of the Zone.
Definition: d2_zone.cc:18