Browse Source

[1206] forgot to commit these doc additions

Jelte Jansen 13 years ago
parent
commit
5e14c4caaf

+ 2 - 0
src/lib/datasrc/factory.cc

@@ -19,6 +19,8 @@
 #include "sqlite3_accessor.h"
 #include "memory_datasrc.h"
 
+#include <datasrc/logger.h>
+
 #include <dlfcn.h>
 
 using namespace isc::data;

+ 19 - 0
src/lib/datasrc/memory_datasrc.h

@@ -286,8 +286,27 @@ private:
     InMemoryClientImpl* impl_;
 };
 
+/// \brief Creates an instance of the Memory datasource client
+///
+/// Currently the configuration passed here must be a MapElement, formed as
+/// follows:
+/// \code
+/// { "type": string ("memory"),
+///   "class": string ("IN"/"CH"/etc),
+///   "zones": list
+/// }
+/// Zones list is a list of maps:
+/// { "origin": string,
+///   "file": string
+/// }
+/// \endcode
+/// (i.e. the configuration that was used prior to the datasource refactor)
+///
+/// This configuration setup is currently under discussion and will change in
+/// the near future.
 extern "C" DataSourceClient* createInstance(isc::data::ConstElementPtr config);
 
+/// \brief Destroy the instance created by createInstance()
 extern "C" void destroyInstance(DataSourceClient* instance);
 
 

+ 1 - 1
src/lib/datasrc/sqlite3_accessor.cc

@@ -674,7 +674,7 @@ addError(ElementPtr errors, const std::string& error) {
 bool
 checkConfig(ConstElementPtr config, ElementPtr errors) {
     /* Specific configuration is under discussion, right now this accepts
-     * the 'old' configuration, see [TODO]
+     * the 'old' configuration, see header file
      */
     bool result = true;
 

+ 8 - 0
src/lib/datasrc/sqlite3_accessor.h

@@ -189,8 +189,16 @@ private:
     const std::string database_name_;
 };
 
+/// \brief Creates an instance of the SQlite3 datasource client
+///
+/// Currently the configuration passed here must be a MapElement, containing
+/// one item called "database_file", whose value is a string
+///
+/// This configuration setup is currently under discussion and will change in
+/// the near future.
 extern "C" DataSourceClient* createInstance(isc::data::ConstElementPtr config);
 
+/// \brief Destroy the instance created by createInstance()
 extern "C" void destroyInstance(DataSourceClient* instance);
 
 }