From 93d390873dd9e1a10f1873a7d95d1e56fbad73f5 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 26 Feb 2015 11:04:57 +0100 Subject: [PATCH] Fix Livestatus tests on Windows fixes #8486 --- lib/cli/daemonutility.hpp | 16 +++++++++++----- lib/cli/featureutility.hpp | 3 ++- lib/cli/nodeutility.hpp | 3 ++- lib/cli/objectlistutility.hpp | 18 ++++++++++-------- lib/cli/pkiutility.hpp | 3 ++- lib/cli/repositoryutility.hpp | 3 ++- lib/cli/variableutility.hpp | 4 ++-- lib/livestatus/column.hpp | 1 - 8 files changed, 31 insertions(+), 20 deletions(-) diff --git a/lib/cli/daemonutility.hpp b/lib/cli/daemonutility.hpp index 4c389e317..f7025ac8a 100644 --- a/lib/cli/daemonutility.hpp +++ b/lib/cli/daemonutility.hpp @@ -17,20 +17,26 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ******************************************************************************/ -#ifndef DAEMONUTILIT_H -#define DAEMONUTILIT_H +#ifndef DAEMONUTILITY_H +#define DAEMONUTILITY_H -//#include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/string.hpp" #include namespace icinga { -class DaemonUtility + +/** + * @ingroup cli + */ +class I2_CLI_API DaemonUtility { public: static bool ValidateConfigFiles(const std::vector& configs, const String& objectsFile = String()); static bool LoadConfigFiles(const std::vector& configs, const String& appType, const String& objectsFile = String(), const String& varsfile = String()); }; + } -#endif /*DAEMONULITIY_H*/ \ No newline at end of file + +#endif /* DAEMONULITIY_H */ diff --git a/lib/cli/featureutility.hpp b/lib/cli/featureutility.hpp index 2c5233de2..2a9f7763d 100644 --- a/lib/cli/featureutility.hpp +++ b/lib/cli/featureutility.hpp @@ -21,6 +21,7 @@ #define FEATUREUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/string.hpp" #include #include @@ -31,7 +32,7 @@ namespace icinga /** * @ingroup cli */ -class FeatureUtility +class I2_CLI_API FeatureUtility { public: static String GetFeaturesAvailablePath(void); diff --git a/lib/cli/nodeutility.hpp b/lib/cli/nodeutility.hpp index c881e88c5..55d291c84 100644 --- a/lib/cli/nodeutility.hpp +++ b/lib/cli/nodeutility.hpp @@ -21,6 +21,7 @@ #define AGENTUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/dictionary.hpp" #include "base/array.hpp" #include "base/value.hpp" @@ -33,7 +34,7 @@ namespace icinga /** * @ingroup cli */ -class NodeUtility +class I2_CLI_API NodeUtility { public: static String GetRepositoryPath(void); diff --git a/lib/cli/objectlistutility.hpp b/lib/cli/objectlistutility.hpp index 5fae1dd99..179147e1a 100644 --- a/lib/cli/objectlistutility.hpp +++ b/lib/cli/objectlistutility.hpp @@ -20,6 +20,7 @@ #define OBJECTLISTUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/dictionary.hpp" #include "base/array.hpp" #include "base/value.hpp" @@ -27,16 +28,15 @@ namespace icinga { -class ObjectListUtility + +/** + * @ingroup cli + */ +class I2_CLI_API ObjectListUtility { public: - /* - * Print decoded json blob *message* to *fp*, filtering by *name_filter* and *type_filter*. - * An enumeration by type is written to *type_count* - * *first* needs to be true - * returns true if object was printed - */ static bool PrintObject(std::ostream& fp, bool& first, const String& message, std::map& type_count, const String& name_filter, const String& type_filter); + private: static void PrintProperties(std::ostream& fp, const Dictionary::Ptr& props, const Dictionary::Ptr& debug_hints, int indent); static void PrintHints(std::ostream& fp, const Dictionary::Ptr& debug_hints, int indent); @@ -44,5 +44,7 @@ private: static void PrintValue(std::ostream& fp, const Value& val); static void PrintArray(std::ostream& fp, const Array::Ptr& arr); }; + } -#endif /* OBJECTLISTUTILITY_H */ \ No newline at end of file + +#endif /* OBJECTLISTUTILITY_H */ diff --git a/lib/cli/pkiutility.hpp b/lib/cli/pkiutility.hpp index 2baf63a55..cfa2230e8 100644 --- a/lib/cli/pkiutility.hpp +++ b/lib/cli/pkiutility.hpp @@ -21,6 +21,7 @@ #define PKIUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/dictionary.hpp" #include "base/string.hpp" @@ -30,7 +31,7 @@ namespace icinga /** * @ingroup cli */ -class PkiUtility +class I2_CLI_API PkiUtility { public: static String GetPkiPath(void); diff --git a/lib/cli/repositoryutility.hpp b/lib/cli/repositoryutility.hpp index ba6653d00..d47cc6ccb 100644 --- a/lib/cli/repositoryutility.hpp +++ b/lib/cli/repositoryutility.hpp @@ -21,6 +21,7 @@ #define REPOSITORYUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/dictionary.hpp" #include "base/array.hpp" #include "base/value.hpp" @@ -33,7 +34,7 @@ namespace icinga /** * @ingroup cli */ -class RepositoryUtility +class I2_CLI_API RepositoryUtility { public: static Dictionary::Ptr GetArgumentAttributes(const std::vector& arguments); diff --git a/lib/cli/variableutility.hpp b/lib/cli/variableutility.hpp index e2e794f66..9a0efe268 100644 --- a/lib/cli/variableutility.hpp +++ b/lib/cli/variableutility.hpp @@ -21,6 +21,7 @@ #define VARIABLEUTILITY_H #include "base/i2-base.hpp" +#include "cli/i2-cli.hpp" #include "base/dictionary.hpp" #include "base/string.hpp" #include @@ -31,7 +32,7 @@ namespace icinga /** * @ingroup cli */ -class VariableUtility +class I2_CLI_API VariableUtility { public: static Value GetVariable(const String& name); @@ -40,7 +41,6 @@ public: private: VariableUtility(void); - }; } diff --git a/lib/livestatus/column.hpp b/lib/livestatus/column.hpp index 0209586b2..992abbec5 100644 --- a/lib/livestatus/column.hpp +++ b/lib/livestatus/column.hpp @@ -20,7 +20,6 @@ #ifndef COLUMN_H #define COLUMN_H -#include "livestatus/i2-livestatus.hpp" #include "livestatus/i2-livestatus.hpp" #include "base/value.hpp" #include -- 2.40.0