From: Mukund Sivaraman Date: Mon, 24 Sep 2012 05:41:26 +0000 (+0530) Subject: [2218] Rename InMemoryClient::findZone2() to ::findZoneData() X-Git-Tag: trac2351_base~37^2~1^2~3^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7bd7d6ceafd9ba44c953835b6bea33d5f54b32c;p=thirdparty%2Fkea.git [2218] Rename InMemoryClient::findZone2() to ::findZoneData() Also make it non-const and non-virtual. --- diff --git a/src/lib/datasrc/memory/memory_client.cc b/src/lib/datasrc/memory/memory_client.cc index 3aee0be999..bd71925518 100644 --- a/src/lib/datasrc/memory/memory_client.cc +++ b/src/lib/datasrc/memory/memory_client.cc @@ -699,7 +699,7 @@ InMemoryClient::findZone(const isc::dns::Name& zone_name) const { } isc::datasrc::memory::ZoneTable::FindResult -InMemoryClient::findZone2(const isc::dns::Name& zone_name) const { +InMemoryClient::findZoneData(const isc::dns::Name& zone_name) { ZoneTable::FindResult result(impl_->zone_table_->findZone(zone_name)); return (result); } diff --git a/src/lib/datasrc/memory/memory_client.h b/src/lib/datasrc/memory/memory_client.h index 34d737b7bc..7b7e36f711 100644 --- a/src/lib/datasrc/memory/memory_client.h +++ b/src/lib/datasrc/memory/memory_client.h @@ -209,12 +209,13 @@ public: virtual isc::datasrc::DataSourceClient::FindResult findZone(const isc::dns::Name& name) const; - /// Returns a \c ZoneTable result that best matches the given name. + /// Returns a \c ZoneData in the result that best matches the given + /// name. /// /// This derived version of the method never throws an exception. /// For other details see \c DataSourceClient::findZone(). - virtual isc::datasrc::memory::ZoneTable::FindResult - findZone2(const isc::dns::Name& name) const; + isc::datasrc::memory::ZoneTable::FindResult + findZoneData(const isc::dns::Name& name); /// \brief Implementation of the getIterator method virtual isc::datasrc::ZoneIteratorPtr diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc index 03c1ba635b..41e6b922e6 100644 --- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc +++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc @@ -248,7 +248,7 @@ TEST_F(MemoryClientTest, loadReloadZone) { EXPECT_EQ(1, client_->getZoneCount()); isc::datasrc::memory::ZoneTable::FindResult - result(client_->findZone2(Name("example.org"))); + result(client_->findZoneData(Name("example.org"))); EXPECT_EQ(result::SUCCESS, result.code); EXPECT_NE(static_cast(NULL), result.zone_data); @@ -276,7 +276,7 @@ TEST_F(MemoryClientTest, loadReloadZone) { EXPECT_EQ(1, client_->getZoneCount()); isc::datasrc::memory::ZoneTable::FindResult - result2(client_->findZone2(Name("example.org"))); + result2(client_->findZoneData(Name("example.org"))); EXPECT_EQ(result::SUCCESS, result2.code); EXPECT_NE(static_cast(NULL), result2.zone_data); @@ -675,18 +675,18 @@ TEST_F(MemoryClientTest, add) { EXPECT_EQ(ConstRRsetPtr(), iterator->getNextRRset()); } -TEST_F(MemoryClientTest, findZone2) { +TEST_F(MemoryClientTest, findZoneData) { client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-rrsigs.zone"); isc::datasrc::memory::ZoneTable::FindResult - result(client_->findZone2(Name("example.com"))); + result(client_->findZoneData(Name("example.com"))); EXPECT_EQ(result::NOTFOUND, result.code); EXPECT_EQ(static_cast(NULL), result.zone_data); isc::datasrc::memory::ZoneTable::FindResult - result2(client_->findZone2(Name("example.org"))); + result2(client_->findZoneData(Name("example.org"))); EXPECT_EQ(result::SUCCESS, result2.code); EXPECT_NE(static_cast(NULL), result2.zone_data);