Browse Source

[2207] Definition of the local zone updater

Michal 'vorner' Vaner 12 years ago
parent
commit
c887cb05e2
1 changed files with 26 additions and 0 deletions
  1. 26 0
      src/lib/datasrc/memory/zone_updater.h

+ 26 - 0
src/lib/datasrc/memory/zone_updater.h

@@ -12,10 +12,16 @@
 // 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();
+};
+
 }
 }
 }