]> granicus.if.org Git - icinga2/commitdiff
Move Base64 class into libbase
authorMichael Friedrich <michael.friedrich@icinga.com>
Mon, 11 Sep 2017 14:51:13 +0000 (16:51 +0200)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 12 Sep 2017 10:52:49 +0000 (12:52 +0200)
refs #5538

lib/base/CMakeLists.txt
lib/base/base64.cpp [moved from lib/remote/base64.cpp with 98% similarity]
lib/base/base64.hpp [moved from lib/remote/base64.hpp with 98% similarity]
lib/remote/CMakeLists.txt
lib/remote/apiclient.cpp
lib/remote/httpclientconnection.cpp
lib/remote/httpserverconnection.cpp
test/CMakeLists.txt
test/base-base64.cpp [moved from test/remote-base64.cpp with 97% similarity]

index 858943f8173500cf4bbbcbe765e33a299076a3b9..049226e9cf0fd9dc2d016d08e5880a99f336888a 100644 (file)
@@ -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
similarity index 98%
rename from lib/remote/base64.cpp
rename to lib/base/base64.cpp
index 9c805e6585b406f180ad0098673c56e72f34646f..bbbc9b09eae64e625f70fb9030045b4d3a5cdebd 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "remote/base64.hpp"
+#include "base/base64.hpp"
 #include <openssl/bio.h>
 #include <openssl/evp.h>
 #include <openssl/buffer.h>
similarity index 98%
rename from lib/remote/base64.hpp
rename to lib/base/base64.hpp
index f9f878b751d995533d2125bc32aba12d5d39cdff..c0a127f8924177d79f048964928e769ccbae4ee1 100644 (file)
@@ -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);
index eb9867368eb38f2a19d36c451b6f126502a09065..cf27ac463763c3b4b83aaf2ca0fd0b2f1aee0c79 100644 (file)
@@ -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
index 9625298e5aee0c8b3bf6ae3ed73278611b02bbac..8aa676a47e36ff2e413517f8c512972b16a414e0 100644 (file)
@@ -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"
index 03f52d9b9647a14a6b6104d4a1f7f6cac95dc4ac..ffd241caab68f98549b154ef021defa9add38f94 100644 (file)
@@ -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"
index f68695a757c9588831ce7e427b9b8799ee85f5fb..aac35aaa1af83bd59b7f50a18007a9efa1e3205c 100644 (file)
@@ -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"
index 5c79ce3efb1c31177ff185c9d69f69bfabba87f7..85b8b59cb2b705ac4f7702dee20473b65d57ae9b 100644 (file)
@@ -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
similarity index 97%
rename from test/remote-base64.cpp
rename to test/base-base64.cpp
index 10c95846f4072be1c7c01af8bfffee1eede82361..d4d9576af336b1827082a28d46a4e7cbaec33024 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "remote/base64.hpp"
+#include "base/base64.hpp"
 #include <BoostTestTargetConfig.h>
 
 using namespace icinga;
 
-BOOST_AUTO_TEST_SUITE(remote_base64)
+BOOST_AUTO_TEST_SUITE(base_base64)
 
 BOOST_AUTO_TEST_CASE(base64)
 {