]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2207] Definition of the local zone updater
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 10 Oct 2012 11:44:53 +0000 (13:44 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 10 Oct 2012 11:44:53 +0000 (13:44 +0200)
src/lib/datasrc/memory/zone_updater.h

index 7bf33e69110a7c01ad0f14cd29712ba1476d0b27..2b97d97639c54b71d01694bf6b3ee432b4f4516c 100644 (file)
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
+#include <boost/function.hpp>
+
 namespace isc {
 namespace datasrc {
 namespace memory {
 
+// Forward declarations
+class ZoneData;
+class ZoneTableSegment;
+
 /// \brief Does an update to a zone.
 ///
 /// This abstract base class represents the work of a reload of a zone.
@@ -70,6 +76,26 @@ public:
     virtual void cleanup() = 0;
 };
 
+// TODO: Fully define this. It is supposed to be passed to the install_action
+// callback, but what does it actually represent? Is it the actuall zone data
+// there?
+class ZoneSegment {};
+// TODO: Somehow specify what the ID is
+class ZoneSegmentID {};
+
+typedef boost::function<void(ZoneData*)> LoadAction;
+typedef boost::function<ZoneData* (ZoneSegmentID, ZoneSegment*)> InstallAction;
+
+class ZoneUpdaterLocal : public ZoneUpdater {
+public:
+    ZoneUpdaterLocal(ZoneTableSegment* segment, const LoadAction& load_action,
+                     const InstallAction& install_action);
+    ~ ZoneUpdaterLocal();
+    virtual void load();
+    virtual void install();
+    virtual void cleanup();
+};
+
 }
 }
 }