From: JINMEI Tatuya Date: Wed, 5 Dec 2012 03:52:22 +0000 (-0800) Subject: [2442] documentation updates X-Git-Tag: bind10-1.0.0-beta-release~39^2~3^2~1^2~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de92f31ea5fc5991e10bc61c175373b67f78deab;p=thirdparty%2Fkea.git [2442] documentation updates --- diff --git a/src/lib/dns/rdata/generic/detail/char_string.h b/src/lib/dns/rdata/generic/detail/char_string.h index b5dc338e96..702af04ed5 100644 --- a/src/lib/dns/rdata/generic/detail/char_string.h +++ b/src/lib/dns/rdata/generic/detail/char_string.h @@ -32,6 +32,22 @@ namespace detail { /// be the bare char basis. typedef std::vector CharString; +/// \brief Convert a DNS character-string into corresponding binary data. +/// +/// This helper function takes a string object that is expected to be a +/// textual representation of a valid DNS character-string, and dumps +/// the corresponding binary sequence in the given placeholder (passed +/// via the \c result parameter). It handles escape notations of +/// character-strings with a backslash ('\'), and checks the length +/// restriction. +/// +/// \throw CharStringTooLong The resulting binary data are too large for a +/// valid character-string. +/// \throw InvalidRdataText Other syntax errors. +/// +/// \brief str_region A string that represents a character-string. +/// \brief result A placeholder vector where the resulting data are to be +/// stored. Expected to be empty, but it's not checked. void strToCharString(const MasterToken::StringRegion& str_region, CharString& result); diff --git a/src/lib/dns/rdata/generic/detail/txt_like.h b/src/lib/dns/rdata/generic/detail/txt_like.h index 1ea73b3748..9d90f403e6 100644 --- a/src/lib/dns/rdata/generic/detail/txt_like.h +++ b/src/lib/dns/rdata/generic/detail/txt_like.h @@ -100,6 +100,16 @@ public: } } + /// \brief Constructor using the master lexer. + /// + /// This implementation only uses the \c lexer parameters; others are + /// ignored. + /// + /// \throw CharStringTooLong the parameter string length exceeds maximum. + /// \throw InvalidRdataText the method cannot process the parameter data + /// + /// \param lexer A \c MasterLexer object parsing a master file for this + /// RDATA. TXTLikeImpl(MasterLexer& lexer, const Name*, MasterLoader::Options, MasterLoaderCallbacks&) { diff --git a/src/lib/dns/rdata/generic/spf_99.cc b/src/lib/dns/rdata/generic/spf_99.cc index 6be9ea5fde..94be9368a2 100644 --- a/src/lib/dns/rdata/generic/spf_99.cc +++ b/src/lib/dns/rdata/generic/spf_99.cc @@ -66,8 +66,16 @@ SPF::SPF(InputBuffer& buffer, size_t rdata_len) : impl_(new SPFImpl(buffer, rdata_len)) {} - -/// \brief Constructor from TBD +/// \brief Constructor using the master lexer. +/// +/// This implementation only uses the \c lexer parameters; others are +/// ignored. +/// +/// \throw CharStringTooLong the parameter string length exceeds maximum. +/// \throw InvalidRdataText the method cannot process the parameter data +/// +/// \param lexer A \c MasterLexer object parsing a master file for this +/// RDATA. SPF::SPF(MasterLexer& lexer, const Name* origin, MasterLoader::Options options, MasterLoaderCallbacks& callbacks) : impl_(new SPFImpl(lexer, origin, options, callbacks)) diff --git a/src/lib/dns/rdata/generic/txt_16.cc b/src/lib/dns/rdata/generic/txt_16.cc index 6e054d2e70..d35b4270d8 100644 --- a/src/lib/dns/rdata/generic/txt_16.cc +++ b/src/lib/dns/rdata/generic/txt_16.cc @@ -52,6 +52,16 @@ TXT::TXT(InputBuffer& buffer, size_t rdata_len) : impl_(new TXTImpl(buffer, rdata_len)) {} +/// \brief Constructor using the master lexer. +/// +/// This implementation only uses the \c lexer parameters; others are +/// ignored. +/// +/// \throw CharStringTooLong the parameter string length exceeds maximum. +/// \throw InvalidRdataText the method cannot process the parameter data +/// +/// \param lexer A \c MasterLexer object parsing a master file for this +/// RDATA. TXT::TXT(MasterLexer& lexer, const Name* origin, MasterLoader::Options options, MasterLoaderCallbacks& callbacks) : impl_(new TXTImpl(lexer, origin, options, callbacks))