From 344b047ea0edf1d4e53e6c60ae5737b3e86d6dde Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 11 Sep 2017 16:51:13 +0200 Subject: [PATCH] Move Base64 class into libbase refs #5538 --- lib/base/CMakeLists.txt | 2 +- lib/{remote => base}/base64.cpp | 2 +- lib/{remote => base}/base64.hpp | 2 +- lib/remote/CMakeLists.txt | 2 +- lib/remote/apiclient.cpp | 2 +- lib/remote/httpclientconnection.cpp | 2 +- lib/remote/httpserverconnection.cpp | 2 +- test/CMakeLists.txt | 6 +++--- test/{remote-base64.cpp => base-base64.cpp} | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) rename lib/{remote => base}/base64.cpp (98%) rename lib/{remote => base}/base64.hpp (98%) rename test/{remote-base64.cpp => base-base64.cpp} (97%) diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index 858943f81..049226e9c 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -27,7 +27,7 @@ mkclass_target(sysloglogger.ti sysloglogger.tcpp sysloglogger.thpp) set(base_SOURCES application.cpp application.thpp application-version.cpp array.cpp - array-script.cpp boolean.cpp boolean-script.cpp console.cpp context.cpp + array-script.cpp boolean.cpp boolean-script.cpp base64.cpp console.cpp context.cpp convert.cpp datetime.cpp datetime.thpp datetime-script.cpp debuginfo.cpp dictionary.cpp dictionary-script.cpp configobject.cpp configobject.thpp configobject-script.cpp configtype.cpp configwriter.cpp dependencygraph.cpp exception.cpp fifo.cpp filelogger.cpp filelogger.thpp initialize.cpp json.cpp diff --git a/lib/remote/base64.cpp b/lib/base/base64.cpp similarity index 98% rename from lib/remote/base64.cpp rename to lib/base/base64.cpp index 9c805e658..bbbc9b09e 100644 --- a/lib/remote/base64.cpp +++ b/lib/base/base64.cpp @@ -17,7 +17,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#include "remote/base64.hpp" +#include "base/base64.hpp" #include #include #include diff --git a/lib/remote/base64.hpp b/lib/base/base64.hpp similarity index 98% rename from lib/remote/base64.hpp rename to lib/base/base64.hpp index f9f878b75..c0a127f89 100644 --- a/lib/remote/base64.hpp +++ b/lib/base/base64.hpp @@ -31,7 +31,7 @@ namespace icinga * * @ingroup remote */ -struct I2_REMOTE_API Base64 +struct I2_BASE_API Base64 { static String Decode(const String& data); static String Encode(const String& data); diff --git a/lib/remote/CMakeLists.txt b/lib/remote/CMakeLists.txt index eb9867368..cf27ac463 100644 --- a/lib/remote/CMakeLists.txt +++ b/lib/remote/CMakeLists.txt @@ -23,7 +23,7 @@ mkclass_target(zone.ti zone.tcpp zone.thpp) set(remote_SOURCES actionshandler.cpp apiaction.cpp apiclient.cpp apifunction.cpp apilistener.cpp apilistener.thpp apilistener-configsync.cpp - apilistener-filesync.cpp apiuser.cpp apiuser.thpp authority.cpp base64.cpp + apilistener-filesync.cpp apiuser.cpp apiuser.thpp authority.cpp consolehandler.cpp configfileshandler.cpp configpackageshandler.cpp configpackageutility.cpp configobjectutility.cpp configstageshandler.cpp createobjecthandler.cpp deleteobjecthandler.cpp endpoint.cpp endpoint.thpp eventshandler.cpp eventqueue.cpp filterutility.cpp diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp index 9625298e5..8aa676a47 100644 --- a/lib/remote/apiclient.cpp +++ b/lib/remote/apiclient.cpp @@ -18,7 +18,7 @@ ******************************************************************************/ #include "remote/apiclient.hpp" -#include "remote/base64.hpp" +#include "base/base64.hpp" #include "base/json.hpp" #include "base/logger.hpp" #include "base/exception.hpp" diff --git a/lib/remote/httpclientconnection.cpp b/lib/remote/httpclientconnection.cpp index 03f52d9b9..ffd241caa 100644 --- a/lib/remote/httpclientconnection.cpp +++ b/lib/remote/httpclientconnection.cpp @@ -18,9 +18,9 @@ ******************************************************************************/ #include "remote/httpclientconnection.hpp" -#include "remote/base64.hpp" #include "base/configtype.hpp" #include "base/objectlock.hpp" +#include "base/base64.hpp" #include "base/utility.hpp" #include "base/logger.hpp" #include "base/exception.hpp" diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index f68695a75..aac35aaa1 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -23,7 +23,7 @@ #include "remote/apilistener.hpp" #include "remote/apifunction.hpp" #include "remote/jsonrpc.hpp" -#include "remote/base64.hpp" +#include "base/base64.hpp" #include "base/configtype.hpp" #include "base/objectlock.hpp" #include "base/utility.hpp" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5c79ce3ef..85b8b59cb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,13 +20,13 @@ set(Boost_USE_STATIC_LIBS OFF) include(BoostTestTargets) set(base_test_SOURCES - base-array.cpp base-convert.cpp base-dictionary.cpp base-fifo.cpp + base-array.cpp base-base64.cpp base-convert.cpp base-dictionary.cpp base-fifo.cpp base-json.cpp base-match.cpp base-netstring.cpp base-object.cpp base-serialize.cpp base-shellescape.cpp base-stacktrace.cpp base-stream.cpp base-string.cpp base-timer.cpp base-type.cpp base-value.cpp config-ops.cpp icinga-checkresult.cpp icinga-macros.cpp icinga-notification.cpp - icinga-perfdata.cpp remote-base64.cpp remote-url.cpp + icinga-perfdata.cpp remote-url.cpp ) if(ICINGA2_UNITY_BUILD) @@ -44,6 +44,7 @@ add_boost_test(base base_array/foreach base_array/clone base_array/json + base_base64/base64 base_convert/tolong base_convert/todouble base_convert/tostring @@ -112,7 +113,6 @@ add_boost_test(base icinga_perfdata/ignore_invalid_warn_crit_min_max icinga_perfdata/invalid icinga_perfdata/multi - remote_base64/base64 remote_url/id_and_path remote_url/parameters remote_url/get_and_set diff --git a/test/remote-base64.cpp b/test/base-base64.cpp similarity index 97% rename from test/remote-base64.cpp rename to test/base-base64.cpp index 10c95846f..d4d9576af 100644 --- a/test/remote-base64.cpp +++ b/test/base-base64.cpp @@ -17,12 +17,12 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#include "remote/base64.hpp" +#include "base/base64.hpp" #include using namespace icinga; -BOOST_AUTO_TEST_SUITE(remote_base64) +BOOST_AUTO_TEST_SUITE(base_base64) BOOST_AUTO_TEST_CASE(base64) {