Parcourir la source

[2096] Remove unused definitions

The testing support of the encoder was moved to the tests, so no need
for the definitions in header file.
Michal 'vorner' Vaner il y a 12 ans
Parent
commit
909df7ac12

+ 0 - 32
src/lib/datasrc/memory/rdata_encoder.h

@@ -266,38 +266,6 @@ private:
     RdataEncoderImpl* impl_;
 };
 
-// We use the following quick-hack version of "foreach"
-// operators until we implement the complete versions.  The plan is to
-// update the test cases that use these functions with the complete
-// functions/classes, and then remove the entire namespace.
-namespace testing {
-// Callbacks used in foreachRdataField.
-typedef boost::function<void(const dns::LabelSequence&,
-                             RdataNameAttributes)> NameCallback;
-typedef boost::function<void(const uint8_t*, size_t)> DataCallback;
-
-// Iterate over each field (in terms of the internal encoding) of each
-// RDATA stored in encoded_data, and call the given callback for each
-// data (for domain name fields, name_callback will be called; for
-// normal data fields data_callback will be called).  rdata_count is
-// the number of RDATAs.  If the encoded data contain variable-length
-// data fields, varlen_list should store a sequence of their lengths,
-// in the order of the appearance.
-void foreachRdataField(dns::RRClass rrclass, dns::RRType rrtype,
-                       size_t rdata_count,
-                       const std::vector<uint8_t>& encoded_data,
-                       const std::vector<uint16_t>& varlen_list,
-                       NameCallback name_callback, DataCallback data_callback);
-
-// Iterate over each RRSIG stored in encoded_data, and call the given
-// callback for each.  rrsiglen_list should store a sequence of their lengths,
-// in the order of the appearance.  Its size is the number of RRSIGs.
-// The list can be empty, in which case this function does nothing.
-void foreachRRSig(const std::vector<uint8_t>& encoded_data,
-                  const std::vector<uint16_t>& rrsiglen_list,
-                  DataCallback data_callback);
-}
-
 } // namespace memory
 } // namespace datasrc
 } // namespace isc

+ 3 - 4
src/lib/datasrc/memory/tests/rdata_serialization_unittest.cc

@@ -47,7 +47,6 @@
 using namespace isc::dns;
 using namespace isc::dns::rdata;
 using namespace isc::datasrc::memory;
-using namespace isc::datasrc::memory::testing;
 
 using isc::util::unittests::matchWireData;
 using std::string;
@@ -193,8 +192,8 @@ public:
                                   size_t rdata_count,
                                   const vector<uint8_t>& encoded_data,
                                   const vector<uint16_t>& varlen_list,
-                                  NameCallback name_callback,
-                                  DataCallback data_callback)
+                                  RdataReader::NameAction name_callback,
+                                  RdataReader::DataAction data_callback)
     {
         const RdataEncodeSpec& encode_spec = getRdataEncodeSpec(rrclass,
                                                                 rrtype);
@@ -243,7 +242,7 @@ public:
 
     static void foreachRRSig(const vector<uint8_t>& encoded_data,
                              const vector<uint16_t>& rrsiglen_list,
-                             DataCallback data_callback)
+                             RdataReader::DataAction data_callback)
     {
         size_t rrsig_totallen = 0;
         for (vector<uint16_t>::const_iterator it = rrsiglen_list.begin();