Commit 7fdcecdb authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[5074] Files in libkea-process moved to isc::process namespace.

parent 070672ba
// 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 // 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 // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace isc::process;
namespace isc { namespace isc {
namespace d2 { namespace d2 {
......
...@@ -30,7 +30,7 @@ typedef boost::shared_ptr<D2CfgContext> D2CfgContextPtr; ...@@ -30,7 +30,7 @@ typedef boost::shared_ptr<D2CfgContext> D2CfgContextPtr;
/// and any other DHCP-DDNS specific information that needs to be accessible /// and any other DHCP-DDNS specific information that needs to be accessible
/// during configuration parsing as well as to the application as a whole. /// during configuration parsing as well as to the application as a whole.
/// It is derived from the context base class, DCfgContextBase. /// It is derived from the context base class, DCfgContextBase.
class D2CfgContext : public DCfgContextBase { class D2CfgContext : public process::DCfgContextBase {
public: public:
/// @brief Constructor /// @brief Constructor
D2CfgContext(); D2CfgContext();
...@@ -41,8 +41,8 @@ public: ...@@ -41,8 +41,8 @@ public:
/// @brief Creates a clone of this context object. /// @brief Creates a clone of this context object.
/// ///
/// @return returns a pointer to the new clone. /// @return returns a pointer to the new clone.
virtual DCfgContextBasePtr clone() { virtual process::DCfgContextBasePtr clone() {
return (DCfgContextBasePtr(new D2CfgContext(*this))); return (process::DCfgContextBasePtr(new D2CfgContext(*this)));
} }
/// @brief Fetches a reference to the D2Params /// @brief Fetches a reference to the D2Params
...@@ -103,7 +103,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr; ...@@ -103,7 +103,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr;
/// configuration. This includes services for parsing sets of configuration /// configuration. This includes services for parsing sets of configuration
/// values, storing the parsed information in its converted form, /// values, storing the parsed information in its converted form,
/// and retrieving the information on demand. /// and retrieving the information on demand.
class D2CfgMgr : public DCfgMgrBase { class D2CfgMgr : public process::DCfgMgrBase {
public: public:
/// @brief Reverse zone suffix added to IPv4 addresses for reverse lookups /// @brief Reverse zone suffix added to IPv4 addresses for reverse lookups
/// @todo This should be configurable. /// @todo This should be configurable.
...@@ -294,7 +294,7 @@ protected: ...@@ -294,7 +294,7 @@ protected:
/// error. /// error.
/// ///
/// @return Returns a DCfgContextBasePtr to the new context instance. /// @return Returns a DCfgContextBasePtr to the new context instance.
virtual DCfgContextBasePtr createNewContext(); virtual process::DCfgContextBasePtr createNewContext();
}; };
/// @brief Defines a shared pointer to D2CfgMgr. /// @brief Defines a shared pointer to D2CfgMgr.
......
// 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 // 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 // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
using namespace isc::process;
namespace isc { namespace isc {
namespace d2 { namespace d2 {
......
...@@ -701,7 +701,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr; ...@@ -701,7 +701,7 @@ typedef boost::shared_ptr<DdnsDomainListMgr> DdnsDomainListMgrPtr;
/// ///
/// This class implements a concrete version of the base class by supplying a /// This class implements a concrete version of the base class by supplying a
/// "clone" method. /// "clone" method.
class DScalarContext : public DCfgContextBase { class DScalarContext : public process::DCfgContextBase {
public: public:
/// @brief Constructor /// @brief Constructor
...@@ -715,8 +715,8 @@ public: ...@@ -715,8 +715,8 @@ public:
/// @brief Creates a clone of a DStubContext. /// @brief Creates a clone of a DStubContext.
/// ///
/// @return returns a pointer to the new clone. /// @return returns a pointer to the new clone.
virtual DCfgContextBasePtr clone() { virtual process::DCfgContextBasePtr clone() {
return (DCfgContextBasePtr(new DScalarContext(*this))); return (process::DCfgContextBasePtr(new DScalarContext(*this)));
} }
protected: protected:
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <stdlib.h> #include <stdlib.h>
using namespace isc::process;
namespace isc { namespace isc {
namespace d2 { namespace d2 {
......
...@@ -22,14 +22,14 @@ namespace d2 { ...@@ -22,14 +22,14 @@ namespace d2 {
/// DControllerBase a templated class but the labor savings versus the /// DControllerBase a templated class but the labor savings versus the
/// potential number of virtual methods which may be overridden didn't seem /// potential number of virtual methods which may be overridden didn't seem
/// worth the clutter at this point. /// worth the clutter at this point.
class D2Controller : public DControllerBase { class D2Controller : public process::DControllerBase {
public: public:
/// @brief Static singleton instance method. This method returns the /// @brief Static singleton instance method. This method returns the
/// base class singleton instance member. It instantiates the singleton /// base class singleton instance member. It instantiates the singleton
/// and sets the base class instance member upon first invocation. /// and sets the base class instance member upon first invocation.
/// ///
/// @return returns the pointer reference to the singleton instance. /// @return returns the pointer reference to the singleton instance.
static DControllerBasePtr& instance(); static process::DControllerBasePtr& instance();
/// @brief Destructor. /// @brief Destructor.
virtual ~D2Controller(); virtual ~D2Controller();
...@@ -51,7 +51,7 @@ private: ...@@ -51,7 +51,7 @@ private:
/// Note the caller is responsible for destructing the process. This /// Note the caller is responsible for destructing the process. This
/// is handled by the base class, which wraps this pointer with a smart /// is handled by the base class, which wraps this pointer with a smart
/// pointer. /// pointer.
virtual DProcessBase* createProcess(); virtual process::DProcessBase* createProcess();
/// @brief Constructor is declared private to maintain the integrity of /// @brief Constructor is declared private to maintain the integrity of
/// the singleton instance. /// the singleton instance.
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <d2/d2_cfg_mgr.h> #include <d2/d2_cfg_mgr.h>
#include <d2/d2_process.h> #include <d2/d2_process.h>
using namespace isc::process;
namespace isc { namespace isc {
namespace d2 { namespace d2 {
......
...@@ -21,7 +21,7 @@ namespace d2 { ...@@ -21,7 +21,7 @@ namespace d2 {
/// to receive DNS mapping change requests and carry them out. /// to receive DNS mapping change requests and carry them out.
/// It implements the DProcessBase interface, which structures it such that it /// It implements the DProcessBase interface, which structures it such that it
/// is a managed "application", controlled by a management layer. /// is a managed "application", controlled by a management layer.
class D2Process : public DProcessBase { class D2Process : public process::DProcessBase {
public: public:
/// @brief Defines the shutdown types supported by D2Process /// @brief Defines the shutdown types supported by D2Process
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <iostream> #include <iostream>
using namespace isc::d2; using namespace isc::d2;
using namespace isc::process;
using namespace std; using namespace std;
/// This file contains entry point (main() function) for standard DHCP-DDNS /// This file contains entry point (main() function) for standard DHCP-DDNS
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
using namespace std; using namespace std;
using namespace isc; using namespace isc;
using namespace isc::d2; using namespace isc::d2;
using namespace isc::process;
namespace { namespace {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <sstream> #include <sstream>
using namespace isc::process;
using namespace boost::posix_time; using namespace boost::posix_time;
namespace isc { namespace isc {
......
...@@ -22,6 +22,7 @@ using namespace std; ...@@ -22,6 +22,7 @@ using namespace std;
using namespace isc; using namespace isc;
using namespace isc::config; using namespace isc::config;
using namespace isc::d2; using namespace isc::d2;
using namespace isc::process;
using namespace boost::posix_time; using namespace boost::posix_time;
namespace { namespace {
......
...@@ -23,6 +23,7 @@ using namespace std; ...@@ -23,6 +23,7 @@ using namespace std;
using namespace isc; using namespace isc;
using namespace isc::dhcp_ddns; using namespace isc::dhcp_ddns;
using namespace isc::d2; using namespace isc::d2;
using namespace isc::process;
namespace { namespace {
......
...@@ -30,7 +30,7 @@ using namespace isc::data; ...@@ -30,7 +30,7 @@ using namespace isc::data;
using namespace isc::asiolink; using namespace isc::asiolink;
namespace isc { namespace isc {
namespace d2 { namespace process {
// *********************** DCfgContextBase ************************* // *********************** DCfgContextBase *************************
......
// 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 // 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 // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#endif #endif
namespace isc { namespace isc {
namespace d2 { namespace process {
/// @brief Defines a map of ConstElementPtrs keyed by name /// @brief Defines a map of ConstElementPtrs keyed by name
typedef std::map<std::string, isc::data::ConstElementPtr> ElementMap; typedef std::map<std::string, isc::data::ConstElementPtr> ElementMap;
...@@ -403,7 +403,7 @@ private: ...@@ -403,7 +403,7 @@ private:
typedef boost::shared_ptr<DCfgMgrBase> DCfgMgrBasePtr; typedef boost::shared_ptr<DCfgMgrBase> DCfgMgrBasePtr;
}; // end of isc::d2 namespace }; // end of isc::process namespace
}; // end of isc namespace }; // end of isc namespace
#endif // D_CFG_MGR_H #endif // D_CFG_MGR_H
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <unistd.h> #include <unistd.h>
namespace isc { namespace isc {
namespace d2 { namespace process {
DControllerBasePtr DControllerBase::controller_; DControllerBasePtr DControllerBase::controller_;
...@@ -498,6 +498,6 @@ DControllerBase::getVersion(bool extended) { ...@@ -498,6 +498,6 @@ DControllerBase::getVersion(bool extended) {
return (tmp.str()); return (tmp.str());
} }
}; // namespace isc::d2 }; // namespace isc::process
}; // namespace isc }; // namespace isc
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
namespace isc { namespace isc {
namespace d2 { namespace process {
/// @brief Exception thrown when the command line is invalid. /// @brief Exception thrown when the command line is invalid.
class InvalidUsage : public isc::Exception { class InvalidUsage : public isc::Exception {
...@@ -508,7 +508,7 @@ private: ...@@ -508,7 +508,7 @@ private:
friend class DControllerTest; friend class DControllerTest;
}; };
}; // namespace isc::d2 }; // namespace isc::process
}; // namespace isc }; // namespace isc
#endif #endif
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
#include <process/d_log.h> #include <process/d_log.h>
namespace isc { namespace isc {
namespace d2 { namespace process {
/// @brief Defines the logger used within libkea-process library. /// @brief Defines the logger used within libkea-process library.
isc::log::Logger dctl_logger("dctl"); isc::log::Logger dctl_logger("dctl");
} // namespace d2 } // namespace process
} // namespace isc } // namespace isc
...@@ -4,20 +4,20 @@ ...@@ -4,20 +4,20 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // 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/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef D2_LOG_H #ifndef D_LOG_H
#define D2_LOG_H #define D_LOG_H
#include <log/logger_support.h> #include <log/logger_support.h>
#include <log/macros.h> #include <log/macros.h>
#include <process/process_messages.h> #include <process/process_messages.h>
namespace isc { namespace isc {
namespace d2 { namespace process {
/// Define the loggers used within libkea-process library. /// Define the loggers used within libkea-process library.
extern isc::log::Logger dctl_logger; extern isc::log::Logger dctl_logger;
} // namespace d2 } // namespace process
} // namespace isc } // namespace isc
#endif // D2_LOG_H #endif // D_LOG_H
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
namespace isc { namespace isc {
namespace d2 { namespace process {
/// @brief Exception thrown if the process encountered an operational error. /// @brief Exception thrown if the process encountered an operational error.
class DProcessBaseError : public isc::Exception { class DProcessBaseError : public isc::Exception {
...@@ -203,7 +203,7 @@ private: ...@@ -203,7 +203,7 @@ private:
/// @brief Defines a shared pointer to DProcessBase. /// @brief Defines a shared pointer to DProcessBase.
typedef boost::shared_ptr<DProcessBase> DProcessBasePtr; typedef boost::shared_ptr<DProcessBase> DProcessBasePtr;
}; // namespace isc::d2 }; // namespace isc::process
}; // namespace isc }; // namespace isc
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment