libb10_cc_la_SOURCES += logger.cc logger.h
nodist_libb10_cc_la_SOURCES = cc_messages.cc cc_messages.h
libb10_cc_la_LIBADD = $(top_builddir)/src/lib/log/libb10-log.la
+nodist_libb10_cc_la_SOURCES += proto_defs.cc proto_defs.h
CLEANFILES = *.gcno *.gcda session_config.h cc_messages.cc cc_messages.h
cc_messages.cc cc_messages.h: cc_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/cc/cc_messages.mes
-BUILT_SOURCES = session_config.h cc_messages.cc cc_messages.h
+BUILT_SOURCES = session_config.h cc_messages.cc cc_messages.h proto_defs.h
+
+proto_defs.h: $(top_srcdir)/src/lib/util/python/const2hdr.py proto_defs.cc
+ $(PYTHON) $(top_srcdir)/src/lib/util/python/const2hdr.py $(srcdir)/proto_defs.cc $@
EXTRA_DIST = cc_messages.mes
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include <util/common_defs.h>
+#include <cc/proto_defs.h>
namespace isc {
-namespace util {
+namespace cc {
-// Aside from defining the values for the C++ util library, this file is also
+// Aside from defining the values for the C++ library, this file is also
// used as direct input of the generator of the python counterpart. Please,
// keep the syntax here simple and check the generated file
-// (lib/python/isc/util/common_defs.py) is correct and sane.
+// (lib/python/isc/cc/proto_defs.py) is correct and sane.
// The constants used in the CC protocol
// First the header names
ElementPtr env = Element::createMap();
const long int nseq = ++impl_->sequence_;
- env->set(isc::util::CC_HEADER_TYPE,
- Element::create(isc::util::CC_COMMAND_SEND));
- env->set(isc::util::CC_HEADER_FROM, Element::create(impl_->lname_));
- env->set(isc::util::CC_HEADER_TO, Element::create(to));
- env->set(isc::util::CC_HEADER_GROUP, Element::create(group));
- env->set(isc::util::CC_HEADER_INSTANCE, Element::create(instance));
- env->set(isc::util::CC_HEADER_SEQ, Element::create(nseq));
- env->set(isc::util::CC_HEADER_WANT_ANSWER, Element::create(want_answer));
+ env->set(CC_HEADER_TYPE,
+ Element::create(CC_COMMAND_SEND));
+ env->set(CC_HEADER_FROM, Element::create(impl_->lname_));
+ env->set(CC_HEADER_TO, Element::create(to));
+ env->set(CC_HEADER_GROUP, Element::create(group));
+ env->set(CC_HEADER_INSTANCE, Element::create(instance));
+ env->set(CC_HEADER_SEQ, Element::create(nseq));
+ env->set(CC_HEADER_WANT_ANSWER, Element::create(want_answer));
sendmsg(env, msg);
return (nseq);
#include <cc/data.h>
#include <cc/session_config.h>
-
-#include <util/common_defs.h>
+#include <cc/proto_defs.h>
#include <exceptions/exceptions.h>
virtual int group_sendmsg(isc::data::ConstElementPtr msg,
std::string group,
std::string instance =
- isc::util::CC_INSTANCE_WILDCARD,
- std::string to =
- isc::util::CC_TO_WILDCARD,
+ CC_INSTANCE_WILDCARD,
+ std::string to = CC_TO_WILDCARD,
bool want_answer = false) = 0;
virtual bool group_recvmsg(isc::data::ConstElementPtr& envelope,
isc::data::ConstElementPtr& msg,
SUBDIRS = . tests
python_PYTHON = __init__.py data.py session.py message.py
+nodist_python_PYTHON = proto_defs.py
+BUILT_SOURCES = proto_defs.py
+
+proto_defs.py: $(top_srcdir)/src/lib/cc/proto_defs.cc \
+ $(top_srcdir)/src/lib/util/python/pythonize_constants.py
+ $(PYTHON) $(top_srcdir)/src/lib/util/python/pythonize_constants.py \
+ $(top_srcdir)/src/lib/cc/proto_defs.cc $@
+
pythondir = $(pyexecdir)/isc/cc
import bind10_config
import isc.cc.message
-from isc.util.common_defs import *
+from isc.cc.proto_defs import *
class ProtocolError(Exception): pass
class NetworkError(Exception): pass
SUBDIRS = . cio tests
-python_PYTHON = __init__.py process.py socketserver_mixin.py file.py \
- common_defs.py
-BUILT_SOURCES = common_defs.py
-EXTRA_DIST = pythonize_constants.py
-
-common_defs.py: $(top_srcdir)/src/lib/util/common_defs.cc pythonize_constants.py
- $(PYTHON) $(srcdir)/pythonize_constants.py $(top_srcdir)/src/lib/util/common_defs.cc $@
+python_PYTHON = __init__.py process.py socketserver_mixin.py file.py
pythondir = $(pyexecdir)/isc/util
libb10_util_la_SOURCES += memory_segment.h
libb10_util_la_SOURCES += memory_segment_local.h memory_segment_local.cc
libb10_util_la_SOURCES += range_utilities.h
-libb10_util_la_SOURCES += common_defs.h common_defs.cc
libb10_util_la_SOURCES += hash/sha1.h hash/sha1.cc
libb10_util_la_SOURCES += encode/base16_from_binary.h
libb10_util_la_SOURCES += encode/base32hex.h encode/base64.h
libb10_util_la_SOURCES += random/qid_gen.h random/qid_gen.cc
libb10_util_la_SOURCES += random/random_number_generator.h
-EXTRA_DIST = python/pycppwrapper_util.h const2hdr.py
-BUILT_SOURCES = common_defs.h
-
-common_defs.h: const2hdr.py common_defs.cc
- $(PYTHON) $(srcdir)/const2hdr.py $(srcdir)/common_defs.cc $@
-
+EXTRA_DIST = python/pycppwrapper_util.h
libb10_util_la_LIBADD = $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
CLEANFILES = *.gcno *.gcda
-noinst_SCRIPTS = gen_wiredata.py mkpywrapper.py
+noinst_SCRIPTS = gen_wiredata.py mkpywrapper.py const2hdr.py \
+ pythonize_constants.py