1 // Copyright (C) 2011-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 // BEGIN_HEADER_GUARD
8 
9 #include <stdint.h>
10 
11 #include <string>
12 
13 #include <dns/name.h>
14 #include <dns/rrtype.h>
15 #include <dns/rrttl.h>
16 #include <dns/rdata.h>
17 
18 // BEGIN_ISC_NAMESPACE
19 
20 // BEGIN_COMMON_DECLARATIONS
21 // END_COMMON_DECLARATIONS
22 
23 // BEGIN_RDATA_NAMESPACE
24 
25 namespace detail {
26 template <class Type, uint16_t typeCode> class DSLikeImpl;
27 }
28 
29 /// \brief \c rdata::generic::DLV class represents the DLV RDATA as defined in
30 /// RFC4431.
31 ///
32 /// This class implements the basic interfaces inherited from the abstract
33 /// \c rdata::Rdata class, and provides trivial accessors specific to the
34 /// DLV RDATA.
35 class DLV : public Rdata {
36 public:
37     // BEGIN_COMMON_MEMBERS
38     // END_COMMON_MEMBERS
39 
40     /// \brief Assignment operator.
41     ///
42     /// It internally allocates a resource, and if it fails a corresponding
43     /// standard exception will be thrown.
44     /// This operator never throws an exception otherwise.
45     ///
46     /// This operator provides the strong exception guarantee: When an
47     /// exception is thrown the content of the assignment target will be
48     /// intact.
49     DLV& operator=(const DLV& source);
50 
51     /// \brief The destructor.
52     ~DLV();
53 
54     /// \brief Return the value of the Tag field.
55     ///
56     /// This method never throws an exception.
57     uint16_t getTag() const;
58 private:
59     typedef detail::DSLikeImpl<DLV, 32769> DLVImpl;
60     DLVImpl* impl_;
61 };
62 
63 // END_RDATA_NAMESPACE
64 // END_ISC_NAMESPACE
65 // END_HEADER_GUARD
66 
67 // Local Variables:
68 // mode: c++
69 // End:
70