]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5074] Files in libkea-process moved to isc::process namespace.
authorMarcin Siodelski <marcin@isc.org>
Thu, 1 Dec 2016 13:43:01 +0000 (14:43 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 1 Dec 2016 13:43:01 +0000 (14:43 +0100)
28 files changed:
src/bin/d2/d2_cfg_mgr.cc
src/bin/d2/d2_cfg_mgr.h
src/bin/d2/d2_config.cc
src/bin/d2/d2_config.h
src/bin/d2/d2_controller.cc
src/bin/d2/d2_controller.h
src/bin/d2/d2_process.cc
src/bin/d2/d2_process.h
src/bin/d2/main.cc
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/d2_controller_unittests.cc
src/bin/d2/tests/d2_process_unittests.cc
src/bin/d2/tests/d2_update_mgr_unittests.cc
src/lib/process/d_cfg_mgr.cc
src/lib/process/d_cfg_mgr.h
src/lib/process/d_controller.cc
src/lib/process/d_controller.h
src/lib/process/d_log.cc
src/lib/process/d_log.h
src/lib/process/d_process.h
src/lib/process/io_service_signal.cc
src/lib/process/io_service_signal.h
src/lib/process/process_messages.mes
src/lib/process/tests/d_cfg_mgr_unittests.cc
src/lib/process/tests/d_controller_unittests.cc
src/lib/process/tests/io_service_signal_unittests.cc
src/lib/process/testutils/d_test_stubs.cc
src/lib/process/testutils/d_test_stubs.h

index 61017839b137097ad8867ae45b08f91a64baaa34..0f30fbfaa4568bb282cb9f46e52527b0961bcbe0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
@@ -12,6 +12,8 @@
 
 #include <boost/foreach.hpp>
 
+using namespace isc::process;
+
 namespace isc {
 namespace d2 {
 
index 3a39786c03cae9a2d6d593a81a5cbf18420426aa..c79b7dd962e8b12d792abbcd17fcb4ad28e0835e 100644 (file)
@@ -30,7 +30,7 @@ typedef boost::shared_ptr<D2CfgContext> D2CfgContextPtr;
 /// and any other DHCP-DDNS specific information that needs to be accessible
 /// during configuration parsing as well as to the application as a whole.
 /// It is derived from the context base class, DCfgContextBase.
-class D2CfgContext : public DCfgContextBase {
+class D2CfgContext : public process::DCfgContextBase {
 public:
     /// @brief Constructor
     D2CfgContext();
@@ -41,8 +41,8 @@ public:
     /// @brief Creates a clone of this context object.
     ///
     /// @return returns a pointer to the new clone.
-    virtual DCfgContextBasePtr clone() {
-        return (DCfgContextBasePtr(new D2CfgContext(*this)));
+    virtual process::DCfgContextBasePtr clone() {
+        return (process::DCfgContextBasePtr(new D2CfgContext(*this)));
     }
 
     /// @brief Fetches a reference to the D2Params
@@ -103,7 +103,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr;
 /// configuration.  This includes services for parsing sets of configuration
 /// values, storing the parsed information in its converted form,
 /// and retrieving the information on demand.
-class D2CfgMgr : public DCfgMgrBase {
+class D2CfgMgr : public process::DCfgMgrBase {
 public:
     /// @brief Reverse zone suffix added to IPv4 addresses for reverse lookups
     /// @todo This should be configurable.
@@ -294,7 +294,7 @@ protected:
     /// error.
     ///
     /// @return Returns a DCfgContextBasePtr to the new context instance.
-    virtual DCfgContextBasePtr createNewContext();
+    virtual process::DCfgContextBasePtr createNewContext();
 };
 
 /// @brief Defines a shared pointer to D2CfgMgr.
index 7c7088201e82e1aa4ca44834742e11bfd7c4721f..5155a9736d58ee2deba87f7ce6acac10be051024 100644 (file)
@@ -1,4 +1,4 @@
-// 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
@@ -20,6 +20,8 @@
 #include <sstream>
 #include <string>
 
+using namespace isc::process;
+
 namespace isc {
 namespace d2 {
 
index d890abf19aba640b5535122b256e828839539375..b605193c5510c6d5053f8f0c0b0d78f76bc08c71 100644 (file)
@@ -701,7 +701,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr;
 ///
 /// This class implements a concrete version of the base class by supplying a
 /// "clone" method.
-class DScalarContext : public DCfgContextBase {
+class DScalarContext : public process::DCfgContextBase {
 public:
 
     /// @brief Constructor
@@ -715,8 +715,8 @@ public:
     /// @brief Creates a clone of a DStubContext.
     ///
     /// @return returns a pointer to the new clone.
-    virtual DCfgContextBasePtr clone() {
-        return (DCfgContextBasePtr(new DScalarContext(*this)));
+    virtual process::DCfgContextBasePtr clone() {
+        return (process::DCfgContextBasePtr(new DScalarContext(*this)));
     }
 
 protected:
index 090f5260d444bf6cef2fb0ab8edfea40c7b16a59..6ce6006807f6f649b5aaaf619b4ed70ba6ae6afe 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <stdlib.h>
 
+using namespace isc::process;
+
 namespace isc {
 namespace d2 {
 
index 437e7c8074c07be296a69bb2166553769fd4657b..06c3f6ca248cac851a909be1c11735ce28530ea4 100644 (file)
@@ -22,14 +22,14 @@ namespace d2 {
 /// DControllerBase a templated class but the labor savings versus the
 /// potential number of virtual methods which may be overridden didn't seem
 /// worth the clutter at this point.
-class D2Controller : public DControllerBase {
+class D2Controller : public process::DControllerBase {
 public:
     /// @brief Static singleton instance method. This method returns the
     /// base class singleton instance member.  It instantiates the singleton
     /// and sets the base class instance member upon first invocation.
     ///
     /// @return returns the pointer reference to the singleton instance.
-    static DControllerBasePtr& instance();
+    static process::DControllerBasePtr& instance();
 
     /// @brief Destructor.
     virtual ~D2Controller();
@@ -51,7 +51,7 @@ private:
     /// Note the caller is responsible for destructing the process. This
     /// is handled by the base class, which wraps this pointer with a smart
     /// pointer.
-    virtual DProcessBase* createProcess();
+    virtual process::DProcessBase* createProcess();
 
     /// @brief Constructor is declared private to maintain the integrity of
     /// the singleton instance.
index 313296838e8b86ceffa5be015b8321ca88f9065b..a8a0022237a493866c33710a5fe7a569aab76d03 100644 (file)
@@ -11,6 +11,8 @@
 #include <d2/d2_cfg_mgr.h>
 #include <d2/d2_process.h>
 
+using namespace isc::process;
+
 namespace isc {
 namespace d2 {
 
index 49d3841a7619726a0e851af707def46223671684..a652b3acbb9a5cb1576f9702bb20cbdbac54574c 100644 (file)
@@ -21,7 +21,7 @@ namespace d2 {
 /// to receive DNS mapping change requests and carry them out.
 /// It implements the DProcessBase interface, which structures it such that it
 /// is a managed "application", controlled by a management layer.
-class D2Process : public DProcessBase {
+class D2Process : public process::DProcessBase {
 public:
 
     /// @brief Defines the shutdown types supported by D2Process
index 505fbe24409eb8b1a0e9add83665928a6114814b..a1299bdc41aab463efdba160c616be4a363c2e03 100644 (file)
@@ -14,6 +14,7 @@
 #include <iostream>
 
 using namespace isc::d2;
+using namespace isc::process;
 using namespace std;
 
 /// This file contains entry point (main() function) for standard DHCP-DDNS
index d8e1072923becc9981126bc5f9ab3e4930951fd2..3f56dd578ad1be8be5ce6e29bf96882099a54c9f 100644 (file)
@@ -21,6 +21,7 @@
 using namespace std;
 using namespace isc;
 using namespace isc::d2;
+using namespace isc::process;
 
 namespace {
 
index 08084bbe8f760fc88c3ee3eeec8a19ea47faeacf..b22a0b48eb06736948dbc2c891d6fc3695a486a0 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <sstream>
 
+using namespace isc::process;
 using namespace boost::posix_time;
 
 namespace isc {
index 965aa0fb54269ff155c1dd214849e60110390522..f5271a885e7f5dee0e936cfb68750102805e8788 100644 (file)
@@ -22,6 +22,7 @@ using namespace std;
 using namespace isc;
 using namespace isc::config;
 using namespace isc::d2;
+using namespace isc::process;
 using namespace boost::posix_time;
 
 namespace {
index 883c6fab11b56de86d1847f4cba46c82f5061961..25bfe96fe2d04b634329f2d0ad45627408240d14 100644 (file)
@@ -23,6 +23,7 @@ using namespace std;
 using namespace isc;
 using namespace isc::dhcp_ddns;
 using namespace isc::d2;
+using namespace isc::process;
 
 namespace {
 
index 478d9b597e38c61ac1a95952667722eec861a54d..21475912c19c63ce0e6ca76dbf2e82418923116a 100644 (file)
@@ -30,7 +30,7 @@ using namespace isc::data;
 using namespace isc::asiolink;
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 // *********************** DCfgContextBase  *************************
 
index 2a917665227f00491ede5fcd75575ee352eb2e79..087fcea3158966aa10880ed1566c87ca4e628f7d 100644 (file)
@@ -1,4 +1,4 @@
-// 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
@@ -22,7 +22,7 @@
 #endif
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Defines a map of ConstElementPtrs keyed by name
 typedef std::map<std::string, isc::data::ConstElementPtr> ElementMap;
@@ -403,7 +403,7 @@ private:
 typedef boost::shared_ptr<DCfgMgrBase> DCfgMgrBasePtr;
 
 
-}; // end of isc::d2 namespace
+}; // end of isc::process namespace
 }; // end of isc namespace
 
 #endif // D_CFG_MGR_H
index 53ccc311423726076dc27c153f21f6f779a35bce..851b97fe151e4052f8191eab89646b024cdec27c 100644 (file)
@@ -30,7 +30,7 @@
 #include <unistd.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 DControllerBasePtr DControllerBase::controller_;
 
@@ -498,6 +498,6 @@ DControllerBase::getVersion(bool extended) {
     return (tmp.str());
 }
 
-}; // namespace isc::d2
+}; // namespace isc::process
 
 }; // namespace isc
index 92a8001461dc9ce33973ce060f815e4fcf007f5f..51d66c71f383496ad6c040063529cfb17354dea1 100644 (file)
@@ -21,7 +21,7 @@
 
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Exception thrown when the command line is invalid.
 class InvalidUsage : public isc::Exception {
@@ -508,7 +508,7 @@ private:
 friend class DControllerTest;
 };
 
-}; // namespace isc::d2
+}; // namespace isc::process
 }; // namespace isc
 
 #endif
index 06eec6e35ecf9fd4c9f131d20c4613a6fc7c6039..f3a2df5ba26c67ad0ad8a62e70abe441980a3904 100644 (file)
@@ -9,11 +9,11 @@
 #include <process/d_log.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Defines the logger used within libkea-process library.
 isc::log::Logger dctl_logger("dctl");
 
-} // namespace d2
+} // namespace process
 } // namespace isc
 
index 6aecd7c471668530e8aa27740693f860a57b3dc2..5a20cf4e1ad73e2643fd74be5945bd0c980de8e7 100644 (file)
@@ -4,20 +4,20 @@
 // 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/.
 
-#ifndef D2_LOG_H
-#define D2_LOG_H
+#ifndef D_LOG_H
+#define D_LOG_H
 
 #include <log/logger_support.h>
 #include <log/macros.h>
 #include <process/process_messages.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// Define the loggers used within libkea-process library.
 extern isc::log::Logger dctl_logger;
 
-} // namespace d2
+} // namespace process
 } // namespace isc
 
-#endif // D2_LOG_H
+#endif // D_LOG_H
index 6c317d39632c127057a10a35e2f76a6834facae9..aae2612de9c500188987f95a10d4f3850dda7ec7 100644 (file)
@@ -16,7 +16,7 @@
 #include <exceptions/exceptions.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Exception thrown if the process encountered an operational error.
 class DProcessBaseError : public isc::Exception {
@@ -203,7 +203,7 @@ private:
 /// @brief Defines a shared pointer to DProcessBase.
 typedef boost::shared_ptr<DProcessBase> DProcessBasePtr;
 
-}; // namespace isc::d2
+}; // namespace isc::process
 }; // namespace isc
 
 #endif
index 04b0609b7496e8723ef2a7f54fa59d4ea50e8990..29e3b0cb0e7aecafb66d41ed8fe41a98f8e54d27 100644 (file)
@@ -9,7 +9,7 @@
 #include <process/io_service_signal.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 IOSignal::IOSignal (asiolink::IOService& io_service, int signum,
                     IOSignalHandler handler)
@@ -112,5 +112,5 @@ IOSignalQueue::clear() {
     signals_.clear();
 }
 
-}; // end of isc::d2 namespace
+}; // end of isc::process namespace
 }; // end of isc namespace
index 9cf6ced5f65a52b9981dc442fd90a302b9f06443..7f088d60273de09dc275362a8f08714ecd187358 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014-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
@@ -15,7 +15,7 @@
 #include <stdint.h>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Exception thrown if IOSignal encounters an error.
 class IOSignalError : public isc::Exception {
@@ -54,7 +54,7 @@ typedef boost::function<void(IOSignalId sequence_id)> IOSignalHandler;
 /// create the signals, house them until they are delivered, and dequeue them
 /// so they can be been handled.  To generate an IOSignal when an OS signal
 /// arrives, the process's OS signal handler simply calls @ref
-/// isc::d2::IOSignalQueue::pushSignal() with the appropriate values.
+/// isc::process::IOSignalQueue::pushSignal() with the appropriate values.
 ///
 /// @note that an IOSignalQueue requires a non-null IOServicePtr to construct.
 /// This ensures that the IOService cannot be destroyed before any pending
@@ -63,12 +63,13 @@ typedef boost::function<void(IOSignalId sequence_id)> IOSignalHandler;
 /// one service, each service must have its own queue.
 ///
 /// To dequeue the IOSignal inside the caller's IOSignalHandler, one simply
-/// invokes @ref isc::d2::IOSignalQueue::popSignal() passing it the sequence_id
-/// parameter passed to the handler.  This method returns a pointer to
-/// instigating IOSignal from which the value of OS signal (i.e. SIGINT,
-/// SIGUSR1...) can be obtained.  Note that calling popSignal() removes the
-/// IOSignalPtr from the queue, which should reduce its reference count to
-/// zero upon exiting the handler (unless a delibrate copy of it is made).
+/// invokes @ref isc::process::IOSignalQueue::popSignal() passing it the
+/// sequence_id parameter passed to the handler.  This method returns a
+/// pointer to instigating IOSignal from which the value of OS signal (i.e.
+/// SIGINT, SIGUSR1...) can be obtained.  Note that calling popSignal()
+/// removes the IOSignalPtr from the queue, which should reduce its
+/// reference count to zero upon exiting the handler (unless a delibrate
+/// copy of it is made).
 ///
 /// A typical IOSignalHandler might be structured as follows:
 /// @code
@@ -252,7 +253,7 @@ private:
 typedef boost::shared_ptr<IOSignalQueue> IOSignalQueuePtr;
 
 
-}; // end of isc::d2 namespace
+}; // end of isc::process namespace
 }; // end of isc namespace
 
 #endif // IO_SERVICE_SIGNAL_H
index c7c1d3b7e339c58fb195786ddb88537a805c1b47..dbb269778c8b1a2c10bfb2fb7c0f5c28761e85d6 100644 (file)
@@ -4,7 +4,7 @@
 # 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/.
 
-$NAMESPACE isc::d2
+$NAMESPACE isc::process
 
 % DCTL_ALREADY_RUNNING %1 already running? %2
 This is an error message that occurs when a module encounters a pre-existing
index b09a690b756e27c3ab72d0ddba5bf2849cef265f..fe37fe5e6c7b6f2fe910e5ad017d543f3e37a7bb 100644 (file)
@@ -21,7 +21,7 @@
 using namespace std;
 using namespace isc;
 using namespace isc::config;
-using namespace isc::d2;
+using namespace isc::process;
 using namespace boost::posix_time;
 
 namespace {
index e0595a026df5299e7984aa79f9c0668296c060cf..c76ee9be0c87ce4a4c5c573833c9783799890637 100644 (file)
@@ -18,7 +18,7 @@
 using namespace boost::posix_time;
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Test fixture class for testing DControllerBase class. This class
 /// derives from DControllerTest and wraps a DStubController.  DStubController
index 7c0b4dc55db7f43a6206d4311db3264a55515d2d..e7685485ff99a8c57c6927241a1567d5904b45ce 100644 (file)
@@ -15,7 +15,7 @@
 #include <queue>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Test fixture for testing the use of IOSignals.
 ///
@@ -387,5 +387,5 @@ TEST_F(IOSignalTest, mixedSignals) {
     EXPECT_EQ(sigusr2_cnt, (stop_at_count_/3));
 }
 
-}; // end of isc::d2 namespace
+}; // end of isc::process namespace
 }; // end of isc namespace
index e1e8ea7599a92422f7a7f589421612187e4cb587..f643563e9b03f5d28e07ef3c5dd7d7908ea646a6 100644 (file)
@@ -13,7 +13,7 @@
 using namespace boost::asio;
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 const char* valid_d2_config = "{ "
                         "\"ip-address\" : \"127.0.0.1\" , "
@@ -423,5 +423,5 @@ DStubCfgMgr::createConfigParser(const std::string& element_id,
     return (parser);
 }
 
-}; // namespace isc::d2
+}; // namespace isc::process
 }; // namespace isc
index 3aaac0237ea11382ee61be24c1b0d2d2f9919d34..83953d410332f1846e12f893207fa86c4852d3ab 100644 (file)
@@ -28,7 +28,7 @@ using namespace boost::posix_time;
 #include <sstream>
 
 namespace isc {
-namespace d2 {
+namespace process {
 
 /// @brief Provides a valid DHCP-DDNS configuration for testing basic
 /// parsing fundamentals.
@@ -862,7 +862,7 @@ private:
 /// testing configuration parsing fundamentals.
 extern const char* valid_d2_config;
 
-}; // namespace isc::d2
+}; // namespace isc::process
 }; // namespace isc
 
 #endif