BIND 10 trac2376, updated. b951d94c2d889e6d014ffd8bf54cc9231bfc4c0b [2376] Interface of the context

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Nov 6 18:17:16 UTC 2012


The branch, trac2376 has been updated
       via  b951d94c2d889e6d014ffd8bf54cc9231bfc4c0b (commit)
      from  e33baaa189941b25d707a28cda18e9715bbc12f0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b951d94c2d889e6d014ffd8bf54cc9231bfc4c0b
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Tue Nov 6 19:14:34 2012 +0100

    [2376] Interface of the context
    
    And some internal variables that'll be needed. But nearly no real code
    yet, waiting for tests to be first.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/Makefile.am                        |    1 +
 .../common.cc => lib/datasrc/loader_context.cc}    |    8 +++-
 .../loader_context.h}                              |   44 +++++++++++---------
 3 files changed, 31 insertions(+), 22 deletions(-)
 copy src/{bin/resolver/common.cc => lib/datasrc/loader_context.cc} (91%)
 copy src/lib/{python/isc/datasrc/configurableclientlist_python.h => datasrc/loader_context.h} (50%)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/Makefile.am b/src/lib/datasrc/Makefile.am
index eccc147..ca8b0d2 100644
--- a/src/lib/datasrc/Makefile.am
+++ b/src/lib/datasrc/Makefile.am
@@ -35,6 +35,7 @@ libb10_datasrc_la_SOURCES += database.h database.cc
 libb10_datasrc_la_SOURCES += factory.h factory.cc
 libb10_datasrc_la_SOURCES += client_list.h client_list.cc
 libb10_datasrc_la_SOURCES += memory_datasrc.h memory_datasrc.cc
+libb10_datasrc_la_SOURCES += loader_context.h loader_context.cc
 nodist_libb10_datasrc_la_SOURCES = datasrc_messages.h datasrc_messages.cc
 libb10_datasrc_la_LDFLAGS = -no-undefined -version-info 1:0:1
 
diff --git a/src/lib/datasrc/loader_context.cc b/src/lib/datasrc/loader_context.cc
new file mode 100644
index 0000000..5796271
--- /dev/null
+++ b/src/lib/datasrc/loader_context.cc
@@ -0,0 +1,21 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#include <datasrc/loader_context.h>
+
+namespace isc {
+namespace datasrc {
+
+}
+}
diff --git a/src/lib/datasrc/loader_context.h b/src/lib/datasrc/loader_context.h
new file mode 100644
index 0000000..c31cad4
--- /dev/null
+++ b/src/lib/datasrc/loader_context.h
@@ -0,0 +1,48 @@
+// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+#ifndef DATASRC_LOADER_CONTEXT
+#define DATASRC_LOADER_CONTEXT
+
+#include <dns/master_loader.h>
+
+#include <boost/noncopyable.hpp>
+
+namespace isc {
+namespace datasrc {
+
+class ZoneUpdater;
+
+class LoaderContext : public isc::dns::MasterLoaderContextBase,
+    boost::noncopyable {
+public:
+    LoaderContext(ZoneUpdater& updater);
+    virtual void addRRset(const isc::dns::RRsetPtr& rrset);
+    virtual isc::dns::LoaderCallbacks& getCallbacks() const {
+        return (callbacks_);
+    }
+private:
+    void handleError(const std::string& source, size_t line, size_t byte,
+                     const std::string& reason);
+    void handleWarning(const std::string& source, size_t line, size_t byte,
+                       const std::string& reason);
+    mutable isc::dns::LoaderCallbacks callbacks_;
+    ZoneUpdater& updater_;
+    bool ok_;
+};
+
+}
+}
+
+#endif // DATASRC_LOADER_CONTEXT



More information about the bind10-changes mailing list