libd2_la_SOURCES += d2_update_mgr.cc d2_update_mgr.h
libd2_la_SOURCES += d2_zone.cc d2_zone.h
libd2_la_SOURCES += dns_client.cc dns_client.h
-libd2_la_SOURCES += labeled_value.cc labeled_value.h
libd2_la_SOURCES += nc_add.cc nc_add.h
libd2_la_SOURCES += nc_remove.cc nc_remove.h
libd2_la_SOURCES += nc_trans.cc nc_trans.h
-libd2_la_SOURCES += state_model.cc state_model.h
libd2_la_SOURCES += d2_controller.cc d2_controller.h
nodist_libd2_la_SOURCES = d2_messages.h d2_messages.cc
- isc::d2::NameAddTransaction - carries out a @c NameChangeRequest to add entries
- isc::d2::NameRemoveTransaction - carries out a @c NameChangeRequest to remove entries
-- isc::d2::StateModel - abstract state model described in @ref d2StateModel
+- isc::util::StateModel - abstract state model described in @ref d2StateModel
The state models for these two transactions implement DDNS with conflict
resolution as described in <a href="https://tools.ietf.org/html/rfc4703">RFC 4703</a>.
@image html state_model_classes.svg "State Model Classes"
-- isc::d2::StateModel - provides the mechanics for executing a state model
+- isc::util::StateModel - provides the mechanics for executing a state model
described by a dictionary events and states. It provides methods to:
- initialize the model - constructs the dictionary of events and states
- start the model - sets the model to its initial state, posts a "start"
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
#include <sstream>
+using namespace isc::util;
+
namespace isc {
namespace d2 {
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
#include <exceptions/exceptions.h>
#include <d2/d2_cfg_mgr.h>
#include <d2/dns_client.h>
-#include <d2/state_model.h>
#include <dhcp_ddns/ncr_msg.h>
#include <dns/tsig.h>
+#include <util/state_model.h>
#include <boost/shared_ptr.hpp>
#include <map>
/// as needed, but it must support the common set. NameChangeTransaction
/// does not supply any state handlers. These are the sole responsibility of
/// derivations.
-class NameChangeTransaction : public DNSClient::Callback, public StateModel {
+class NameChangeTransaction : public DNSClient::Callback, public util::StateModel {
public:
//@{ States common to all transactions.
d2_unittests_SOURCES += d2_update_mgr_unittests.cc
d2_unittests_SOURCES += d2_zone_unittests.cc
d2_unittests_SOURCES += dns_client_unittests.cc
-d2_unittests_SOURCES += labeled_value_unittests.cc
d2_unittests_SOURCES += nc_add_unittests.cc
d2_unittests_SOURCES += nc_remove_unittests.cc
d2_unittests_SOURCES += nc_test_utils.cc nc_test_utils.h
d2_unittests_SOURCES += nc_trans_unittests.cc
-d2_unittests_SOURCES += state_model_unittests.cc
d2_unittests_SOURCES += d2_controller_unittests.cc
d2_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
using namespace isc::dhcp_ddns;
using namespace isc::d2;
using namespace isc::process;
+using namespace isc::util;
namespace {
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
using namespace std;
using namespace isc;
using namespace isc::d2;
+using namespace isc::util;
namespace {
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
using namespace std;
using namespace isc;
using namespace isc::d2;
+using namespace isc::util;
+
namespace {
using namespace std;
using namespace isc;
using namespace isc::d2;
+using namespace isc::util;
using namespace boost::posix_time;
namespace {
lib_LTLIBRARIES = libkea-util.la
libkea_util_la_SOURCES = boost_time_utils.h boost_time_utils.cc
+libkea_util_la_SOURCES += buffer.h io_utilities.h
libkea_util_la_SOURCES += csv_file.h csv_file.cc
libkea_util_la_SOURCES += filename.h filename.cc
-libkea_util_la_SOURCES += strutil.h strutil.cc
-libkea_util_la_SOURCES += buffer.h io_utilities.h
-libkea_util_la_SOURCES += time_utilities.h time_utilities.cc
+libkea_util_la_SOURCES += labeled_value.h labeled_value.cc
libkea_util_la_SOURCES += memory_segment.h
libkea_util_la_SOURCES += memory_segment_local.h memory_segment_local.cc
libkea_util_la_SOURCES += optional_value.h
libkea_util_la_SOURCES += range_utilities.h
libkea_util_la_SOURCES += signal_set.cc signal_set.h
libkea_util_la_SOURCES += staged_value.h
+libkea_util_la_SOURCES += state_model.cc state_model.h
libkea_util_la_SOURCES += stopwatch.cc stopwatch.h
libkea_util_la_SOURCES += stopwatch_impl.cc stopwatch_impl.h
+libkea_util_la_SOURCES += strutil.h strutil.cc
+libkea_util_la_SOURCES += time_utilities.h time_utilities.cc
libkea_util_la_SOURCES += versioned_csv_file.h versioned_csv_file.cc
libkea_util_la_SOURCES += watch_socket.cc watch_socket.h
libkea_util_la_SOURCES += encode/base16_from_binary.h
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#include <d2/labeled_value.h>
+#include <util/labeled_value.h>
namespace isc {
-namespace d2 {
+namespace util {
/**************************** LabeledValue ****************************/
return (std::string(UNDEFINED_LABEL));
}
-} // namespace isc::d2
+} // namespace isc::util
} // namespace isc
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// LabeledValueSet.
namespace isc {
-namespace d2 {
+namespace util {
/// @brief Thrown if an error is encountered handling a LabeledValue.
class LabeledValueError : public isc::Exception {
LabeledValueMap map_;
};
-} // namespace isc::d2
+} // namespace isc::util
} // namespace isc
#endif
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
-
-#include <d2/d2_log.h>
-#include <d2/state_model.h>
-
+#include <util/state_model.h>
+#include <boost/bind.hpp>
#include <string>
namespace isc {
-namespace d2 {
+namespace util {
/********************************** State *******************************/
return(stream.str());
}
-} // namespace isc::d2
+} // namespace isc::util
} // namespace isc
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// @file state_model.h This file defines the class StateModel.
#include <exceptions/exceptions.h>
-#include <d2/d2_config.h>
-#include <d2/dns_client.h>
-#include <d2/labeled_value.h>
-#include <dhcp_ddns/ncr_msg.h>
-
+#include <util/labeled_value.h>
+#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <map>
#include <string>
namespace isc {
-namespace d2 {
+namespace util {
/// @brief Thrown if the state machine encounters a general error.
class StateModelError : public isc::Exception {
/// @brief Defines a pointer to a StateModel.
typedef boost::shared_ptr<StateModel> StateModelPtr;
-} // namespace isc::d2
+} // namespace isc::util
} // namespace isc
#endif
run_unittests_SOURCES += filename_unittest.cc
run_unittests_SOURCES += hex_unittest.cc
run_unittests_SOURCES += io_utilities_unittest.cc
+run_unittests_SOURCES += labeled_value_unittest.cc
run_unittests_SOURCES += memory_segment_local_unittest.cc
run_unittests_SOURCES += memory_segment_common_unittest.h
run_unittests_SOURCES += memory_segment_common_unittest.cc
run_unittests_SOURCES += random_number_generator_unittest.cc
run_unittests_SOURCES += socketsession_unittest.cc
run_unittests_SOURCES += staged_value_unittest.cc
+run_unittests_SOURCES += state_model_unittest.cc
run_unittests_SOURCES += strutil_unittest.cc
run_unittests_SOURCES += time_utilities_unittest.cc
run_unittests_SOURCES += range_utilities_unittest.cc
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#include <d2/labeled_value.h>
+#include <util/labeled_value.h>
#include <gtest/gtest.h>
using namespace std;
using namespace isc;
-using namespace isc::d2;
+using namespace isc::util;
namespace {
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
#include <config.h>
-#include <d2/state_model.h>
+#include <util/state_model.h>
#include <boost/function.hpp>
#include <boost/bind.hpp>
using namespace std;
using namespace isc;
-using namespace isc::d2;
+using namespace isc::util;
namespace {