catalog: implement catalog driver and facade
This commit also refactories the QueryAdapter's code, adds corresponding
unit-test. Catalog-adapter and catalog do not use template, so the definition
are moved to corresponding cpp files.
refs: #2599, #2600
Change-Id: I2be492ec3c2538e865bfa7c09ac8cd49e2a9527d
diff --git a/wscript b/wscript
index 3388a06..d348f4a 100644
--- a/wscript
+++ b/wscript
@@ -79,7 +79,9 @@
" (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
return
- conf.write_config_header('config.h')
+ conf.define('DEFAULT_CONFIG_FILE', '%s/ndn-atmos/catalog.conf' % conf.env['SYSCONFDIR'])
+
+ conf.write_config_header('config.hpp')
def build (bld):
ndn_atmos_objects = bld(
@@ -88,18 +90,27 @@
features='cxx',
source=bld.path.ant_glob(['catalog/src/**/*.cpp'],
excl=['catalog/src/main.cpp']),
- use='NDN_CXX BOOST SYNC JSON MYSQL',
+ use='NDN_CXX BOOST JSON MYSQL',
includes='catalog/src .',
export_includes='catalog/src .'
)
bld(
- target='bin/ndn-atmos',
+ target='bin/atmos-catalog',
features='cxx cxxprogram',
source='catalog/src/main.cpp',
use='ndn_atmos_objects'
)
+ bld.recurse('tools')
+
# Catalog unit tests
if bld.env['WITH_TESTS']:
bld.recurse('catalog/tests')
+
+ bld(
+ features="subst",
+ source='catalog.conf.sample.in',
+ target='catalog.conf.sample',
+ install_path="${SYSCONFDIR}/ndn-atmos"
+ )