]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2435] Return a isc::datasrc::RRsetCollectionBase in ZoneUpdater::getRRsetCollection()
authorMukund Sivaraman <muks@isc.org>
Tue, 15 Jan 2013 06:28:08 +0000 (11:58 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 15 Jan 2013 06:28:16 +0000 (11:58 +0530)
src/lib/datasrc/database.cc
src/lib/datasrc/rrset_collection_base.h
src/lib/datasrc/tests/database_unittest.cc
src/lib/datasrc/tests/master_loader_callbacks_test.cc
src/lib/datasrc/tests/zone_loader_unittest.cc
src/lib/datasrc/zone.h
src/lib/dns/rrset_collection_base.h

index 093f579f25810f6350a34d92f8554fde6783930c..567539e1b5afa9bd937bb5b65fd2f30281ab07be 100644 (file)
@@ -1436,7 +1436,7 @@ public:
 
     virtual ZoneFinder& getFinder() { return (*finder_); }
 
-    virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
+    virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
         if (!rrset_collection_) {
             // This is only assigned the first time and remains for the
             // lifetime of the DatabaseUpdater.
index 2a0845c80a99f777d408a334b5dfb72f313e5e94..0e20d74273497466ac1d5469e4fecaaaf072484a 100644 (file)
@@ -22,6 +22,9 @@
 namespace isc {
 namespace datasrc {
 
+/// \brief A forward declaration
+class ZoneUpdater;
+
 /// \brief datasrc derivation of \c isc::dns::RRsetCollectionBase.
 ///
 /// This is an abstract class that adds datasrc related detail to
@@ -67,6 +70,13 @@ private:
     isc::dns::RRClass rrclass_;
 };
 
+/// \brief A pointer-like type pointing to an
+/// \c isc::datasrc::RRsetCollectionBase object.
+///
+/// This type is used to handle RRsetCollections in a polymorphic manner
+/// in libdatasrc.
+typedef boost::shared_ptr<isc::datasrc::RRsetCollectionBase> RRsetCollectionPtr;
+
 } // end of namespace datasrc
 } // end of namespace isc
 
index 7d9b1b148aa127c6a223de88e9ff240979f2b66e..91249160e3aaac5ce9ddc1bff8e72dc221794c29 100644 (file)
@@ -4172,7 +4172,7 @@ public:
     {}
 
     ZoneUpdaterPtr updater;
-    RRsetCollectionBase& collection;
+    isc::datasrc::RRsetCollectionBase& collection;
 };
 
 TYPED_TEST(RRsetCollectionTest, find) {
index fb4487ad486b53c64118af3b100c1798eefde687..dc444615891204eadf240c5f180e6879b4a7a320 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual ZoneFinder& getFinder() {
         isc_throw(isc::NotImplemented, "Not to be called in this test");
     }
-    virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
+    virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
         isc_throw(isc::NotImplemented, "Not to be called in this test");
     }
     virtual void deleteRRset(const isc::dns::AbstractRRset&) {
index bff2b29c3997a9a2492555182a57d6d20d8fefd1..943ea2fbfd70b92a12030c16f478678edca21c8a 100644 (file)
@@ -89,7 +89,7 @@ public:
     virtual ZoneFinder& getFinder() {
         return (finder_);
     }
-    virtual isc::dns::RRsetCollectionBase& getRRsetCollection() {
+    virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() {
         isc_throw(isc::NotImplemented, "Method not used in tests");
     }
     virtual void addRRset(const isc::dns::AbstractRRset& rrset) {
index 36651d4f1191920f40971dd2d0fbe3e544a3f63d..8aaf9a21589e285d4813eab259cb07a4cb8b4fe2 100644 (file)
 #include <dns/name.h>
 #include <dns/rrset.h>
 #include <dns/rrtype.h>
-#include <dns/rrset_collection_base.h>
 
 #include <datasrc/exceptions.h>
 #include <datasrc/result.h>
+#include <datasrc/rrset_collection_base.h>
 
 #include <utility>
 #include <vector>
@@ -741,6 +741,9 @@ typedef boost::shared_ptr<ZoneFinder::Context> ZoneFinderContextPtr;
 /// \c ZoneFinder::Context object.
 typedef boost::shared_ptr<ZoneFinder::Context> ConstZoneFinderContextPtr;
 
+/// \brief A forward declaration
+class RRsetCollectionBase;
+
 /// The base class to make updates to a single zone.
 ///
 /// On construction, each derived class object will start a "transaction"
@@ -806,7 +809,7 @@ public:
     /// Return an RRsetCollection for the updater.
     ///
     /// This method returns an \c RRsetCollection for the updater,
-    /// implementing the \c isc::dns::RRsetCollectionBase
+    /// implementing the \c isc::datasrc::RRsetCollectionBase
     /// interface. Typically, the returned \c RRsetCollection is a
     /// singleton for its \c ZoneUpdater. The returned RRsetCollection
     /// object must not be used after its corresponding \c ZoneUpdater
@@ -819,7 +822,7 @@ public:
     /// of the \c Zonefinder returned by \c getFinder() with regards to
     /// adding and deleting RRsets via \c addRRset() and \c
     /// deleteRRset().
-    virtual isc::dns::RRsetCollectionBase& getRRsetCollection() = 0;
+    virtual isc::datasrc::RRsetCollectionBase& getRRsetCollection() = 0;
 
     /// Add an RRset to a zone via the updater
     ///
index f7573216492a9db7c16e639893035b909b5b41cb..b00435d7492c123279a9c10a5911d50afd6236e4 100644 (file)
@@ -171,12 +171,6 @@ public:
     }
 };
 
-/// \brief A pointer-like type pointing to an \c RRsetCollection object.
-///
-/// This type is used to handle RRsetCollections in a polymorphic manner
-/// in the BIND 10 codebase.
-typedef boost::shared_ptr<RRsetCollectionBase> RRsetCollectionPtr;
-
 } // end of namespace dns
 } // end of namespace isc