BIND 10 trac2376-callbacks, updated. 04e4c63889638247dbc4ccf31ba5be3976748a94 [2376] Function declaration to create the callbacks

BIND 10 source code commits bind10-changes at lists.isc.org
Sat Nov 17 12:08:11 UTC 2012


The branch, trac2376-callbacks has been updated
       via  04e4c63889638247dbc4ccf31ba5be3976748a94 (commit)
      from  20288af37908427592b5ff2cddb7d3551aee31d0 (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 04e4c63889638247dbc4ccf31ba5be3976748a94
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Sat Nov 17 13:07:36 2012 +0100

    [2376] Function declaration to create the callbacks
    
    Including documentation, the implementation is not there yet.

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

Summary of changes:
 src/lib/datasrc/Makefile.am                        |    1 +
 .../common.cc => lib/datasrc/loader_callbacks.cc}  |    9 +++-
 src/lib/datasrc/loader_callbacks.h                 |   50 ++++++++++++++++++++
 3 files changed, 58 insertions(+), 2 deletions(-)
 copy src/{bin/resolver/common.cc => lib/datasrc/loader_callbacks.cc} (90%)
 create mode 100644 src/lib/datasrc/loader_callbacks.h

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/Makefile.am b/src/lib/datasrc/Makefile.am
index eccc147..53ffd06 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_callbacks.h loader_callbacks.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_callbacks.cc b/src/lib/datasrc/loader_callbacks.cc
new file mode 100644
index 0000000..abf02e8
--- /dev/null
+++ b/src/lib/datasrc/loader_callbacks.cc
@@ -0,0 +1,22 @@
+// 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_callbacks.h>
+
+namespace isc {
+namespace datasrc {
+
+
+}
+}
diff --git a/src/lib/datasrc/loader_callbacks.h b/src/lib/datasrc/loader_callbacks.h
new file mode 100644
index 0000000..85eb7a8
--- /dev/null
+++ b/src/lib/datasrc/loader_callbacks.h
@@ -0,0 +1,50 @@
+// 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_CALLBACKS_H
+#define DATASRC_LOADER_CALLBACKS_H
+
+#include <dns/loader_callbacks.h>
+
+namespace isc {
+namespace datasrc {
+
+class ZoneUpdater;
+
+/// \brief Create callbacks to fill loaded zone into updater.
+///
+/// This will create set of callbacks for the MasterLoader that
+/// will fill the loaded rrsets into a zone updater. If any issues
+/// are found, it logs them. If any of the issues are errors and
+/// the ok parameter is non-NULL, it is set to false.
+///
+/// \param updater The zone updater used as the destination for the
+///     RRsets. It should be opened in the replace mode and should
+///     be clean (no changes done to it). It is not commited
+///     automatically and it is up to the caller to commit (or not)
+///     when the loading is done.
+/// \param name Name of the zone. Used in logging.
+/// \param rrclass The class of the zone. Used in logging.
+/// \param ok If this is non-NULL and there are any errors during
+///     the loading, it is set to false. Otherwise, it is untouched.
+/// \return Set of callbacks to be passed to the master loader.
+/// \throw std::bad_alloc when allocation fails.
+dns::LoaderCallbacks
+createCallbacks(ZoneUpdater& updater, const dns::Name& name,
+                const dns::RRClass& rrclass, bool* ok);
+
+}
+}
+
+#endif



More information about the bind10-changes mailing list