Refactor #includes (Part 3).

This commit is contained in:
Gunnar Beutner 2013-03-17 20:19:29 +01:00
parent 0bb0711d72
commit 9d076c3c03
140 changed files with 550 additions and 544 deletions

View File

@ -12,8 +12,7 @@ EXTRA_DIST = \
libchecker_la_SOURCES = \ libchecker_la_SOURCES = \
checkercomponent.cpp \ checkercomponent.cpp \
checkercomponent.h \ checkercomponent.h \
checker-type.cpp \ checker-type.cpp
i2-checker.h
libchecker_la_CPPFLAGS = \ libchecker_la_CPPFLAGS = \
$(BOOST_CPPFLAGS) \ $(BOOST_CPPFLAGS) \

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-checker.h" #include "checker/checkercomponent.h"
#include "remoting/endpointmanager.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"

View File

@ -20,6 +20,8 @@
#ifndef CHECKERCOMPONENT_H #ifndef CHECKERCOMPONENT_H
#define CHECKERCOMPONENT_H #define CHECKERCOMPONENT_H
#include "icinga/service.h"
#include "remoting/endpoint.h"
#include "base/dynamicobject.h" #include "base/dynamicobject.h"
#include <boost/multi_index_container.hpp> #include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/ordered_index.hpp>

View File

@ -1,34 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2CHECKER_H
#define I2CHECKER_H
/**
* @defgroup checker Checker component
*
* The Checker component executes service checks.
*/
#include "base/i2-base.h"
#include "icinga/i2-icinga.h"
#include "checker/checkercomponent.h"
#endif /* I2CHECKER_H */

View File

@ -12,8 +12,7 @@ EXTRA_DIST = \
libcompat_la_SOURCES = \ libcompat_la_SOURCES = \
compatcomponent.cpp \ compatcomponent.cpp \
compatcomponent.h \ compatcomponent.h \
compat-type.cpp \ compat-type.cpp
i2-compat.h
libcompat_la_CPPFLAGS = \ libcompat_la_CPPFLAGS = \
$(BOOST_CPPFLAGS) \ $(BOOST_CPPFLAGS) \

View File

@ -17,14 +17,21 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-compat.h" #include "compat/compatcomponent.h"
#include "icinga/externalcommandprocessor.h"
#include "icinga/icingaapplication.h"
#include "icinga/cib.h"
#include "icinga/hostgroup.h"
#include "icinga/servicegroup.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/exception.h" #include "base/exception.h"
#include "base/application.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
#include <fstream>
using namespace icinga; using namespace icinga;
@ -193,7 +200,7 @@ void CompatComponent::CommandPipeThread(const String& commandPath)
} }
#endif /* _WIN32 */ #endif /* _WIN32 */
void CompatComponent::DumpComments(ostream& fp, const Service::Ptr& owner, CompatObjectType type) void CompatComponent::DumpComments(std::ostream& fp, const Service::Ptr& owner, CompatObjectType type)
{ {
Service::Ptr service; Service::Ptr service;
Host::Ptr host; Host::Ptr host;
@ -230,7 +237,7 @@ void CompatComponent::DumpComments(ostream& fp, const Service::Ptr& owner, Compa
} }
} }
void CompatComponent::DumpDowntimes(ostream& fp, const Service::Ptr& owner, CompatObjectType type) void CompatComponent::DumpDowntimes(std::ostream& fp, const Service::Ptr& owner, CompatObjectType type)
{ {
Host::Ptr host = owner->GetHost(); Host::Ptr host = owner->GetHost();
@ -278,7 +285,7 @@ void CompatComponent::DumpDowntimes(ostream& fp, const Service::Ptr& owner, Comp
} }
} }
void CompatComponent::DumpHostStatus(ostream& fp, const Host::Ptr& host) void CompatComponent::DumpHostStatus(std::ostream& fp, const Host::Ptr& host)
{ {
fp << "hoststatus {" << "\n" fp << "hoststatus {" << "\n"
<< "\t" << "host_name=" << host->GetName() << "\n"; << "\t" << "host_name=" << host->GetName() << "\n";
@ -298,7 +305,7 @@ void CompatComponent::DumpHostStatus(ostream& fp, const Host::Ptr& host)
} }
} }
void CompatComponent::DumpHostObject(ostream& fp, const Host::Ptr& host) void CompatComponent::DumpHostObject(std::ostream& fp, const Host::Ptr& host)
{ {
fp << "define host {" << "\n" fp << "define host {" << "\n"
<< "\t" << "host_name" << "\t" << host->GetName() << "\n" << "\t" << "host_name" << "\t" << host->GetName() << "\n"
@ -338,7 +345,7 @@ void CompatComponent::DumpHostObject(ostream& fp, const Host::Ptr& host)
<< "\n"; << "\n";
} }
void CompatComponent::DumpServiceStatusAttrs(ostream& fp, const Service::Ptr& service, CompatObjectType type) void CompatComponent::DumpServiceStatusAttrs(std::ostream& fp, const Service::Ptr& service, CompatObjectType type)
{ {
ASSERT(service->OwnsLock()); ASSERT(service->OwnsLock());
@ -401,7 +408,7 @@ void CompatComponent::DumpServiceStatusAttrs(ostream& fp, const Service::Ptr& se
<< "\t" << "last_notification=" << service->GetLastNotification() << "\n"; << "\t" << "last_notification=" << service->GetLastNotification() << "\n";
} }
void CompatComponent::DumpServiceStatus(ostream& fp, const Service::Ptr& service) void CompatComponent::DumpServiceStatus(std::ostream& fp, const Service::Ptr& service)
{ {
Host::Ptr host = service->GetHost(); Host::Ptr host = service->GetHost();
@ -424,7 +431,7 @@ void CompatComponent::DumpServiceStatus(ostream& fp, const Service::Ptr& service
DumpComments(fp, service, CompatTypeService); DumpComments(fp, service, CompatTypeService);
} }
void CompatComponent::DumpServiceObject(ostream& fp, const Service::Ptr& service) void CompatComponent::DumpServiceObject(std::ostream& fp, const Service::Ptr& service)
{ {
Host::Ptr host = service->GetHost(); Host::Ptr host = service->GetHost();
@ -486,8 +493,8 @@ void CompatComponent::StatusTimerHandler(void)
String statuspathtmp = statuspath + ".tmp"; /* XXX make this a global definition */ String statuspathtmp = statuspath + ".tmp"; /* XXX make this a global definition */
String objectspathtmp = objectspath + ".tmp"; String objectspathtmp = objectspath + ".tmp";
ofstream statusfp; std::ofstream statusfp;
statusfp.open(statuspathtmp.CStr(), ofstream::out | ofstream::trunc); statusfp.open(statuspathtmp.CStr(), std::ofstream::out | std::ofstream::trunc);
statusfp << std::fixed; statusfp << std::fixed;
@ -521,8 +528,8 @@ void CompatComponent::StatusTimerHandler(void)
<< "\t" << "}" << "\n" << "\t" << "}" << "\n"
<< "\n"; << "\n";
ofstream objectfp; std::ofstream objectfp;
objectfp.open(objectspathtmp.CStr(), ofstream::out | ofstream::trunc); objectfp.open(objectspathtmp.CStr(), std::ofstream::out | std::ofstream::trunc);
objectfp << std::fixed; objectfp << std::fixed;

View File

@ -20,7 +20,11 @@
#ifndef COMPATCOMPONENT_H #ifndef COMPATCOMPONENT_H
#define COMPATCOMPONENT_H #define COMPATCOMPONENT_H
#include "icinga/host.h"
#include "icinga/service.h"
#include "base/dynamicobject.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <iostream>
namespace icinga namespace icinga
{ {
@ -68,7 +72,7 @@ private:
void DumpServiceStatusAttrs(std::ostream& fp, const Service::Ptr& service, CompatObjectType type); void DumpServiceStatusAttrs(std::ostream& fp, const Service::Ptr& service, CompatObjectType type);
template<typename T> template<typename T>
void DumpNameList(ostream& fp, const T& list) void DumpNameList(std::ostream& fp, const T& list)
{ {
typename T::const_iterator it; typename T::const_iterator it;
bool first = true; bool first = true;
@ -84,7 +88,7 @@ private:
} }
template<typename T> template<typename T>
void DumpStringList(ostream& fp, const T& list) void DumpStringList(std::ostream& fp, const T& list)
{ {
typename T::const_iterator it; typename T::const_iterator it;
bool first = true; bool first = true;

View File

@ -1,40 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2COMPAT_H
#define I2COMPAT_H
/**
* @defgroup compat Compat component
*
* The compat component implements compatibility functionality for Icinga 1.x.
*/
#include "base/i2-base.h"
#include "remoting/i2-remoting.h"
#include "icinga/i2-icinga.h"
#include <fstream>
using std::ofstream;
using std::endl;
#include "compatcomponent.h"
#endif /* I2COMPAT_H */

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-delegation.h" #include "delegation/delegationcomponent.h"
#include "remoting/endpointmanager.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include <algorithm> #include <algorithm>

View File

@ -20,6 +20,10 @@
#ifndef DELEGATIONCOMPONENT_H #ifndef DELEGATIONCOMPONENT_H
#define DELEGATIONCOMPONENT_H #define DELEGATIONCOMPONENT_H
#include "icinga/service.h"
#include "remoting/endpoint.h"
#include "base/dynamicobject.h"
namespace icinga namespace icinga
{ {

View File

@ -1,34 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2DELEGATION_H
#define I2DELEGATION_H
/**
* @defgroup delegation Delegation component
*
* The Delegation component delegates service checks to the checker component.
*/
#include "base/i2-base.h"
#include "icinga/i2-icinga.h"
#include "delegation/delegationcomponent.h"
#endif /* I2DELEGATION_H */

View File

@ -12,8 +12,7 @@ EXTRA_DIST = \
libdemo_la_SOURCES = \ libdemo_la_SOURCES = \
democomponent.cpp \ democomponent.cpp \
democomponent.h \ democomponent.h \
demo-type.cpp \ demo-type.cpp
i2-demo.h
libdemo_la_CPPFLAGS = \ libdemo_la_CPPFLAGS = \
$(BOOST_CPPFLAGS) \ $(BOOST_CPPFLAGS) \

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-demo.h" #include "demo/democomponent.h"
#include "remoting/endpointmanager.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>

View File

@ -20,6 +20,9 @@
#ifndef DEMOCOMPONENT_H #ifndef DEMOCOMPONENT_H
#define DEMOCOMPONENT_H #define DEMOCOMPONENT_H
#include "remoting/endpoint.h"
#include "base/dynamicobject.h"
namespace icinga namespace icinga
{ {

View File

@ -1,35 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2DEMO_H
#define I2DEMO_H
/**
* @defgroup demo Demo component
*
* The demo component periodically sends demo messages.
*/
#include "base/i2-base.h"
#include "remoting/i2-remoting.h"
#include "icinga/i2-icinga.h"
#include "demo/democomponent.h"
#endif /* I2DEMO_H */

View File

@ -46,8 +46,7 @@ liblivestatus_la_SOURCES = \
statustable.cpp \ statustable.cpp \
statustable.h \ statustable.h \
table.cpp \ table.cpp \
table.h \ table.h
i2-livestatus.h
liblivestatus_la_CPPFLAGS = \ liblivestatus_la_CPPFLAGS = \
$(BOOST_CPPFLAGS) \ $(BOOST_CPPFLAGS) \

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/andfilter.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef ANDFILTER_H #ifndef ANDFILTER_H
#define ANDFILTER_H #define ANDFILTER_H
#include "livestatus/combinerfilter.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,8 +17,9 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/attributefilter.h"
#include "base/convert.h" #include "base/convert.h"
#include "base/array.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef ATTRIBUTEFILTER_H #ifndef ATTRIBUTEFILTER_H
#define ATTRIBUTEFILTER_H #define ATTRIBUTEFILTER_H
#include "livestatus/filter.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/column.h"
using namespace icinga; using namespace icinga;
using namespace livestatus; using namespace livestatus;

View File

@ -20,6 +20,11 @@
#ifndef COLUMN_H #ifndef COLUMN_H
#define COLUMN_H #define COLUMN_H
#include "base/value.h"
#include <boost/function.hpp>
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/combinerfilter.h"
using namespace icinga; using namespace icinga;
using namespace livestatus; using namespace livestatus;

View File

@ -20,6 +20,10 @@
#ifndef COMBINERFILTER_H #ifndef COMBINERFILTER_H
#define COMBINERFILTER_H #define COMBINERFILTER_H
#include "livestatus/filter.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/commentstable.h"
#include "icinga/service.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>

View File

@ -20,6 +20,10 @@
#ifndef COMMENTSTABLE_H #ifndef COMMENTSTABLE_H
#define COMMENTSTABLE_H #define COMMENTSTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,9 +17,11 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/component.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/tcpsocket.h"
#include "base/application.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,12 @@
#ifndef LIVESTATUSCOMPONENT_H #ifndef LIVESTATUSCOMPONENT_H
#define LIVESTATUSCOMPONENT_H #define LIVESTATUSCOMPONENT_H
#include "livestatus/connection.h"
#include "base/dynamicobject.h"
#include "base/socket.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/connection.h"
#include "livestatus/query.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef LIVESTATUSCONNECTION_H #ifndef LIVESTATUSCONNECTION_H
#define LIVESTATUSCONNECTION_H #define LIVESTATUSCONNECTION_H
#include "base/connection.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/contactgroupstable.h"
#include "icinga/usergroup.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,10 @@
#ifndef CONTACTGROUPSTABLE_H #ifndef CONTACTGROUPSTABLE_H
#define CONTACTGROUPSTABLE_H #define CONTACTGROUPSTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/contactstable.h"
#include "icinga/user.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,10 @@
#ifndef CONTACTSTABLE_H #ifndef CONTACTSTABLE_H
#define CONTACTSTABLE_H #define CONTACTSTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/downtimestable.h"
#include "icinga/service.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>

View File

@ -20,6 +20,10 @@
#ifndef DOWNTIMESTABLE_H #ifndef DOWNTIMESTABLE_H
#define DOWNTIMESTABLE_H #define DOWNTIMESTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,9 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/filter.h"
using namespace icinga;
using namespace livestatus; using namespace livestatus;
Filter::Filter(void) Filter::Filter(void)

View File

@ -20,6 +20,8 @@
#ifndef FILTER_H #ifndef FILTER_H
#define FILTER_H #define FILTER_H
#include "livestatus/table.h"
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/hoststable.h"
#include "icinga/host.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,10 @@
#ifndef HOSTSTABLE_H #ifndef HOSTSTABLE_H
#define HOSTSTABLE_H #define HOSTSTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -1,54 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 livestatus Livestatus component
*
* The livestatus component implements livestatus queries.
*/
#include "base/i2-base.h"
#include "remoting/i2-remoting.h"
#include "icinga/i2-icinga.h"
using namespace icinga;
#include "livestatus/connection.h"
#include "livestatus/column.h"
#include "livestatus/table.h"
#include "livestatus/filter.h"
#include "livestatus/combinerfilter.h"
#include "livestatus/orfilter.h"
#include "livestatus/andfilter.h"
#include "livestatus/negatefilter.h"
#include "livestatus/attributefilter.h"
#include "livestatus/query.h"
#include "livestatus/statustable.h"
#include "livestatus/contactgroupstable.h"
#include "livestatus/contactstable.h"
#include "livestatus/hoststable.h"
#include "livestatus/servicestable.h"
#include "livestatus/commentstable.h"
#include "livestatus/downtimestable.h"
#include "livestatus/component.h"
#endif /* I2LIVESTATUS_H */

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/negatefilter.h"
using namespace icinga; using namespace icinga;
using namespace livestatus; using namespace livestatus;

View File

@ -20,6 +20,10 @@
#ifndef NEGATEFILTER_H #ifndef NEGATEFILTER_H
#define NEGATEFILTER_H #define NEGATEFILTER_H
#include "livestatus/filter.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/orfilter.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef ORFILTER_H #ifndef ORFILTER_H
#define ORFILTER_H #define ORFILTER_H
#include "livestatus/combinerfilter.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,13 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/query.h"
#include "livestatus/attributefilter.h"
#include "livestatus/negatefilter.h"
#include "livestatus/orfilter.h"
#include "livestatus/andfilter.h"
#include "icinga/externalcommandprocessor.h"
#include "base/utility.h"
#include "base/convert.h" #include "base/convert.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
@ -160,7 +166,7 @@ Query::Query(const std::vector<String>& lines)
m_Stats.swap(stats); m_Stats.swap(stats);
} }
void Query::PrintResultSet(ostream& fp, const std::vector<String>& columns, const Array::Ptr& rs) void Query::PrintResultSet(std::ostream& fp, const std::vector<String>& columns, const Array::Ptr& rs)
{ {
if (m_OutputFormat == "csv" && m_Columns.size() == 0 && m_ColumnHeaders) { if (m_OutputFormat == "csv" && m_Columns.size() == 0 && m_ColumnHeaders) {
bool first = true; bool first = true;

View File

@ -20,6 +20,13 @@
#ifndef QUERY_H #ifndef QUERY_H
#define QUERY_H #define QUERY_H
#include "livestatus/filter.h"
#include "base/object.h"
#include "base/array.h"
#include "base/stream.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {
@ -61,7 +68,7 @@ private:
int m_ErrorCode; int m_ErrorCode;
String m_ErrorMessage; String m_ErrorMessage;
void PrintResultSet(ostream& fp, const std::vector<String>& columns, const Array::Ptr& rs); void PrintResultSet(std::ostream& fp, const std::vector<String>& columns, const Array::Ptr& rs);
void ExecuteGetHelper(const Stream::Ptr& stream); void ExecuteGetHelper(const Stream::Ptr& stream);
void ExecuteCommandHelper(const Stream::Ptr& stream); void ExecuteCommandHelper(const Stream::Ptr& stream);

View File

@ -17,7 +17,9 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/servicestable.h"
#include "livestatus/hoststable.h"
#include "icinga/service.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,10 @@
#ifndef SERVICESTABLE_H #ifndef SERVICESTABLE_H
#define SERVICESTABLE_H #define SERVICESTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/statustable.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef STATUSTABLE_H #ifndef STATUSTABLE_H
#define STATUSTABLE_H #define STATUSTABLE_H
#include "livestatus/table.h"
using namespace icinga;
namespace livestatus namespace livestatus
{ {

View File

@ -17,10 +17,21 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-livestatus.h" #include "livestatus/table.h"
#include "livestatus/statustable.h"
#include "livestatus/contactgroupstable.h"
#include "livestatus/contactstable.h"
#include "livestatus/hoststable.h"
#include "livestatus/servicestable.h"
#include "livestatus/commentstable.h"
#include "livestatus/downtimestable.h"
#include "livestatus/filter.h"
#include "base/array.h"
#include "base/dictionary.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/bind.hpp>
using namespace icinga; using namespace icinga;
using namespace livestatus; using namespace livestatus;

View File

@ -20,6 +20,9 @@
#ifndef TABLE_H #ifndef TABLE_H
#define TABLE_H #define TABLE_H
#include "livestatus/column.h"
#include "base/object.h"
namespace livestatus namespace livestatus
{ {

View File

@ -1,35 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2NOTIFICATION_H
#define I2NOTIFICATION_H
/**
* @defgroup notification Notification component
*
* The notification component is in charge of sending downtime notifications.
*/
#include "base/i2-base.h"
#include "remoting/i2-remoting.h"
#include "icinga/i2-icinga.h"
#include "notification/notificationcomponent.h"
#endif /* I2NOTIFICATION_H */

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-notification.h" #include "notification/notificationcomponent.h"
#include "icinga/service.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>

View File

@ -20,6 +20,9 @@
#ifndef NOTIFICATIONCOMPONENT_H #ifndef NOTIFICATIONCOMPONENT_H
#define NOTIFICATIONCOMPONENT_H #define NOTIFICATIONCOMPONENT_H
#include "remoting/endpoint.h"
#include "base/dynamicobject.h"
namespace icinga namespace icinga
{ {

View File

@ -1,35 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012 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 I2REPLICATION_H
#define I2REPLICATION_H
/**
* @defgroup replication Replication component
*
* Replicates Icinga 2 objects to remote instances.
*/
#include "base/i2-base.h"
#include "remoting/i2-remoting.h"
#include "icinga/i2-icinga.h"
#include "replication/replicationcomponent.h"
#endif /* I2REPLICATION_H */

View File

@ -17,7 +17,10 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-replication.h" #include "replication/replicationcomponent.h"
#include "icinga/service.h"
#include "icinga/checkresultmessage.h"
#include "remoting/endpointmanager.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"

View File

@ -17,8 +17,11 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#ifndef CIBSYNCCOMPONENT_H #ifndef REPLICATIONCOMPONENT_H
#define CIBSYNCCOMPONENT_H #define REPLICATIONCOMPONENT_H
#include "base/dynamicobject.h"
#include "remoting/endpoint.h"
namespace icinga namespace icinga
{ {
@ -57,4 +60,4 @@ private:
} }
#endif /* CIBSYNCCOMPONENT_H */ #endif /* REPLICATIONCOMPONENT_H */

View File

@ -17,8 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "base/i2-base.h" #include "config/configcompilercontext.h"
#include "config/i2-config.h" #include "config/configcompiler.h"
#include "base/application.h" #include "base/application.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include <boost/program_options.hpp> #include <boost/program_options.hpp>

View File

@ -625,8 +625,11 @@ static yyconst flex_int32_t yy_rule_can_match_eol[57] =
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configcompiler.h"
#include "config_parser.h" #include "config/expression.h"
#include "config/typerule.h"
#include "config/configcompilercontext.h"
#include "config/config_parser.h"
#include <sstream> #include <sstream>
using namespace icinga; using namespace icinga;
@ -690,7 +693,7 @@ static void lb_append_char(lex_buf *lb, char new_char)
#line 694 "config_lexer.cc" #line 697 "config_lexer.cc"
#define INITIAL 0 #define INITIAL 0
#define C_COMMENT 1 #define C_COMMENT 1
@ -938,11 +941,11 @@ YY_DECL
register int yy_act; register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 92 "config_lexer.ll" #line 95 "config_lexer.ll"
lex_buf string_buf; lex_buf string_buf;
#line 946 "config_lexer.cc" #line 949 "config_lexer.cc"
yylval = yylval_param; yylval = yylval_param;
@ -1039,12 +1042,12 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 95 "config_lexer.ll" #line 98 "config_lexer.ll"
{ lb_init(&string_buf); BEGIN(STRING); } { lb_init(&string_buf); BEGIN(STRING); }
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 97 "config_lexer.ll" #line 100 "config_lexer.ll"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
@ -1058,7 +1061,7 @@ YY_RULE_SETUP
case 3: case 3:
/* rule 3 can match eol */ /* rule 3 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 107 "config_lexer.ll" #line 110 "config_lexer.ll"
{ {
std::ostringstream msgbuf; std::ostringstream msgbuf;
msgbuf << "Unterminated string found: " << *yylloc; msgbuf << "Unterminated string found: " << *yylloc;
@ -1068,7 +1071,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 114 "config_lexer.ll" #line 117 "config_lexer.ll"
{ {
/* octal escape sequence */ /* octal escape sequence */
int result; int result;
@ -1087,7 +1090,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 130 "config_lexer.ll" #line 133 "config_lexer.ll"
{ {
/* generate error - bad escape sequence; something /* generate error - bad escape sequence; something
* like '\48' or '\0777777' * like '\48' or '\0777777'
@ -1099,38 +1102,38 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 139 "config_lexer.ll" #line 142 "config_lexer.ll"
{ lb_append_char(&string_buf, '\n'); } { lb_append_char(&string_buf, '\n'); }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 140 "config_lexer.ll" #line 143 "config_lexer.ll"
{ lb_append_char(&string_buf, '\t'); } { lb_append_char(&string_buf, '\t'); }
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 141 "config_lexer.ll" #line 144 "config_lexer.ll"
{ lb_append_char(&string_buf, '\r'); } { lb_append_char(&string_buf, '\r'); }
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
#line 142 "config_lexer.ll" #line 145 "config_lexer.ll"
{ lb_append_char(&string_buf, '\b'); } { lb_append_char(&string_buf, '\b'); }
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 143 "config_lexer.ll" #line 146 "config_lexer.ll"
{ lb_append_char(&string_buf, '\f'); } { lb_append_char(&string_buf, '\f'); }
YY_BREAK YY_BREAK
case 11: case 11:
/* rule 11 can match eol */ /* rule 11 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 144 "config_lexer.ll" #line 147 "config_lexer.ll"
{ lb_append_char(&string_buf, yytext[1]); } { lb_append_char(&string_buf, yytext[1]); }
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 146 "config_lexer.ll" #line 149 "config_lexer.ll"
{ {
char *yptr = yytext; char *yptr = yytext;
@ -1140,12 +1143,12 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 153 "config_lexer.ll" #line 156 "config_lexer.ll"
{ lb_init(&string_buf); BEGIN(HEREDOC); } { lb_init(&string_buf); BEGIN(HEREDOC); }
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 155 "config_lexer.ll" #line 158 "config_lexer.ll"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
@ -1159,224 +1162,224 @@ YY_RULE_SETUP
case 15: case 15:
/* rule 15 can match eol */ /* rule 15 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 165 "config_lexer.ll" #line 168 "config_lexer.ll"
{ lb_append_char(&string_buf, yytext[0]); } { lb_append_char(&string_buf, yytext[0]); }
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 168 "config_lexer.ll" #line 171 "config_lexer.ll"
BEGIN(C_COMMENT); BEGIN(C_COMMENT);
YY_BREAK YY_BREAK
case 17: case 17:
YY_RULE_SETUP YY_RULE_SETUP
#line 172 "config_lexer.ll" #line 175 "config_lexer.ll"
BEGIN(INITIAL); BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 18: case 18:
/* rule 18 can match eol */ /* rule 18 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 173 "config_lexer.ll" #line 176 "config_lexer.ll"
/* ignore comment */ /* ignore comment */
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 174 "config_lexer.ll" #line 177 "config_lexer.ll"
/* ignore star */ /* ignore star */
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 177 "config_lexer.ll" #line 180 "config_lexer.ll"
/* ignore C++-style comments */ /* ignore C++-style comments */
YY_BREAK YY_BREAK
case 21: case 21:
/* rule 21 can match eol */ /* rule 21 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 178 "config_lexer.ll" #line 181 "config_lexer.ll"
/* ignore whitespace */ /* ignore whitespace */
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 181 "config_lexer.ll" #line 184 "config_lexer.ll"
return T_TYPE; return T_TYPE;
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 182 "config_lexer.ll" #line 185 "config_lexer.ll"
{ yylval->type = TypeDictionary; return T_TYPE_DICTIONARY; } { yylval->type = TypeDictionary; return T_TYPE_DICTIONARY; }
YY_BREAK YY_BREAK
case 24: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 183 "config_lexer.ll" #line 186 "config_lexer.ll"
{ yylval->type = TypeArray; return T_TYPE_ARRAY; } { yylval->type = TypeArray; return T_TYPE_ARRAY; }
YY_BREAK YY_BREAK
case 25: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 184 "config_lexer.ll" #line 187 "config_lexer.ll"
{ yylval->type = TypeNumber; return T_TYPE_NUMBER; } { yylval->type = TypeNumber; return T_TYPE_NUMBER; }
YY_BREAK YY_BREAK
case 26: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 185 "config_lexer.ll" #line 188 "config_lexer.ll"
{ yylval->type = TypeString; return T_TYPE_STRING; } { yylval->type = TypeString; return T_TYPE_STRING; }
YY_BREAK YY_BREAK
case 27: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 186 "config_lexer.ll" #line 189 "config_lexer.ll"
{ yylval->type = TypeScalar; return T_TYPE_SCALAR; } { yylval->type = TypeScalar; return T_TYPE_SCALAR; }
YY_BREAK YY_BREAK
case 28: case 28:
YY_RULE_SETUP YY_RULE_SETUP
#line 187 "config_lexer.ll" #line 190 "config_lexer.ll"
{ yylval->type = TypeAny; return T_TYPE_ANY; } { yylval->type = TypeAny; return T_TYPE_ANY; }
YY_BREAK YY_BREAK
case 29: case 29:
YY_RULE_SETUP YY_RULE_SETUP
#line 188 "config_lexer.ll" #line 191 "config_lexer.ll"
{ return T_VALIDATOR; } { return T_VALIDATOR; }
YY_BREAK YY_BREAK
case 30: case 30:
YY_RULE_SETUP YY_RULE_SETUP
#line 189 "config_lexer.ll" #line 192 "config_lexer.ll"
{ return T_REQUIRE; } { return T_REQUIRE; }
YY_BREAK YY_BREAK
case 31: case 31:
YY_RULE_SETUP YY_RULE_SETUP
#line 190 "config_lexer.ll" #line 193 "config_lexer.ll"
{ return T_ATTRIBUTE; } { return T_ATTRIBUTE; }
YY_BREAK YY_BREAK
case 32: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 191 "config_lexer.ll" #line 194 "config_lexer.ll"
return T_ABSTRACT; return T_ABSTRACT;
YY_BREAK YY_BREAK
case 33: case 33:
YY_RULE_SETUP YY_RULE_SETUP
#line 192 "config_lexer.ll" #line 195 "config_lexer.ll"
return T_LOCAL; return T_LOCAL;
YY_BREAK YY_BREAK
case 34: case 34:
YY_RULE_SETUP YY_RULE_SETUP
#line 193 "config_lexer.ll" #line 196 "config_lexer.ll"
return T_OBJECT; return T_OBJECT;
YY_BREAK YY_BREAK
case 35: case 35:
YY_RULE_SETUP YY_RULE_SETUP
#line 194 "config_lexer.ll" #line 197 "config_lexer.ll"
return T_TEMPLATE; return T_TEMPLATE;
YY_BREAK YY_BREAK
case 36: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 195 "config_lexer.ll" #line 198 "config_lexer.ll"
return T_INCLUDE; return T_INCLUDE;
YY_BREAK YY_BREAK
case 37: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 196 "config_lexer.ll" #line 199 "config_lexer.ll"
return T_LIBRARY; return T_LIBRARY;
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 197 "config_lexer.ll" #line 200 "config_lexer.ll"
return T_INHERITS; return T_INHERITS;
YY_BREAK YY_BREAK
case 39: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 198 "config_lexer.ll" #line 201 "config_lexer.ll"
return T_NULL; return T_NULL;
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 199 "config_lexer.ll" #line 202 "config_lexer.ll"
return T_PARTIAL; return T_PARTIAL;
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 200 "config_lexer.ll" #line 203 "config_lexer.ll"
{ yylval->num = 1; return T_NUMBER; } { yylval->num = 1; return T_NUMBER; }
YY_BREAK YY_BREAK
case 42: case 42:
YY_RULE_SETUP YY_RULE_SETUP
#line 201 "config_lexer.ll" #line 204 "config_lexer.ll"
{ yylval->num = 0; return T_NUMBER; } { yylval->num = 0; return T_NUMBER; }
YY_BREAK YY_BREAK
case 43: case 43:
YY_RULE_SETUP YY_RULE_SETUP
#line 202 "config_lexer.ll" #line 205 "config_lexer.ll"
{ yylval->text = strdup(yytext); return T_IDENTIFIER; } { yylval->text = strdup(yytext); return T_IDENTIFIER; }
YY_BREAK YY_BREAK
case 44: case 44:
/* rule 44 can match eol */ /* rule 44 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 203 "config_lexer.ll" #line 206 "config_lexer.ll"
{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; } { yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING_ANGLE; }
YY_BREAK YY_BREAK
case 45: case 45:
YY_RULE_SETUP YY_RULE_SETUP
#line 204 "config_lexer.ll" #line 207 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; } { yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
YY_BREAK YY_BREAK
case 46: case 46:
YY_RULE_SETUP YY_RULE_SETUP
#line 205 "config_lexer.ll" #line 208 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; } { yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
YY_BREAK YY_BREAK
case 47: case 47:
YY_RULE_SETUP YY_RULE_SETUP
#line 206 "config_lexer.ll" #line 209 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; } { yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
YY_BREAK YY_BREAK
case 48: case 48:
YY_RULE_SETUP YY_RULE_SETUP
#line 207 "config_lexer.ll" #line 210 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL); return T_NUMBER; } { yylval->num = strtod(yytext, NULL); return T_NUMBER; }
YY_BREAK YY_BREAK
case 49: case 49:
YY_RULE_SETUP YY_RULE_SETUP
#line 208 "config_lexer.ll" #line 211 "config_lexer.ll"
{ yylval->num = strtod(yytext, NULL); return T_NUMBER; } { yylval->num = strtod(yytext, NULL); return T_NUMBER; }
YY_BREAK YY_BREAK
case 50: case 50:
YY_RULE_SETUP YY_RULE_SETUP
#line 209 "config_lexer.ll" #line 212 "config_lexer.ll"
{ yylval->op = OperatorSet; return T_EQUAL; } { yylval->op = OperatorSet; return T_EQUAL; }
YY_BREAK YY_BREAK
case 51: case 51:
YY_RULE_SETUP YY_RULE_SETUP
#line 210 "config_lexer.ll" #line 213 "config_lexer.ll"
{ yylval->op = OperatorPlus; return T_PLUS_EQUAL; } { yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
YY_BREAK YY_BREAK
case 52: case 52:
YY_RULE_SETUP YY_RULE_SETUP
#line 211 "config_lexer.ll" #line 214 "config_lexer.ll"
{ yylval->op = OperatorMinus; return T_MINUS_EQUAL; } { yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 212 "config_lexer.ll" #line 215 "config_lexer.ll"
{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; } { yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 213 "config_lexer.ll" #line 216 "config_lexer.ll"
{ yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; } { yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 216 "config_lexer.ll" #line 219 "config_lexer.ll"
return yytext[0]; return yytext[0];
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
#line 218 "config_lexer.ll" #line 221 "config_lexer.ll"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1380 "config_lexer.cc" #line 1383 "config_lexer.cc"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(C_COMMENT): case YY_STATE_EOF(C_COMMENT):
case YY_STATE_EOF(STRING): case YY_STATE_EOF(STRING):
@ -2567,7 +2570,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 218 "config_lexer.ll" #line 221 "config_lexer.ll"

View File

@ -18,8 +18,11 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configcompiler.h"
#include "config_parser.h" #include "config/expression.h"
#include "config/typerule.h"
#include "config/configcompilercontext.h"
#include "config/config_parser.h"
#include <sstream> #include <sstream>
using namespace icinga; using namespace icinga;

View File

@ -117,18 +117,27 @@ extern int yydebug;
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "i2-config.h"
#include "config/expression.h"
#include "config/expressionlist.h"
#include "config/configitembuilder.h"
#include "config/configcompiler.h"
#include "config/configcompilercontext.h"
#include "config/typerule.h"
#include "config/typerulelist.h"
#include "base/value.h"
#include "base/array.h"
#include <sstream> #include <sstream>
#include <stack> #include <stack>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;
#define YYLTYPE DebugInfo #define YYLTYPE icinga::DebugInfo
/* Line 387 of yacc.c */ /* Line 387 of yacc.c */
#line 132 "config_parser.cc" #line 141 "config_parser.cc"
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
@ -202,7 +211,7 @@ using namespace icinga;
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 387 of yacc.c */ /* Line 387 of yacc.c */
#line 41 "config_parser.yy" #line 50 "config_parser.yy"
char *text; char *text;
double num; double num;
@ -212,7 +221,7 @@ typedef union YYSTYPE
/* Line 387 of yacc.c */ /* Line 387 of yacc.c */
#line 216 "config_parser.cc" #line 225 "config_parser.cc"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@ -251,7 +260,7 @@ int yyparse ();
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 390 of yacc.c */ /* Line 390 of yacc.c */
#line 88 "config_parser.yy" #line 97 "config_parser.yy"
int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner); int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
@ -289,7 +298,7 @@ void ConfigCompiler::Compile(void)
/* Line 390 of yacc.c */ /* Line 390 of yacc.c */
#line 293 "config_parser.cc" #line 302 "config_parser.cc"
#ifdef short #ifdef short
# undef short # undef short
@ -606,14 +615,14 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 126, 126, 127, 130, 130, 130, 130, 133, 138, 0, 135, 135, 136, 139, 139, 139, 139, 142, 147,
144, 150, 151, 159, 158, 188, 191, 198, 197, 209, 153, 159, 160, 168, 167, 197, 200, 207, 206, 218,
210, 212, 213, 214, 217, 222, 227, 234, 243, 244, 219, 221, 222, 223, 226, 231, 236, 243, 252, 253,
251, 252, 253, 254, 255, 256, 263, 268, 263, 293, 260, 261, 262, 263, 264, 265, 272, 277, 272, 302,
294, 299, 300, 303, 307, 313, 314, 317, 324, 325, 303, 308, 309, 312, 316, 322, 323, 326, 333, 334,
329, 328, 340, 341, 343, 344, 345, 348, 356, 372, 338, 337, 349, 350, 352, 353, 354, 357, 365, 381,
373, 374, 375, 376, 383, 382, 394, 395, 397, 398, 382, 383, 384, 385, 392, 391, 403, 404, 406, 407,
402, 408, 413, 417, 421, 427, 428 411, 417, 422, 426, 430, 436, 437
}; };
#endif #endif
@ -1709,7 +1718,7 @@ yyreduce:
{ {
case 8: case 8:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 134 "config_parser.yy" #line 143 "config_parser.yy"
{ {
context->HandleInclude((yyvsp[(2) - (2)].text), false, yylloc); context->HandleInclude((yyvsp[(2) - (2)].text), false, yylloc);
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1718,7 +1727,7 @@ yyreduce:
case 9: case 9:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 139 "config_parser.yy" #line 148 "config_parser.yy"
{ {
context->HandleInclude((yyvsp[(2) - (2)].text), true, yylloc); context->HandleInclude((yyvsp[(2) - (2)].text), true, yylloc);
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1727,7 +1736,7 @@ yyreduce:
case 10: case 10:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 145 "config_parser.yy" #line 154 "config_parser.yy"
{ {
context->HandleLibrary((yyvsp[(2) - (2)].text)); context->HandleLibrary((yyvsp[(2) - (2)].text));
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1736,7 +1745,7 @@ yyreduce:
case 12: case 12:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 152 "config_parser.yy" #line 161 "config_parser.yy"
{ {
(yyval.text) = (yyvsp[(1) - (1)].text); (yyval.text) = (yyvsp[(1) - (1)].text);
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
@ -1745,7 +1754,7 @@ yyreduce:
case 13: case 13:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 159 "config_parser.yy" #line 168 "config_parser.yy"
{ {
String name = String((yyvsp[(3) - (3)].text)); String name = String((yyvsp[(3) - (3)].text));
free((yyvsp[(3) - (3)].text)); free((yyvsp[(3) - (3)].text));
@ -1764,7 +1773,7 @@ yyreduce:
case 14: case 14:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 174 "config_parser.yy" #line 183 "config_parser.yy"
{ {
TypeRuleList::Ptr ruleList = *(yyvsp[(6) - (6)].variant); TypeRuleList::Ptr ruleList = *(yyvsp[(6) - (6)].variant);
m_Type->GetRuleList()->AddRules(ruleList); m_Type->GetRuleList()->AddRules(ruleList);
@ -1780,7 +1789,7 @@ yyreduce:
case 15: case 15:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 188 "config_parser.yy" #line 197 "config_parser.yy"
{ {
(yyval.num) = 0; (yyval.num) = 0;
} }
@ -1788,7 +1797,7 @@ yyreduce:
case 16: case 16:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 192 "config_parser.yy" #line 201 "config_parser.yy"
{ {
(yyval.num) = 1; (yyval.num) = 1;
} }
@ -1796,7 +1805,7 @@ yyreduce:
case 17: case 17:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 198 "config_parser.yy" #line 207 "config_parser.yy"
{ {
m_RuleLists.push(boost::make_shared<TypeRuleList>()); m_RuleLists.push(boost::make_shared<TypeRuleList>());
} }
@ -1804,7 +1813,7 @@ yyreduce:
case 18: case 18:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 203 "config_parser.yy" #line 212 "config_parser.yy"
{ {
(yyval.variant) = new Value(m_RuleLists.top()); (yyval.variant) = new Value(m_RuleLists.top());
m_RuleLists.pop(); m_RuleLists.pop();
@ -1813,7 +1822,7 @@ yyreduce:
case 24: case 24:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 218 "config_parser.yy" #line 227 "config_parser.yy"
{ {
m_RuleLists.top()->AddRequire((yyvsp[(2) - (2)].text)); m_RuleLists.top()->AddRequire((yyvsp[(2) - (2)].text));
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1822,7 +1831,7 @@ yyreduce:
case 25: case 25:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 223 "config_parser.yy" #line 232 "config_parser.yy"
{ {
m_RuleLists.top()->SetValidator((yyvsp[(2) - (2)].text)); m_RuleLists.top()->SetValidator((yyvsp[(2) - (2)].text));
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1831,7 +1840,7 @@ yyreduce:
case 26: case 26:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 228 "config_parser.yy" #line 237 "config_parser.yy"
{ {
TypeRule rule((yyvsp[(2) - (3)].type), (yyvsp[(3) - (3)].text), TypeRuleList::Ptr(), yylloc); TypeRule rule((yyvsp[(2) - (3)].type), (yyvsp[(3) - (3)].text), TypeRuleList::Ptr(), yylloc);
free((yyvsp[(3) - (3)].text)); free((yyvsp[(3) - (3)].text));
@ -1842,7 +1851,7 @@ yyreduce:
case 27: case 27:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 235 "config_parser.yy" #line 244 "config_parser.yy"
{ {
TypeRule rule((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].text), *(yyvsp[(4) - (4)].variant), yylloc); TypeRule rule((yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].text), *(yyvsp[(4) - (4)].variant), yylloc);
free((yyvsp[(3) - (4)].text)); free((yyvsp[(3) - (4)].text));
@ -1853,7 +1862,7 @@ yyreduce:
case 29: case 29:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 245 "config_parser.yy" #line 254 "config_parser.yy"
{ {
m_Type->SetParent((yyvsp[(2) - (2)].text)); m_Type->SetParent((yyvsp[(2) - (2)].text));
free((yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text));
@ -1862,7 +1871,7 @@ yyreduce:
case 35: case 35:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 257 "config_parser.yy" #line 266 "config_parser.yy"
{ {
(yyval.type) = (yyvsp[(1) - (1)].type); (yyval.type) = (yyvsp[(1) - (1)].type);
} }
@ -1870,7 +1879,7 @@ yyreduce:
case 36: case 36:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 263 "config_parser.yy" #line 272 "config_parser.yy"
{ {
m_Abstract = false; m_Abstract = false;
m_Local = false; m_Local = false;
@ -1879,7 +1888,7 @@ yyreduce:
case 37: case 37:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 268 "config_parser.yy" #line 277 "config_parser.yy"
{ {
m_Item = boost::make_shared<ConfigItemBuilder>(yylloc); m_Item = boost::make_shared<ConfigItemBuilder>(yylloc);
@ -1895,7 +1904,7 @@ yyreduce:
case 38: case 38:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 280 "config_parser.yy" #line 289 "config_parser.yy"
{ {
ExpressionList::Ptr exprl = *(yyvsp[(7) - (7)].variant); ExpressionList::Ptr exprl = *(yyvsp[(7) - (7)].variant);
delete (yyvsp[(7) - (7)].variant); delete (yyvsp[(7) - (7)].variant);
@ -1911,7 +1920,7 @@ yyreduce:
case 40: case 40:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 295 "config_parser.yy" #line 304 "config_parser.yy"
{ {
m_Abstract = true; m_Abstract = true;
} }
@ -1919,7 +1928,7 @@ yyreduce:
case 43: case 43:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 304 "config_parser.yy" #line 313 "config_parser.yy"
{ {
m_Abstract = true; m_Abstract = true;
} }
@ -1927,7 +1936,7 @@ yyreduce:
case 44: case 44:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 308 "config_parser.yy" #line 317 "config_parser.yy"
{ {
m_Local = true; m_Local = true;
} }
@ -1935,7 +1944,7 @@ yyreduce:
case 47: case 47:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 318 "config_parser.yy" #line 327 "config_parser.yy"
{ {
m_Item->AddParent((yyvsp[(1) - (1)].text)); m_Item->AddParent((yyvsp[(1) - (1)].text));
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
@ -1944,7 +1953,7 @@ yyreduce:
case 50: case 50:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 329 "config_parser.yy" #line 338 "config_parser.yy"
{ {
m_ExpressionLists.push(boost::make_shared<ExpressionList>()); m_ExpressionLists.push(boost::make_shared<ExpressionList>());
} }
@ -1952,7 +1961,7 @@ yyreduce:
case 51: case 51:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 334 "config_parser.yy" #line 343 "config_parser.yy"
{ {
(yyval.variant) = new Value(m_ExpressionLists.top()); (yyval.variant) = new Value(m_ExpressionLists.top());
m_ExpressionLists.pop(); m_ExpressionLists.pop();
@ -1961,7 +1970,7 @@ yyreduce:
case 57: case 57:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 349 "config_parser.yy" #line 358 "config_parser.yy"
{ {
Expression expr((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc); Expression expr((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc);
free((yyvsp[(1) - (3)].text)); free((yyvsp[(1) - (3)].text));
@ -1973,7 +1982,7 @@ yyreduce:
case 58: case 58:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 357 "config_parser.yy" #line 366 "config_parser.yy"
{ {
Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc); Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc);
free((yyvsp[(3) - (6)].text)); free((yyvsp[(3) - (6)].text));
@ -1991,7 +2000,7 @@ yyreduce:
case 63: case 63:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 377 "config_parser.yy" #line 386 "config_parser.yy"
{ {
(yyval.op) = (yyvsp[(1) - (1)].op); (yyval.op) = (yyvsp[(1) - (1)].op);
} }
@ -1999,7 +2008,7 @@ yyreduce:
case 64: case 64:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 383 "config_parser.yy" #line 392 "config_parser.yy"
{ {
m_Arrays.push(boost::make_shared<Array>()); m_Arrays.push(boost::make_shared<Array>());
} }
@ -2007,7 +2016,7 @@ yyreduce:
case 65: case 65:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 388 "config_parser.yy" #line 397 "config_parser.yy"
{ {
(yyval.variant) = new Value(m_Arrays.top()); (yyval.variant) = new Value(m_Arrays.top());
m_Arrays.pop(); m_Arrays.pop();
@ -2016,7 +2025,7 @@ yyreduce:
case 69: case 69:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 399 "config_parser.yy" #line 408 "config_parser.yy"
{ {
m_Arrays.top()->Add(*(yyvsp[(1) - (1)].variant)); m_Arrays.top()->Add(*(yyvsp[(1) - (1)].variant));
} }
@ -2024,7 +2033,7 @@ yyreduce:
case 70: case 70:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 403 "config_parser.yy" #line 412 "config_parser.yy"
{ {
m_Arrays.top()->Add(*(yyvsp[(3) - (3)].variant)); m_Arrays.top()->Add(*(yyvsp[(3) - (3)].variant));
} }
@ -2032,7 +2041,7 @@ yyreduce:
case 71: case 71:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 409 "config_parser.yy" #line 418 "config_parser.yy"
{ {
(yyval.variant) = new Value((yyvsp[(1) - (1)].text)); (yyval.variant) = new Value((yyvsp[(1) - (1)].text));
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
@ -2041,7 +2050,7 @@ yyreduce:
case 72: case 72:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 414 "config_parser.yy" #line 423 "config_parser.yy"
{ {
(yyval.variant) = new Value((yyvsp[(1) - (1)].num)); (yyval.variant) = new Value((yyvsp[(1) - (1)].num));
} }
@ -2049,7 +2058,7 @@ yyreduce:
case 73: case 73:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 418 "config_parser.yy" #line 427 "config_parser.yy"
{ {
(yyval.variant) = new Value(); (yyval.variant) = new Value();
} }
@ -2057,7 +2066,7 @@ yyreduce:
case 74: case 74:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 422 "config_parser.yy" #line 431 "config_parser.yy"
{ {
(yyval.variant) = (yyvsp[(1) - (1)].variant); (yyval.variant) = (yyvsp[(1) - (1)].variant);
} }
@ -2065,7 +2074,7 @@ yyreduce:
case 76: case 76:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 429 "config_parser.yy" #line 438 "config_parser.yy"
{ {
(yyval.variant) = (yyvsp[(1) - (1)].variant); (yyval.variant) = (yyvsp[(1) - (1)].variant);
} }
@ -2073,7 +2082,7 @@ yyreduce:
/* Line 1792 of yacc.c */ /* Line 1792 of yacc.c */
#line 2077 "config_parser.cc" #line 2086 "config_parser.cc"
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires /* User semantic actions sometimes alter yychar, and that requires
@ -2312,5 +2321,5 @@ yyreturn:
/* Line 2055 of yacc.c */ /* Line 2055 of yacc.c */
#line 433 "config_parser.yy" #line 442 "config_parser.yy"

View File

@ -19,13 +19,22 @@
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "i2-config.h"
#include "config/expression.h"
#include "config/expressionlist.h"
#include "config/configitembuilder.h"
#include "config/configcompiler.h"
#include "config/configcompilercontext.h"
#include "config/typerule.h"
#include "config/typerulelist.h"
#include "base/value.h"
#include "base/array.h"
#include <sstream> #include <sstream>
#include <stack> #include <stack>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;
#define YYLTYPE DebugInfo #define YYLTYPE icinga::DebugInfo
} }

View File

@ -17,8 +17,10 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configcompiler.h"
#include "config/configitem.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/utility.h"
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,8 +20,11 @@
#ifndef CONFIGCOMPILER_H #ifndef CONFIGCOMPILER_H
#define CONFIGCOMPILER_H #define CONFIGCOMPILER_H
#include "config/i2-config.h"
#include "config/debuginfo.h"
#include "base/registry.h" #include "base/registry.h"
#include <iostream> #include <iostream>
#include <boost/function.hpp>
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configcompilercontext.h"
#include "base/utility.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,10 @@
#ifndef CONFIGCOMPILERCONTEXT_H #ifndef CONFIGCOMPILERCONTEXT_H
#define CONFIGCOMPILERCONTEXT_H #define CONFIGCOMPILERCONTEXT_H
#include "config/i2-config.h"
#include "config/configitem.h"
#include "config/configtype.h"
namespace icinga namespace icinga
{ {
@ -76,8 +80,8 @@ private:
int m_Flags; int m_Flags;
std::vector<shared_ptr<ConfigItem> > m_Items; std::vector<ConfigItem::Ptr> m_Items;
std::map<std::pair<String, String>, shared_ptr<ConfigItem> > m_ItemsMap; std::map<std::pair<String, String>, ConfigItem::Ptr> m_ItemsMap;
std::map<String, shared_ptr<ConfigType> > m_Types; std::map<String, shared_ptr<ConfigType> > m_Types;

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configitem.h"
#include "config/configcompilercontext.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"

View File

@ -20,6 +20,8 @@
#ifndef CONFIGITEM_H #ifndef CONFIGITEM_H
#define CONFIGITEM_H #define CONFIGITEM_H
#include "config/i2-config.h"
#include "config/expressionlist.h"
#include "base/dynamicobject.h" #include "base/dynamicobject.h"
namespace icinga namespace icinga

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configitembuilder.h"
#include "config/configcompilercontext.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <sstream> #include <sstream>

View File

@ -20,6 +20,12 @@
#ifndef CONFIGITEMBUILDER_H #ifndef CONFIGITEMBUILDER_H
#define CONFIGITEMBUILDER_H #define CONFIGITEMBUILDER_H
#include "config/debuginfo.h"
#include "config/expression.h"
#include "config/expressionlist.h"
#include "config/configitem.h"
#include "base/object.h"
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/configtype.h"
#include "config/configcompilercontext.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/convert.h" #include "base/convert.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>

View File

@ -20,6 +20,10 @@
#ifndef CONFIGTYPE_H #ifndef CONFIGTYPE_H
#define CONFIGTYPE_H #define CONFIGTYPE_H
#include "config/i2-config.h"
#include "config/typerule.h"
#include "config/typerulelist.h"
#include "config/configitem.h"
#include "base/array.h" #include "base/array.h"
namespace icinga namespace icinga

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/expression.h"
#include "config/expressionlist.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <sstream> #include <sstream>
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>

View File

@ -20,7 +20,10 @@
#ifndef EXPRESSION_H #ifndef EXPRESSION_H
#define EXPRESSION_H #define EXPRESSION_H
#include "config/i2-config.h"
#include "config/debuginfo.h"
#include "base/dictionary.h" #include "base/dictionary.h"
#include <iostream>
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/expressionlist.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,7 +20,10 @@
#ifndef EXPRESSIONLIST_H #ifndef EXPRESSIONLIST_H
#define EXPRESSIONLIST_H #define EXPRESSIONLIST_H
#include "config/i2-config.h"
#include "config/expression.h"
#include "base/dictionary.h" #include "base/dictionary.h"
#include <vector>
namespace icinga namespace icinga
{ {

View File

@ -28,7 +28,7 @@
* at runtime. * at runtime.
*/ */
//#include "base/i2-base.h" #include "base/i2-base.h"
#ifdef I2_CONFIG_BUILD #ifdef I2_CONFIG_BUILD
# define I2_CONFIG_API I2_EXPORT # define I2_CONFIG_API I2_EXPORT
@ -36,15 +36,4 @@
# define I2_CONFIG_API I2_IMPORT # define I2_CONFIG_API I2_IMPORT
#endif /* I2_CONFIG_BUILD */ #endif /* I2_CONFIG_BUILD */
/*#include "debuginfo.h"
#include "typerulelist.h"
#include "typerule.h"
#include "expression.h"
#include "expressionlist.h"
#include "configitem.h"
#include "configtype.h"
#include "configitembuilder.h"
#include "configcompiler.h"
#include "configcompilercontext.h"*/
#endif /* I2CONFIG_H */ #endif /* I2CONFIG_H */

View File

@ -17,8 +17,11 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/typerule.h"
#include "base/convert.h" #include "base/convert.h"
#include "base/utility.h"
#include "base/dictionary.h"
#include "base/array.h"
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,10 @@
#ifndef TYPERULE_H #ifndef TYPERULE_H
#define TYPERULE_H #define TYPERULE_H
#include "config/i2-config.h"
#include "config/typerulelist.h"
#include "config/debuginfo.h"
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-config.h" #include "config/typerulelist.h"
#include "config/typerule.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,7 @@
#ifndef TYPERULELIST_H #ifndef TYPERULELIST_H
#define TYPERULELIST_H #define TYPERULELIST_H
#include "config/i2-config.h"
#include "base/value.h" #include "base/value.h"
namespace icinga namespace icinga

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/api.h"
#include "base/scriptfunction.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,9 @@
#ifndef API_H #ifndef API_H
#define API_H #define API_H
#include "icinga/i2-icinga.h"
#include "base/scripttask.h"
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/checkresultmessage.h"
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,9 @@
#ifndef CHECKRESULTMESSAGE_H #ifndef CHECKRESULTMESSAGE_H
#define CHECKRESULTMESSAGE_H #define CHECKRESULTMESSAGE_H
#include "icinga/i2-icinga.h"
#include "remoting/messagepart.h"
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/cib.h"
using namespace icinga; using namespace icinga;

View File

@ -20,6 +20,7 @@
#ifndef CIB_H #ifndef CIB_H
#define CIB_H #define CIB_H
#include "icinga/i2-icinga.h"
#include "base/ringbuffer.h" #include "base/ringbuffer.h"
namespace icinga namespace icinga

View File

@ -17,10 +17,18 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/externalcommandprocessor.h"
#include "icinga/host.h"
#include "icinga/service.h"
#include "icinga/user.h"
#include "icinga/hostgroup.h"
#include "icinga/servicegroup.h"
#include "icinga/pluginchecktask.h"
#include "base/convert.h" #include "base/convert.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/application.h"
#include <fstream>
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>

View File

@ -20,6 +20,12 @@
#ifndef EXTERNALCOMMANDPROCESSOR_H #ifndef EXTERNALCOMMANDPROCESSOR_H
#define EXTERNALCOMMANDPROCESSOR_H #define EXTERNALCOMMANDPROCESSOR_H
#include "icinga/i2-icinga.h"
#include "base/qstring.h"
#include <vector>
#include <boost/thread/mutex.hpp>
#include <boost/thread/once.hpp>
namespace icinga namespace icinga
{ {

View File

@ -17,10 +17,14 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/host.h"
#include "icinga/service.h"
#include "icinga/hostgroup.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "config/configitembuilder.h"
#include "config/configcompilercontext.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>

View File

@ -20,6 +20,11 @@
#ifndef HOST_H #ifndef HOST_H
#define HOST_H #define HOST_H
#include "icinga/i2-icinga.h"
#include "base/array.h"
#include "base/dynamicobject.h"
#include "base/dictionary.h"
namespace icinga namespace icinga
{ {

View File

@ -17,7 +17,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/hostgroup.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/objectlock.h" #include "base/objectlock.h"

View File

@ -20,6 +20,11 @@
#ifndef HOSTGROUP_H #ifndef HOSTGROUP_H
#define HOSTGROUP_H #define HOSTGROUP_H
#include "icinga/i2-icinga.h"
#include "icinga/host.h"
#include "base/dynamicobject.h"
#include <set>
namespace icinga namespace icinga
{ {

View File

@ -28,8 +28,6 @@
*/ */
#include "base/i2-base.h" #include "base/i2-base.h"
#include "config/i2-config.h"
#include "remoting/i2-remoting.h"
#ifdef I2_ICINGA_BUILD #ifdef I2_ICINGA_BUILD
# define I2_ICINGA_API I2_EXPORT # define I2_ICINGA_API I2_EXPORT
@ -37,35 +35,4 @@
# define I2_ICINGA_API I2_IMPORT # define I2_ICINGA_API I2_IMPORT
#endif /* I2_ICINGA_BUILD */ #endif /* I2_ICINGA_BUILD */
#include "externalcommandprocessor.h"
#include "icingaapplication.h"
#include "timeperiod.h"
#include "user.h"
#include "usergroup.h"
#include "notification.h"
#include "notificationrequestmessage.h"
#include "host.h"
#include "hostgroup.h"
#include "service.h"
#include "servicegroup.h"
#include "macroprocessor.h"
#include "pluginchecktask.h"
#include "nullchecktask.h"
#include "pluginnotificationtask.h"
#include "checkresultmessage.h"
#include "cib.h"
#include "api.h"
#include "perfdatawriter.h"
#endif /* I2ICINGA_H */ #endif /* I2ICINGA_H */

View File

@ -17,7 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/icingaapplication.h"
#include "remoting/endpointmanager.h"
#include "base/dynamictype.h" #include "base/dynamictype.h"
#include "base/logger_fwd.h" #include "base/logger_fwd.h"
#include "base/objectlock.h" #include "base/objectlock.h"

View File

@ -20,6 +20,7 @@
#ifndef ICINGAAPPLICATION_H #ifndef ICINGAAPPLICATION_H
#define ICINGAAPPLICATION_H #define ICINGAAPPLICATION_H
#include "icinga/i2-icinga.h"
#include "base/application.h" #include "base/application.h"
namespace icinga namespace icinga

View File

@ -17,7 +17,9 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
#include "i2-icinga.h" #include "icinga/macroprocessor.h"
#include "base/utility.h"
#include "base/array.h"
#include "base/objectlock.h" #include "base/objectlock.h"
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>

View File

@ -20,6 +20,10 @@
#ifndef MACROPROCESSOR_H #ifndef MACROPROCESSOR_H
#define MACROPROCESSOR_H #define MACROPROCESSOR_H
#include "icinga/i2-icinga.h"
#include "base/dictionary.h"
#include <vector>
namespace icinga namespace icinga
{ {

Some files were not shown because too many files have changed in this diff Show More