Build fix for Windows

refs #8486
This commit is contained in:
Gunnar Beutner 2015-02-26 09:02:45 +01:00
parent 150353d88f
commit c30d64a261
37 changed files with 78 additions and 36 deletions

View File

@ -44,6 +44,7 @@ target_link_libraries(livestatus ${Boost_LIBRARIES} base config icinga remote)
set_target_properties (
livestatus PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
DEFINE_SYMBOL I2_LIVESTATUS_BUILD
FOLDER Components
)

View File

@ -20,6 +20,7 @@
#ifndef AGGREGATOR_H
#define AGGREGATOR_H
#include "livestatus/i2-livestatus.hpp"
#include "livestatus/table.hpp"
#include "livestatus/filter.hpp"
@ -29,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class Aggregator : public Object
class I2_LIVESTATUS_API Aggregator : public Object
{
public:
DECLARE_PTR_TYPEDEFS(Aggregator);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class AndFilter : public CombinerFilter
class I2_LIVESTATUS_API AndFilter : public CombinerFilter
{
public:
DECLARE_PTR_TYPEDEFS(AndFilter);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class AttributeFilter : public Filter
class I2_LIVESTATUS_API AttributeFilter : public Filter
{
public:
DECLARE_PTR_TYPEDEFS(AttributeFilter);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class AvgAggregator : public Aggregator
class I2_LIVESTATUS_API AvgAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(AvgAggregator);

View File

@ -20,6 +20,8 @@
#ifndef COLUMN_H
#define COLUMN_H
#include "livestatus/i2-livestatus.hpp"
#include "livestatus/i2-livestatus.hpp"
#include "base/value.hpp"
#include <boost/function.hpp>
@ -34,7 +36,7 @@ enum LivestatusGroupByType {
LivestatusGroupByServiceGroup
};
class Column
class I2_LIVESTATUS_API Column
{
public:
typedef boost::function<Value (const Value&)> ValueAccessor;

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class CombinerFilter : public Filter
class I2_LIVESTATUS_API CombinerFilter : public Filter
{
public:
DECLARE_PTR_TYPEDEFS(CombinerFilter);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class CommandsTable : public Table
class I2_LIVESTATUS_API CommandsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(CommandsTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class CommentsTable : public Table
class I2_LIVESTATUS_API CommentsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(CommentsTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class ContactGroupsTable : public Table
class I2_LIVESTATUS_API ContactGroupsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(ContactGroupsTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class ContactsTable : public Table
class I2_LIVESTATUS_API ContactsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(ContactsTable);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class CountAggregator : public Aggregator
class I2_LIVESTATUS_API CountAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(CountAggregator);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class DowntimesTable : public Table
class I2_LIVESTATUS_API DowntimesTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(DowntimesTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class EndpointsTable : public Table
class I2_LIVESTATUS_API EndpointsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(EndpointsTable);

View File

@ -20,6 +20,7 @@
#ifndef FILTER_H
#define FILTER_H
#include "livestatus/i2-livestatus.hpp"
#include "livestatus/table.hpp"
namespace icinga
@ -28,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class Filter : public Object
class I2_LIVESTATUS_API Filter : public Object
{
public:
DECLARE_PTR_TYPEDEFS(Filter);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class HistoryTable : public Table
class I2_LIVESTATUS_API HistoryTable : public Table
{
public:
virtual void UpdateLogEntries(const Dictionary::Ptr& bag, int line_count, int lineno, const AddRowFunction& addRowFn);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class HostGroupsTable : public Table
class I2_LIVESTATUS_API HostGroupsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(HostGroupsTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class HostsTable : public Table
class I2_LIVESTATUS_API HostsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(HostsTable);

View File

@ -0,0 +1,37 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software Foundation *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
#ifndef I2LIVESTATUS_H
#define I2LIVESTATUS_H
/**
* @defgroup icinga Livestatus
*
* The Livestatus library implements the Livestatus protocol for Icinga.
*/
#include "base/i2-base.hpp"
#ifdef I2_LIVESTATUS_BUILD
# define I2_LIVESTATUS_API I2_EXPORT
#else /* I2_LIVESTATUS_BUILD */
# define I2_LIVESTATUS_API I2_IMPORT
#endif /* I2_LIVESTATUS_BUILD */
#endif /* I2LIVESTATUS_H */

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class InvAvgAggregator : public Aggregator
class I2_LIVESTATUS_API InvAvgAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(InvAvgAggregator);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class InvSumAggregator : public Aggregator
class I2_LIVESTATUS_API InvSumAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(InvSumAggregator);

View File

@ -20,6 +20,7 @@
#ifndef LIVESTATUSLISTENER_H
#define LIVESTATUSLISTENER_H
#include "livestatus/i2-livestatus.hpp"
#include "livestatus/livestatuslistener.thpp"
#include "livestatus/livestatusquery.hpp"
#include "base/socket.hpp"
@ -33,7 +34,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class LivestatusListener : public ObjectImpl<LivestatusListener>
class I2_LIVESTATUS_API LivestatusListener : public ObjectImpl<LivestatusListener>
{
public:
DECLARE_OBJECT(LivestatusListener);

View File

@ -60,9 +60,8 @@ enum LogEntryClass {
/**
* @ingroup livestatus
*/
class LivestatusLogUtility
class I2_LIVESTATUS_API LivestatusLogUtility
{
public:
static void CreateLogIndex(const String& path, std::map<time_t, String>& index);
static void CreateLogIndexFileHandler(const String& path, std::map<time_t, String>& index);

View File

@ -55,7 +55,7 @@ struct LivestatusScriptFrame
/**
* @ingroup livestatus
*/
class LivestatusQuery : public Object
class I2_LIVESTATUS_API LivestatusQuery : public Object
{
public:
DECLARE_PTR_TYPEDEFS(LivestatusQuery);

View File

@ -31,7 +31,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class LogTable : public HistoryTable
class I2_LIVESTATUS_API LogTable : public HistoryTable
{
public:
DECLARE_PTR_TYPEDEFS(LogTable);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class MaxAggregator : public Aggregator
class I2_LIVESTATUS_API MaxAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(MaxAggregator);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class MinAggregator : public Aggregator
class I2_LIVESTATUS_API MinAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(MinAggregator);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class NegateFilter : public Filter
class I2_LIVESTATUS_API NegateFilter : public Filter
{
public:
DECLARE_PTR_TYPEDEFS(NegateFilter);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class OrFilter : public CombinerFilter
class I2_LIVESTATUS_API OrFilter : public CombinerFilter
{
public:
DECLARE_PTR_TYPEDEFS(OrFilter);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class ServiceGroupsTable : public Table
class I2_LIVESTATUS_API ServiceGroupsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(ServiceGroupsTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class ServicesTable : public Table
class I2_LIVESTATUS_API ServicesTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(ServicesTable);

View File

@ -32,7 +32,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class StateHistTable : public HistoryTable
class I2_LIVESTATUS_API StateHistTable : public HistoryTable
{
public:
DECLARE_PTR_TYPEDEFS(StateHistTable);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class StatusTable : public Table
class I2_LIVESTATUS_API StatusTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(StatusTable);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class StdAggregator : public Aggregator
class I2_LIVESTATUS_API StdAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(StdAggregator);

View File

@ -29,7 +29,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class SumAggregator : public Aggregator
class I2_LIVESTATUS_API SumAggregator : public Aggregator
{
public:
DECLARE_PTR_TYPEDEFS(SumAggregator);

View File

@ -43,7 +43,7 @@ class Filter;
/**
* @ingroup livestatus
*/
class Table : public Object
class I2_LIVESTATUS_API Table : public Object
{
public:
DECLARE_PTR_TYPEDEFS(Table);

View File

@ -30,7 +30,7 @@ namespace icinga
/**
* @ingroup livestatus
*/
class TimePeriodsTable : public Table
class I2_LIVESTATUS_API TimePeriodsTable : public Table
{
public:
DECLARE_PTR_TYPEDEFS(TimePeriodsTable);