]> granicus.if.org Git - icinga2/commitdiff
Refactor #includes (Part 3).
authorGunnar Beutner <gunnar@beutner.name>
Sun, 17 Mar 2013 19:19:29 +0000 (20:19 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Sun, 17 Mar 2013 19:19:29 +0000 (20:19 +0100)
140 files changed:
components/checker/Makefile.am
components/checker/checkercomponent.cpp
components/checker/checkercomponent.h
components/checker/i2-checker.h [deleted file]
components/compat/Makefile.am
components/compat/compatcomponent.cpp
components/compat/compatcomponent.h
components/compat/i2-compat.h [deleted file]
components/delegation/delegationcomponent.cpp
components/delegation/delegationcomponent.h
components/delegation/i2-delegation.h [deleted file]
components/demo/Makefile.am
components/demo/democomponent.cpp
components/demo/democomponent.h
components/demo/i2-demo.h [deleted file]
components/livestatus/Makefile.am
components/livestatus/andfilter.cpp
components/livestatus/andfilter.h
components/livestatus/attributefilter.cpp
components/livestatus/attributefilter.h
components/livestatus/column.cpp
components/livestatus/column.h
components/livestatus/combinerfilter.cpp
components/livestatus/combinerfilter.h
components/livestatus/commentstable.cpp
components/livestatus/commentstable.h
components/livestatus/component.cpp
components/livestatus/component.h
components/livestatus/connection.cpp
components/livestatus/connection.h
components/livestatus/contactgroupstable.cpp
components/livestatus/contactgroupstable.h
components/livestatus/contactstable.cpp
components/livestatus/contactstable.h
components/livestatus/downtimestable.cpp
components/livestatus/downtimestable.h
components/livestatus/filter.cpp
components/livestatus/filter.h
components/livestatus/hoststable.cpp
components/livestatus/hoststable.h
components/livestatus/i2-livestatus.h [deleted file]
components/livestatus/negatefilter.cpp
components/livestatus/negatefilter.h
components/livestatus/orfilter.cpp
components/livestatus/orfilter.h
components/livestatus/query.cpp
components/livestatus/query.h
components/livestatus/servicestable.cpp
components/livestatus/servicestable.h
components/livestatus/statustable.cpp
components/livestatus/statustable.h
components/livestatus/table.cpp
components/livestatus/table.h
components/notification/i2-notification.h [deleted file]
components/notification/notificationcomponent.cpp
components/notification/notificationcomponent.h
components/replication/i2-replication.h [deleted file]
components/replication/replicationcomponent.cpp
components/replication/replicationcomponent.h
icinga-app/icinga.cpp
lib/config/config_lexer.cc
lib/config/config_lexer.ll
lib/config/config_parser.cc
lib/config/config_parser.yy
lib/config/configcompiler.cpp
lib/config/configcompiler.h
lib/config/configcompilercontext.cpp
lib/config/configcompilercontext.h
lib/config/configitem.cpp
lib/config/configitem.h
lib/config/configitembuilder.cpp
lib/config/configitembuilder.h
lib/config/configtype.cpp
lib/config/configtype.h
lib/config/expression.cpp
lib/config/expression.h
lib/config/expressionlist.cpp
lib/config/expressionlist.h
lib/config/i2-config.h
lib/config/typerule.cpp
lib/config/typerule.h
lib/config/typerulelist.cpp
lib/config/typerulelist.h
lib/icinga/api.cpp
lib/icinga/api.h
lib/icinga/checkresultmessage.cpp
lib/icinga/checkresultmessage.h
lib/icinga/cib.cpp
lib/icinga/cib.h
lib/icinga/externalcommandprocessor.cpp
lib/icinga/externalcommandprocessor.h
lib/icinga/host.cpp
lib/icinga/host.h
lib/icinga/hostgroup.cpp
lib/icinga/hostgroup.h
lib/icinga/i2-icinga.h
lib/icinga/icingaapplication.cpp
lib/icinga/icingaapplication.h
lib/icinga/macroprocessor.cpp
lib/icinga/macroprocessor.h
lib/icinga/notification.cpp
lib/icinga/notification.h
lib/icinga/notificationrequestmessage.cpp
lib/icinga/notificationrequestmessage.h
lib/icinga/nullchecktask.cpp
lib/icinga/nullchecktask.h
lib/icinga/perfdatawriter.cpp
lib/icinga/perfdatawriter.h
lib/icinga/pluginchecktask.cpp
lib/icinga/pluginchecktask.h
lib/icinga/pluginnotificationtask.cpp
lib/icinga/pluginnotificationtask.h
lib/icinga/service-check.cpp
lib/icinga/service-comment.cpp
lib/icinga/service-downtime.cpp
lib/icinga/service-notification.cpp
lib/icinga/service.cpp
lib/icinga/service.h
lib/icinga/servicegroup.h
lib/icinga/timeperiod.cpp
lib/icinga/timeperiod.h
lib/icinga/user.cpp
lib/icinga/user.h
lib/icinga/usergroup.cpp
lib/icinga/usergroup.h
lib/python/i2-python.h
lib/remoting/Makefile.am
lib/remoting/endpoint.cpp
lib/remoting/endpoint.h
lib/remoting/endpointmanager.cpp
lib/remoting/endpointmanager.h
lib/remoting/i2-remoting.h
lib/remoting/jsonrpcconnection.cpp
lib/remoting/jsonrpcconnection.h
lib/remoting/messagepart.cpp
lib/remoting/messagepart.h
lib/remoting/requestmessage.cpp
lib/remoting/requestmessage.h
lib/remoting/responsemessage.cpp
lib/remoting/responsemessage.h

index d7897b28cdff94fc8b357f432bfe6cc6781ec7e9..e8e15cbcb4822b8507c67400ab3d5bb196fb173b 100644 (file)
@@ -12,8 +12,7 @@ EXTRA_DIST = \
 libchecker_la_SOURCES = \
        checkercomponent.cpp \
        checkercomponent.h \
-       checker-type.cpp \
-       i2-checker.h
+       checker-type.cpp
 
 libchecker_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
index 136e63cd0556231cb48c4f78b2bdb374d0760d6d..9140ae7f5e21341c6326ef989fce67b3b7becc71 100644 (file)
@@ -17,7 +17,8 @@
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
index d3139b91ebd7736e8d3a22ee6a782ec64f269749..253e8fa1647045a9e81daf3dbc3beb3ab462ecee 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef CHECKERCOMPONENT_H
 #define CHECKERCOMPONENT_H
 
+#include "icinga/service.h"
+#include "remoting/endpoint.h"
 #include "base/dynamicobject.h"
 #include <boost/multi_index_container.hpp>
 #include <boost/multi_index/ordered_index.hpp>
diff --git a/components/checker/i2-checker.h b/components/checker/i2-checker.h
deleted file mode 100644 (file)
index 733bcac..0000000
+++ /dev/null
@@ -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 */
index 5c5851f8a93841c7ca917676d250a3588467df94..712938ff4cf132e416fe6f530b28bce37d59927d 100644 (file)
@@ -12,8 +12,7 @@ EXTRA_DIST = \
 libcompat_la_SOURCES = \
        compatcomponent.cpp \
        compatcomponent.h \
-       compat-type.cpp \
-       i2-compat.h
+       compat-type.cpp
 
 libcompat_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
index d77dd7c746798b25889b64adc157d232d7b695fc..0ca564c0447f1904726f79c1a9e9d064e97e7352 100644 (file)
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
 #include "base/exception.h"
+#include "base/application.h"
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
 #include <boost/exception/diagnostic_information.hpp>
+#include <fstream>
 
 using namespace icinga;
 
@@ -193,7 +200,7 @@ void CompatComponent::CommandPipeThread(const String& commandPath)
 }
 #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;
        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();
 
@@ -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"
           << "\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"
           << "\t" << "host_name" << "\t" << host->GetName() << "\n"
@@ -338,7 +345,7 @@ void CompatComponent::DumpHostObject(ostream& fp, const Host::Ptr& host)
           << "\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());
 
@@ -401,7 +408,7 @@ void CompatComponent::DumpServiceStatusAttrs(ostream& fp, const Service::Ptr& se
           << "\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();
 
@@ -424,7 +431,7 @@ void CompatComponent::DumpServiceStatus(ostream& fp, const Service::Ptr& service
        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();
 
@@ -486,8 +493,8 @@ void CompatComponent::StatusTimerHandler(void)
        String statuspathtmp = statuspath + ".tmp"; /* XXX make this a global definition */
        String objectspathtmp = objectspath + ".tmp";
 
-       ofstream statusfp;
-       statusfp.open(statuspathtmp.CStr(), ofstream::out | ofstream::trunc);
+       std::ofstream statusfp;
+       statusfp.open(statuspathtmp.CStr(), std::ofstream::out | std::ofstream::trunc);
 
        statusfp << std::fixed;
 
@@ -521,8 +528,8 @@ void CompatComponent::StatusTimerHandler(void)
                 << "\t" << "}" << "\n"
                 << "\n";
 
-       ofstream objectfp;
-       objectfp.open(objectspathtmp.CStr(), ofstream::out | ofstream::trunc);
+       std::ofstream objectfp;
+       objectfp.open(objectspathtmp.CStr(), std::ofstream::out | std::ofstream::trunc);
 
        objectfp << std::fixed;
 
index ed37e196ed3e665da96500466e69ed585a1d26a4..224edd52b81f252053750fe1a8febb9fdcf29fd6 100644 (file)
 #ifndef COMPATCOMPONENT_H
 #define COMPATCOMPONENT_H
 
+#include "icinga/host.h"
+#include "icinga/service.h"
+#include "base/dynamicobject.h"
 #include "base/objectlock.h"
+#include <iostream>
 
 namespace icinga
 {
@@ -68,7 +72,7 @@ private:
        void DumpServiceStatusAttrs(std::ostream& fp, const Service::Ptr& service, CompatObjectType type);
 
        template<typename T>
-       void DumpNameList(ostream& fp, const T& list)
+       void DumpNameList(std::ostream& fp, const T& list)
        {
                typename T::const_iterator it;
                bool first = true;
@@ -84,7 +88,7 @@ private:
        }
 
        template<typename T>
-       void DumpStringList(ostream& fp, const T& list)
+       void DumpStringList(std::ostream& fp, const T& list)
        {
                typename T::const_iterator it;
                bool first = true;
diff --git a/components/compat/i2-compat.h b/components/compat/i2-compat.h
deleted file mode 100644 (file)
index d50747e..0000000
+++ /dev/null
@@ -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 */
index 0475a2b7b6187b101dc302774a452a2f74306ed1..b706907f1860e1cc11fb066c94555378bd26b893 100644 (file)
@@ -17,7 +17,8 @@
  * 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/logger_fwd.h"
 #include <algorithm>
index 538bcb625968d8fdf67e79056ad21bd7c7765438..51465888c095dbd592d3157f141d97bee263cbf1 100644 (file)
 #ifndef DELEGATIONCOMPONENT_H
 #define DELEGATIONCOMPONENT_H
 
+#include "icinga/service.h"
+#include "remoting/endpoint.h"
+#include "base/dynamicobject.h"
+
 namespace icinga
 {
 
diff --git a/components/delegation/i2-delegation.h b/components/delegation/i2-delegation.h
deleted file mode 100644 (file)
index 62502fa..0000000
+++ /dev/null
@@ -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 */
index 58dd52055181b15f5e0533b4d6a13fd31641d30f..a7a541d5229de2aa4f4d5687d700ea1afc31080a 100644 (file)
@@ -12,8 +12,7 @@ EXTRA_DIST = \
 libdemo_la_SOURCES = \
        democomponent.cpp \
        democomponent.h \
-       demo-type.cpp \
-       i2-demo.h
+       demo-type.cpp
 
 libdemo_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
index 2c89455c05f44fbcb3dc6c18ae8efeed3fd0b470..d5f8ce485aa5ace8dacddfd3e676494999218a68 100644 (file)
@@ -17,7 +17,8 @@
  * 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/logger_fwd.h"
 #include <boost/smart_ptr/make_shared.hpp>
index c832ba9bd2bb86ba1a80bbc6da79899a19cb3dac..930215cdc19dc2d9f8183d1ad6a4166b06b79115 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef DEMOCOMPONENT_H
 #define DEMOCOMPONENT_H
 
+#include "remoting/endpoint.h"
+#include "base/dynamicobject.h"
+
 namespace icinga
 {
 
diff --git a/components/demo/i2-demo.h b/components/demo/i2-demo.h
deleted file mode 100644 (file)
index b5a9418..0000000
+++ /dev/null
@@ -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 */
index 80d64aae415e96073e62ac26b5082bf4f07645e2..286aa1d6457652873196f999f30eab10bc236b1d 100644 (file)
@@ -46,8 +46,7 @@ liblivestatus_la_SOURCES = \
        statustable.cpp \
        statustable.h \
        table.cpp \
-       table.h \
-       i2-livestatus.h
+       table.h
 
 liblivestatus_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
index e68a958eb2ce7c95e4f174f77c4d77db847206dc..73ab3892710e8af6d4688c3ae58f580c61e7d54d 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-livestatus.h"
+#include "livestatus/andfilter.h"
 #include <boost/foreach.hpp>
 
 using namespace icinga;
index 748ef85f155c442669ff2575a9e9072a8904331c..52060605896d94014e9bf53e83429861080d751c 100644 (file)
 #ifndef ANDFILTER_H
 #define ANDFILTER_H
 
+#include "livestatus/combinerfilter.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 0b306597afa19d5f9cf82a73f32e1ecf77966e92..c02dc93d830906c423cf1177ef3cd474e8dc4ab9 100644 (file)
@@ -17,8 +17,9 @@
  * 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/array.h"
 #include <boost/foreach.hpp>
 
 using namespace icinga;
index eb508dc92766df2080a3a2d2d98e9a0dd29e42c7..0e3f3b71f882ff6f2589b69354abf70f16dcfbfd 100644 (file)
 #ifndef ATTRIBUTEFILTER_H
 #define ATTRIBUTEFILTER_H
 
+#include "livestatus/filter.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 2de70cead48289dbc5e83fd0e85dba354afa1de4..2ab9e7fceee95f7ffef2693749dec5a0356dbfcc 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-livestatus.h"
+#include "livestatus/column.h"
 
 using namespace icinga;
 using namespace livestatus;
index 94718a4fe797e5e1fe56ba980db592cdeb7ecfa7..e259a62344c7c2b23527e7b87945372bdd81bfba 100644 (file)
 #ifndef COLUMN_H
 #define COLUMN_H
 
+#include "base/value.h"
+#include <boost/function.hpp>
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 3f8072ae59f546ad3433226d6e5c42bdde8f7fab..a12d4477038a49fc708d178e2d951c17c9374589 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-livestatus.h"
+#include "livestatus/combinerfilter.h"
 
 using namespace icinga;
 using namespace livestatus;
index 8cb55a1a5feff4b36bab7aaff37017f80f330e5a..70538172dfa81e31ab3c31164df32a224f400494 100644 (file)
 #ifndef COMBINERFILTER_H
 #define COMBINERFILTER_H
 
+#include "livestatus/filter.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 1d01601e6293c8886d104f64f477ec8f7af20b3f..777d7f75b707903049445388912bec1e3192cab5 100644 (file)
@@ -17,7 +17,8 @@
  * 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/objectlock.h"
 #include <boost/tuple/tuple.hpp>
index aaa58dad2abb77fe3751ffd1aa106cd0a87de8ee..56197e56db9706acb915840e6a934693ab4c9537 100644 (file)
 #ifndef COMMENTSTABLE_H
 #define COMMENTSTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 5d19edaedf94eb4ceb3147486d7fbe87c2e761aa..c00dc50a11cc015c88b2d727baf85dfa8d334f44 100644 (file)
  * 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/logger_fwd.h"
+#include "base/tcpsocket.h"
+#include "base/application.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
index dbb868b693f2f6ea8cc4b01f1908016b5dd470a4..9ec3381dd1c732330daeca1bbfe907346e68f1f9 100644 (file)
 #ifndef LIVESTATUSCOMPONENT_H
 #define LIVESTATUSCOMPONENT_H
 
+#include "livestatus/connection.h"
+#include "base/dynamicobject.h"
+#include "base/socket.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 224337ffc193103320b79a59ff552b5ea361ce68..e22c221117067aa39a2ff62967ee9b8b1fa8bb98 100644 (file)
@@ -17,7 +17,8 @@
  * 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>
 
 using namespace icinga;
index e37887f176407ef3570e66023fa9d6800a88bc07..49d36ec02563a562ff5469090e534323a2c35869 100644 (file)
 #ifndef LIVESTATUSCONNECTION_H
 #define LIVESTATUSCONNECTION_H
 
+#include "base/connection.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 834986c3cd515e47da0c1ad120803db37ea2a5b7..309bba8564ed9040c0b68caac840462644e2332f 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <boost/foreach.hpp>
 
index 1d6cd9ce6ad40dbda15c99b32e3a5d75966e3515..6710ffab24d55cd4c8505c8fd2b76f371f7b86ab 100644 (file)
 #ifndef CONTACTGROUPSTABLE_H
 #define CONTACTGROUPSTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index f01d313457ecd181f98fc5f48a60f41141d9333f..a46cae89386c55f2347c60ecf8ce47644e9c9b07 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <boost/foreach.hpp>
 
index 1a22f91bb02544b4ee27e53767db4518905735ba..744f7f1788304a22198ae6241128d27ec26a5cfe 100644 (file)
 #ifndef CONTACTSTABLE_H
 #define CONTACTSTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 684cc51c6d583d3cdeb80cac8437fc17120269d9..0db77a6df4c9ef43e6b2aacfbb66977638c2929a 100644 (file)
@@ -17,7 +17,8 @@
  * 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/objectlock.h"
 #include <boost/tuple/tuple.hpp>
index 23e788565cc295ec6c8c9918238bde4ce9c0c91f..ee38f9bf149788fba4b68c15251cbf8ad680402c 100644 (file)
 #ifndef DOWNTIMESTABLE_H
 #define DOWNTIMESTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index bbf262f97434168bda767d58d7c4eeadc7da0058..bfae683e0189f3f813ce4a9e775c0e2f0ad0edb7 100644 (file)
@@ -17,9 +17,8 @@
  * 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;
 
 Filter::Filter(void)
index d60612075487c0c486c863fa55e0fc06f6ca2cd8..68dfef6195497bb803449f2581dad2def37904e3 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef FILTER_H
 #define FILTER_H
 
+#include "livestatus/table.h"
+
 namespace livestatus
 {
 
index e6fcd3c99b7e3cd839f4dd8e9e1755ab68632d88..5e1786e3afc748ee6df8b1b8bc8184b1d52422db 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <boost/foreach.hpp>
 
index e16524a2a5952e0365b6bfc7463ee9a10b2e5f75..e299c63d535db8d23b0d3ca8df75ee60bb24823e 100644 (file)
 #ifndef HOSTSTABLE_H
 #define HOSTSTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
diff --git a/components/livestatus/i2-livestatus.h b/components/livestatus/i2-livestatus.h
deleted file mode 100644 (file)
index 8d0994f..0000000
+++ /dev/null
@@ -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 */
index ee02a4d09e7011b8f35f512d4e72bdee9c600503..b6dedcff04394c79a10ca348782f0830735955c0 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-livestatus.h"
+#include "livestatus/negatefilter.h"
 
 using namespace icinga;
 using namespace livestatus;
index f321789a9483cb1185af5cf4ad6deb1939939a58..18759345c694d36d3df3ca1222a03d63e36e6a51 100644 (file)
 #ifndef NEGATEFILTER_H
 #define NEGATEFILTER_H
 
+#include "livestatus/filter.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index f142a77b3a7ce9a01720d8655d0037e70bd2058f..60166556243c91b726b313bdf0b2ad720a08ba7e 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-livestatus.h"
+#include "livestatus/orfilter.h"
 #include <boost/foreach.hpp>
 
 using namespace icinga;
index 95ff502f5c80b14f75ca37a1bdf3770ba033014f..2d323f1b39ba1e9d39842c5b498b0b1e3967fead 100644 (file)
 #ifndef ORFILTER_H
 #define ORFILTER_H
 
+#include "livestatus/combinerfilter.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index 302a7541e5afaa9b1a79245ab92d090ae869412c..1dc785eb7f0245ec170dab661a9d6e94971bba2c 100644 (file)
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
@@ -160,7 +166,7 @@ Query::Query(const std::vector<String>& lines)
        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) {
                bool first = true;
index cab0dbb3aa948efb1b4a88a4a3049023948d2a64..5b2a832cf3fbbe0ba8a6c6217cb5f0737d8da5c0 100644 (file)
 #ifndef 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
 {
 
@@ -61,7 +68,7 @@ private:
        int m_ErrorCode;
        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 ExecuteCommandHelper(const Stream::Ptr& stream);
index f589ffe20aaa60f182f674588840229aeb894660..b9e330d7ef7f1c66671292f0471d4fee05ed81c9 100644 (file)
@@ -17,7 +17,9 @@
  * 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 <boost/foreach.hpp>
 
index cf7abce093b889f0b9aad153f114194d7dd8e341..33a80248efcfd89530bc62666f6f01d5fc3cb9b9 100644 (file)
 #ifndef SERVICESTABLE_H
 #define SERVICESTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index d0f93c5dc8127c9732ae69ff580b43961fbd84be..c36e1153d9c39b46914e1971577d723ef897c328 100644 (file)
@@ -17,7 +17,7 @@
  * 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>
 
 using namespace icinga;
index 4320fedbfa604433ccd9ce25abf5c3cd2549cc28..5a891e7e3c174e7898b110840c02ce016b7bb333 100644 (file)
 #ifndef STATUSTABLE_H
 #define STATUSTABLE_H
 
+#include "livestatus/table.h"
+
+using namespace icinga;
+
 namespace livestatus
 {
 
index aecc9c6986a13335f4ad0de1027fa9f8319d77cb..e22d80aa75587b418be8ea4fa4afd8836fb9ea75 100644 (file)
  * 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/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
+#include <boost/bind.hpp>
 
 using namespace icinga;
 using namespace livestatus;
index 91f4dd0fdf811d5f62a67613211107fc234c2de0..9c8db228836855f1fae0952140e74a7c71ded449 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef TABLE_H
 #define TABLE_H
 
+#include "livestatus/column.h"
+#include "base/object.h"
+
 namespace livestatus
 {
 
diff --git a/components/notification/i2-notification.h b/components/notification/i2-notification.h
deleted file mode 100644 (file)
index 6b649ba..0000000
+++ /dev/null
@@ -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 */
index ba358e99f1e73e939c0adfbce68130a7dadd44b0..ac0c797724ff4336e30bb6f20d26bf62d64b8b4d 100644 (file)
@@ -17,7 +17,8 @@
  * 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/objectlock.h"
 #include <boost/smart_ptr/make_shared.hpp>
index 0703ad3f8939f31b8412f8e4cdbd32cbb69a003f..57754b842160819ef4098e310de7e7ea16dba3a7 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef NOTIFICATIONCOMPONENT_H
 #define NOTIFICATIONCOMPONENT_H
 
+#include "remoting/endpoint.h"
+#include "base/dynamicobject.h"
+
 namespace icinga
 {
 
diff --git a/components/replication/i2-replication.h b/components/replication/i2-replication.h
deleted file mode 100644 (file)
index c1946c9..0000000
+++ /dev/null
@@ -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 */
index a080775829615aab537e7807092e344de9f34838..899cd5cf52f3c780572efbe55d057ba86eb3879b 100644 (file)
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
index 3eea4be7fc6e38f471c1331c88db1c254da61bf9..d097e181cf9e14acec2f18ce5dc797f8242a8111 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#ifndef CIBSYNCCOMPONENT_H
-#define CIBSYNCCOMPONENT_H
+#ifndef REPLICATIONCOMPONENT_H
+#define REPLICATIONCOMPONENT_H
+
+#include "base/dynamicobject.h"
+#include "remoting/endpoint.h"
 
 namespace icinga
 {
@@ -57,4 +60,4 @@ private:
 
 }
 
-#endif /* CIBSYNCCOMPONENT_H */
+#endif /* REPLICATIONCOMPONENT_H */
index af35c0d767689867345d3d051cb81236a0110ec3..60c6ff5f05bc9c481fe50e4472c67db6f6499129 100644 (file)
@@ -17,8 +17,8 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "base/i2-base.h"
-#include "config/i2-config.h"
+#include "config/configcompilercontext.h"
+#include "config/configcompiler.h"
 #include "base/application.h"
 #include "base/logger_fwd.h"
 #include <boost/program_options.hpp>
index d6e67899ecf47567c16141593da29b8f2fd1290a..4a1023fd2cb69814f5638ae60b7581fbeb045e00 100644 (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.             *
  ******************************************************************************/
 
-#include "i2-config.h"
-#include "config_parser.h"
+#include "config/configcompiler.h"
+#include "config/expression.h"
+#include "config/typerule.h"
+#include "config/configcompilercontext.h"
+#include "config/config_parser.h"
 #include <sstream>
 
 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 C_COMMENT 1
@@ -938,11 +941,11 @@ YY_DECL
        register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 92 "config_lexer.ll"
+#line 95 "config_lexer.ll"
 
        lex_buf string_buf;
 
-#line 946 "config_lexer.cc"
+#line 949 "config_lexer.cc"
 
     yylval = yylval_param;
 
@@ -1039,12 +1042,12 @@ do_action:      /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 95 "config_lexer.ll"
+#line 98 "config_lexer.ll"
 { lb_init(&string_buf); BEGIN(STRING); }
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 97 "config_lexer.ll"
+#line 100 "config_lexer.ll"
 {
        BEGIN(INITIAL);
 
@@ -1058,7 +1061,7 @@ YY_RULE_SETUP
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 107 "config_lexer.ll"
+#line 110 "config_lexer.ll"
 {
        std::ostringstream msgbuf;
        msgbuf << "Unterminated string found: " << *yylloc;
@@ -1068,7 +1071,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 114 "config_lexer.ll"
+#line 117 "config_lexer.ll"
 {
        /* octal escape sequence */
        int result;
@@ -1087,7 +1090,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 130 "config_lexer.ll"
+#line 133 "config_lexer.ll"
 {
        /* generate error - bad escape sequence; something
         * like '\48' or '\0777777'
@@ -1099,38 +1102,38 @@ YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 139 "config_lexer.ll"
+#line 142 "config_lexer.ll"
 { lb_append_char(&string_buf, '\n'); }
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 140 "config_lexer.ll"
+#line 143 "config_lexer.ll"
 { lb_append_char(&string_buf, '\t'); }
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 141 "config_lexer.ll"
+#line 144 "config_lexer.ll"
 { lb_append_char(&string_buf, '\r'); }
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 142 "config_lexer.ll"
+#line 145 "config_lexer.ll"
 { lb_append_char(&string_buf, '\b'); }
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 143 "config_lexer.ll"
+#line 146 "config_lexer.ll"
 { lb_append_char(&string_buf, '\f'); }
        YY_BREAK
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-#line 144 "config_lexer.ll"
+#line 147 "config_lexer.ll"
 { lb_append_char(&string_buf, yytext[1]); }
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 146 "config_lexer.ll"
+#line 149 "config_lexer.ll"
 {
        char *yptr = yytext;
 
@@ -1140,12 +1143,12 @@ YY_RULE_SETUP
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 153 "config_lexer.ll"
+#line 156 "config_lexer.ll"
 { lb_init(&string_buf); BEGIN(HEREDOC); }
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 155 "config_lexer.ll"
+#line 158 "config_lexer.ll"
 {
        BEGIN(INITIAL);
 
@@ -1159,224 +1162,224 @@ YY_RULE_SETUP
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 165 "config_lexer.ll"
+#line 168 "config_lexer.ll"
 { lb_append_char(&string_buf, yytext[0]); }
        YY_BREAK
 
 case 16:
 YY_RULE_SETUP
-#line 168 "config_lexer.ll"
+#line 171 "config_lexer.ll"
 BEGIN(C_COMMENT);
        YY_BREAK
 
 
 case 17:
 YY_RULE_SETUP
-#line 172 "config_lexer.ll"
+#line 175 "config_lexer.ll"
 BEGIN(INITIAL);
        YY_BREAK
 case 18:
 /* rule 18 can match eol */
 YY_RULE_SETUP
-#line 173 "config_lexer.ll"
+#line 176 "config_lexer.ll"
 /* ignore comment */
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 174 "config_lexer.ll"
+#line 177 "config_lexer.ll"
 /* ignore star */
        YY_BREAK
 
 case 20:
 YY_RULE_SETUP
-#line 177 "config_lexer.ll"
+#line 180 "config_lexer.ll"
 /* ignore C++-style comments */
        YY_BREAK
 case 21:
 /* rule 21 can match eol */
 YY_RULE_SETUP
-#line 178 "config_lexer.ll"
+#line 181 "config_lexer.ll"
 /* ignore whitespace */
        YY_BREAK
 
 case 22:
 YY_RULE_SETUP
-#line 181 "config_lexer.ll"
+#line 184 "config_lexer.ll"
 return T_TYPE;
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 182 "config_lexer.ll"
+#line 185 "config_lexer.ll"
 { yylval->type = TypeDictionary; return T_TYPE_DICTIONARY; }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 183 "config_lexer.ll"
+#line 186 "config_lexer.ll"
 { yylval->type = TypeArray; return T_TYPE_ARRAY; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 184 "config_lexer.ll"
+#line 187 "config_lexer.ll"
 { yylval->type = TypeNumber; return T_TYPE_NUMBER; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 185 "config_lexer.ll"
+#line 188 "config_lexer.ll"
 { yylval->type = TypeString; return T_TYPE_STRING; }
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 186 "config_lexer.ll"
+#line 189 "config_lexer.ll"
 { yylval->type = TypeScalar; return T_TYPE_SCALAR; }
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 187 "config_lexer.ll"
+#line 190 "config_lexer.ll"
 { yylval->type = TypeAny; return T_TYPE_ANY; }
        YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 188 "config_lexer.ll"
+#line 191 "config_lexer.ll"
 { return T_VALIDATOR; }
        YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 189 "config_lexer.ll"
+#line 192 "config_lexer.ll"
 { return T_REQUIRE; }
        YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 190 "config_lexer.ll"
+#line 193 "config_lexer.ll"
 { return T_ATTRIBUTE; }
        YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 191 "config_lexer.ll"
+#line 194 "config_lexer.ll"
 return T_ABSTRACT;
        YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 192 "config_lexer.ll"
+#line 195 "config_lexer.ll"
 return T_LOCAL;
        YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 193 "config_lexer.ll"
+#line 196 "config_lexer.ll"
 return T_OBJECT;
        YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 194 "config_lexer.ll"
+#line 197 "config_lexer.ll"
 return T_TEMPLATE;
        YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 195 "config_lexer.ll"
+#line 198 "config_lexer.ll"
 return T_INCLUDE;
        YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 196 "config_lexer.ll"
+#line 199 "config_lexer.ll"
 return T_LIBRARY;
        YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 197 "config_lexer.ll"
+#line 200 "config_lexer.ll"
 return T_INHERITS;
        YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 198 "config_lexer.ll"
+#line 201 "config_lexer.ll"
 return T_NULL;
        YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 199 "config_lexer.ll"
+#line 202 "config_lexer.ll"
 return T_PARTIAL;
        YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 200 "config_lexer.ll"
+#line 203 "config_lexer.ll"
 { yylval->num = 1; return T_NUMBER; }
        YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 201 "config_lexer.ll"
+#line 204 "config_lexer.ll"
 { yylval->num = 0; return T_NUMBER; }
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 202 "config_lexer.ll"
+#line 205 "config_lexer.ll"
 { yylval->text = strdup(yytext); return T_IDENTIFIER; }
        YY_BREAK
 case 44:
 /* rule 44 can match eol */
 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; }
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 204 "config_lexer.ll"
+#line 207 "config_lexer.ll"
 { yylval->num = strtod(yytext, NULL) / 1000; return T_NUMBER; }
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 205 "config_lexer.ll"
+#line 208 "config_lexer.ll"
 { yylval->num = strtod(yytext, NULL) * 60 * 60; return T_NUMBER; }
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 206 "config_lexer.ll"
+#line 209 "config_lexer.ll"
 { yylval->num = strtod(yytext, NULL) * 60; return T_NUMBER; }
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 207 "config_lexer.ll"
+#line 210 "config_lexer.ll"
 { yylval->num = strtod(yytext, NULL); return T_NUMBER; }
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 208 "config_lexer.ll"
+#line 211 "config_lexer.ll"
 { yylval->num = strtod(yytext, NULL); return T_NUMBER; }
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 209 "config_lexer.ll"
+#line 212 "config_lexer.ll"
 { yylval->op = OperatorSet; return T_EQUAL; }
        YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 210 "config_lexer.ll"
+#line 213 "config_lexer.ll"
 { yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
        YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 211 "config_lexer.ll"
+#line 214 "config_lexer.ll"
 { yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 212 "config_lexer.ll"
+#line 215 "config_lexer.ll"
 { yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
        YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 213 "config_lexer.ll"
+#line 216 "config_lexer.ll"
 { yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
        YY_BREAK
 
 case 55:
 YY_RULE_SETUP
-#line 216 "config_lexer.ll"
+#line 219 "config_lexer.ll"
 return yytext[0];
        YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 218 "config_lexer.ll"
+#line 221 "config_lexer.ll"
 ECHO;
        YY_BREAK
-#line 1380 "config_lexer.cc"
+#line 1383 "config_lexer.cc"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(C_COMMENT):
 case YY_STATE_EOF(STRING):
@@ -2567,7 +2570,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 218 "config_lexer.ll"
+#line 221 "config_lexer.ll"
 
 
 
index fec02f982105c9c94b6978df6ccf60d3e6ca291d..6a785e026ef24d0a348b6537815ed6f7179be8e1 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-config.h"
-#include "config_parser.h"
+#include "config/configcompiler.h"
+#include "config/expression.h"
+#include "config/typerule.h"
+#include "config/configcompilercontext.h"
+#include "config/config_parser.h"
 #include <sstream>
 
 using namespace icinga;
index f763ee6f5948d4e6e10107096059d96cdc9df86c..59503423ad12b9e560beb5f1631d125f5c2ddc95 100644 (file)
@@ -117,18 +117,27 @@ extern int yydebug;
  ******************************************************************************/
 
 #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 <stack>
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
 
-#define YYLTYPE DebugInfo
+#define YYLTYPE icinga::DebugInfo
 
 
 
 /* Line 387 of yacc.c  */
-#line 132 "config_parser.cc"
+#line 141 "config_parser.cc"
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -202,7 +211,7 @@ using namespace icinga;
 typedef union YYSTYPE
 {
 /* Line 387 of yacc.c  */
-#line 41 "config_parser.yy"
+#line 50 "config_parser.yy"
 
        char *text;
        double num;
@@ -212,7 +221,7 @@ typedef union YYSTYPE
 
 
 /* Line 387 of yacc.c  */
-#line 216 "config_parser.cc"
+#line 225 "config_parser.cc"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -251,7 +260,7 @@ int yyparse ();
 
 /* Copy the second part of user declarations.  */
 /* Line 390 of yacc.c  */
-#line 88 "config_parser.yy"
+#line 97 "config_parser.yy"
 
 
 int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
@@ -289,7 +298,7 @@ void ConfigCompiler::Compile(void)
 
 
 /* Line 390 of yacc.c  */
-#line 293 "config_parser.cc"
+#line 302 "config_parser.cc"
 
 #ifdef short
 # undef short
@@ -606,14 +615,14 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   126,   126,   127,   130,   130,   130,   130,   133,   138,
-     144,   150,   151,   159,   158,   188,   191,   198,   197,   209,
-     210,   212,   213,   214,   217,   222,   227,   234,   243,   244,
-     251,   252,   253,   254,   255,   256,   263,   268,   263,   293,
-     294,   299,   300,   303,   307,   313,   314,   317,   324,   325,
-     329,   328,   340,   341,   343,   344,   345,   348,   356,   372,
-     373,   374,   375,   376,   383,   382,   394,   395,   397,   398,
-     402,   408,   413,   417,   421,   427,   428
+       0,   135,   135,   136,   139,   139,   139,   139,   142,   147,
+     153,   159,   160,   168,   167,   197,   200,   207,   206,   218,
+     219,   221,   222,   223,   226,   231,   236,   243,   252,   253,
+     260,   261,   262,   263,   264,   265,   272,   277,   272,   302,
+     303,   308,   309,   312,   316,   322,   323,   326,   333,   334,
+     338,   337,   349,   350,   352,   353,   354,   357,   365,   381,
+     382,   383,   384,   385,   392,   391,   403,   404,   406,   407,
+     411,   417,   422,   426,   430,   436,   437
 };
 #endif
 
@@ -1709,7 +1718,7 @@ yyreduce:
     {
         case 8:
 /* Line 1792 of yacc.c  */
-#line 134 "config_parser.yy"
+#line 143 "config_parser.yy"
     {
                context->HandleInclude((yyvsp[(2) - (2)].text), false, yylloc);
                free((yyvsp[(2) - (2)].text));
@@ -1718,7 +1727,7 @@ yyreduce:
 
   case 9:
 /* Line 1792 of yacc.c  */
-#line 139 "config_parser.yy"
+#line 148 "config_parser.yy"
     {
                context->HandleInclude((yyvsp[(2) - (2)].text), true, yylloc);
                free((yyvsp[(2) - (2)].text));
@@ -1727,7 +1736,7 @@ yyreduce:
 
   case 10:
 /* Line 1792 of yacc.c  */
-#line 145 "config_parser.yy"
+#line 154 "config_parser.yy"
     {
                context->HandleLibrary((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1736,7 +1745,7 @@ yyreduce:
 
   case 12:
 /* Line 1792 of yacc.c  */
-#line 152 "config_parser.yy"
+#line 161 "config_parser.yy"
     {
                (yyval.text) = (yyvsp[(1) - (1)].text);
                free((yyvsp[(1) - (1)].text));
@@ -1745,7 +1754,7 @@ yyreduce:
 
   case 13:
 /* Line 1792 of yacc.c  */
-#line 159 "config_parser.yy"
+#line 168 "config_parser.yy"
     {
                String name = String((yyvsp[(3) - (3)].text));
                free((yyvsp[(3) - (3)].text));
@@ -1764,7 +1773,7 @@ yyreduce:
 
   case 14:
 /* Line 1792 of yacc.c  */
-#line 174 "config_parser.yy"
+#line 183 "config_parser.yy"
     {
                TypeRuleList::Ptr ruleList = *(yyvsp[(6) - (6)].variant);
                m_Type->GetRuleList()->AddRules(ruleList);
@@ -1780,7 +1789,7 @@ yyreduce:
 
   case 15:
 /* Line 1792 of yacc.c  */
-#line 188 "config_parser.yy"
+#line 197 "config_parser.yy"
     {
                (yyval.num) = 0;
        }
@@ -1788,7 +1797,7 @@ yyreduce:
 
   case 16:
 /* Line 1792 of yacc.c  */
-#line 192 "config_parser.yy"
+#line 201 "config_parser.yy"
     {
                (yyval.num) = 1;
        }
@@ -1796,7 +1805,7 @@ yyreduce:
 
   case 17:
 /* Line 1792 of yacc.c  */
-#line 198 "config_parser.yy"
+#line 207 "config_parser.yy"
     {
                m_RuleLists.push(boost::make_shared<TypeRuleList>());
        }
@@ -1804,7 +1813,7 @@ yyreduce:
 
   case 18:
 /* Line 1792 of yacc.c  */
-#line 203 "config_parser.yy"
+#line 212 "config_parser.yy"
     {
                (yyval.variant) = new Value(m_RuleLists.top());
                m_RuleLists.pop();
@@ -1813,7 +1822,7 @@ yyreduce:
 
   case 24:
 /* Line 1792 of yacc.c  */
-#line 218 "config_parser.yy"
+#line 227 "config_parser.yy"
     {
                m_RuleLists.top()->AddRequire((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1822,7 +1831,7 @@ yyreduce:
 
   case 25:
 /* Line 1792 of yacc.c  */
-#line 223 "config_parser.yy"
+#line 232 "config_parser.yy"
     {
                m_RuleLists.top()->SetValidator((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1831,7 +1840,7 @@ yyreduce:
 
   case 26:
 /* 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);
                free((yyvsp[(3) - (3)].text));
@@ -1842,7 +1851,7 @@ yyreduce:
 
   case 27:
 /* 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);
                free((yyvsp[(3) - (4)].text));
@@ -1853,7 +1862,7 @@ yyreduce:
 
   case 29:
 /* Line 1792 of yacc.c  */
-#line 245 "config_parser.yy"
+#line 254 "config_parser.yy"
     {
                m_Type->SetParent((yyvsp[(2) - (2)].text));
                free((yyvsp[(2) - (2)].text));
@@ -1862,7 +1871,7 @@ yyreduce:
 
   case 35:
 /* Line 1792 of yacc.c  */
-#line 257 "config_parser.yy"
+#line 266 "config_parser.yy"
     {
                (yyval.type) = (yyvsp[(1) - (1)].type);
        }
@@ -1870,7 +1879,7 @@ yyreduce:
 
   case 36:
 /* Line 1792 of yacc.c  */
-#line 263 "config_parser.yy"
+#line 272 "config_parser.yy"
     {
                m_Abstract = false;
                m_Local = false;
@@ -1879,7 +1888,7 @@ yyreduce:
 
   case 37:
 /* Line 1792 of yacc.c  */
-#line 268 "config_parser.yy"
+#line 277 "config_parser.yy"
     {
                m_Item = boost::make_shared<ConfigItemBuilder>(yylloc);
 
@@ -1895,7 +1904,7 @@ yyreduce:
 
   case 38:
 /* Line 1792 of yacc.c  */
-#line 280 "config_parser.yy"
+#line 289 "config_parser.yy"
     {
                ExpressionList::Ptr exprl = *(yyvsp[(7) - (7)].variant);
                delete (yyvsp[(7) - (7)].variant);
@@ -1911,7 +1920,7 @@ yyreduce:
 
   case 40:
 /* Line 1792 of yacc.c  */
-#line 295 "config_parser.yy"
+#line 304 "config_parser.yy"
     {
                m_Abstract = true;
        }
@@ -1919,7 +1928,7 @@ yyreduce:
 
   case 43:
 /* Line 1792 of yacc.c  */
-#line 304 "config_parser.yy"
+#line 313 "config_parser.yy"
     {
                m_Abstract = true;
        }
@@ -1927,7 +1936,7 @@ yyreduce:
 
   case 44:
 /* Line 1792 of yacc.c  */
-#line 308 "config_parser.yy"
+#line 317 "config_parser.yy"
     {
                m_Local = true;
        }
@@ -1935,7 +1944,7 @@ yyreduce:
 
   case 47:
 /* Line 1792 of yacc.c  */
-#line 318 "config_parser.yy"
+#line 327 "config_parser.yy"
     {
                m_Item->AddParent((yyvsp[(1) - (1)].text));
                free((yyvsp[(1) - (1)].text));
@@ -1944,7 +1953,7 @@ yyreduce:
 
   case 50:
 /* Line 1792 of yacc.c  */
-#line 329 "config_parser.yy"
+#line 338 "config_parser.yy"
     {
                m_ExpressionLists.push(boost::make_shared<ExpressionList>());
        }
@@ -1952,7 +1961,7 @@ yyreduce:
 
   case 51:
 /* Line 1792 of yacc.c  */
-#line 334 "config_parser.yy"
+#line 343 "config_parser.yy"
     {
                (yyval.variant) = new Value(m_ExpressionLists.top());
                m_ExpressionLists.pop();
@@ -1961,7 +1970,7 @@ yyreduce:
 
   case 57:
 /* 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);
                free((yyvsp[(1) - (3)].text));
@@ -1973,7 +1982,7 @@ yyreduce:
 
   case 58:
 /* 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);
                free((yyvsp[(3) - (6)].text));
@@ -1991,7 +2000,7 @@ yyreduce:
 
   case 63:
 /* Line 1792 of yacc.c  */
-#line 377 "config_parser.yy"
+#line 386 "config_parser.yy"
     {
                (yyval.op) = (yyvsp[(1) - (1)].op);
        }
@@ -1999,7 +2008,7 @@ yyreduce:
 
   case 64:
 /* Line 1792 of yacc.c  */
-#line 383 "config_parser.yy"
+#line 392 "config_parser.yy"
     {
                m_Arrays.push(boost::make_shared<Array>());
        }
@@ -2007,7 +2016,7 @@ yyreduce:
 
   case 65:
 /* Line 1792 of yacc.c  */
-#line 388 "config_parser.yy"
+#line 397 "config_parser.yy"
     {
                (yyval.variant) = new Value(m_Arrays.top());
                m_Arrays.pop();
@@ -2016,7 +2025,7 @@ yyreduce:
 
   case 69:
 /* Line 1792 of yacc.c  */
-#line 399 "config_parser.yy"
+#line 408 "config_parser.yy"
     {
                m_Arrays.top()->Add(*(yyvsp[(1) - (1)].variant));
        }
@@ -2024,7 +2033,7 @@ yyreduce:
 
   case 70:
 /* Line 1792 of yacc.c  */
-#line 403 "config_parser.yy"
+#line 412 "config_parser.yy"
     {
                m_Arrays.top()->Add(*(yyvsp[(3) - (3)].variant));
        }
@@ -2032,7 +2041,7 @@ yyreduce:
 
   case 71:
 /* Line 1792 of yacc.c  */
-#line 409 "config_parser.yy"
+#line 418 "config_parser.yy"
     {
                (yyval.variant) = new Value((yyvsp[(1) - (1)].text));
                free((yyvsp[(1) - (1)].text));
@@ -2041,7 +2050,7 @@ yyreduce:
 
   case 72:
 /* Line 1792 of yacc.c  */
-#line 414 "config_parser.yy"
+#line 423 "config_parser.yy"
     {
                (yyval.variant) = new Value((yyvsp[(1) - (1)].num));
        }
@@ -2049,7 +2058,7 @@ yyreduce:
 
   case 73:
 /* Line 1792 of yacc.c  */
-#line 418 "config_parser.yy"
+#line 427 "config_parser.yy"
     {
                (yyval.variant) = new Value();
        }
@@ -2057,7 +2066,7 @@ yyreduce:
 
   case 74:
 /* Line 1792 of yacc.c  */
-#line 422 "config_parser.yy"
+#line 431 "config_parser.yy"
     {
                (yyval.variant) = (yyvsp[(1) - (1)].variant);
        }
@@ -2065,7 +2074,7 @@ yyreduce:
 
   case 76:
 /* Line 1792 of yacc.c  */
-#line 429 "config_parser.yy"
+#line 438 "config_parser.yy"
     {
                (yyval.variant) = (yyvsp[(1) - (1)].variant);
        }
@@ -2073,7 +2082,7 @@ yyreduce:
 
 
 /* Line 1792 of yacc.c  */
-#line 2077 "config_parser.cc"
+#line 2086 "config_parser.cc"
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -2312,5 +2321,5 @@ yyreturn:
 
 
 /* Line 2055 of yacc.c  */
-#line 433 "config_parser.yy"
+#line 442 "config_parser.yy"
 
index 7be4649ca953a546dddb14246e36298e74f79640..5b4c27941204a93828ae08522309948847b78670 100644 (file)
  ******************************************************************************/
 
 #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 <stack>
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
 
-#define YYLTYPE DebugInfo
+#define YYLTYPE icinga::DebugInfo
 
 }
 
index 5432406a54935a212c271784d0a37b7a41063e20..330f51491044a7f1494aa09a76e91525438d6ea9 100644 (file)
  * 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/utility.h"
 #include <sstream>
 #include <fstream>
 #include <boost/foreach.hpp>
index 6420c1c53e364d9f8aa28026e361687be4506455..1918dd78e89f403e61e541b669e58add8eeab73d 100644 (file)
 #ifndef CONFIGCOMPILER_H
 #define CONFIGCOMPILER_H
 
+#include "config/i2-config.h"
+#include "config/debuginfo.h"
 #include "base/registry.h"
 #include <iostream>
+#include <boost/function.hpp>
 
 namespace icinga
 {
index 82e4a1ac4582d593b2e2743b33e8bf5c7b170c3e..eda8674f4bdeed95fce67877b82ca84d888fc0d8 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <boost/foreach.hpp>
 
index ef5358f6b6cd15ddeeba8aea4ff42cc79fdb2418..bfd4b79bca03f782e3605726d617bdfd68a4a383 100644 (file)
 #ifndef CONFIGCOMPILERCONTEXT_H
 #define CONFIGCOMPILERCONTEXT_H
 
+#include "config/i2-config.h"
+#include "config/configitem.h"
+#include "config/configtype.h"
+
 namespace icinga
 {
 
@@ -76,8 +80,8 @@ private:
 
         int m_Flags;
 
-       std::vector<shared_ptr<ConfigItem> > m_Items;
-        std::map<std::pair<String, String>, shared_ptr<ConfigItem> > m_ItemsMap;
+       std::vector<ConfigItem::Ptr> m_Items;
+        std::map<std::pair<String, String>, ConfigItem::Ptr> m_ItemsMap;
 
         std::map<String, shared_ptr<ConfigType> > m_Types;
 
index 48c53c16d970bab10111bce2e96efab299e2ce22..f9cd4fcbb8e75e21c85bd65f6b8661450a6eba70 100644 (file)
@@ -17,7 +17,8 @@
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
index ff0c6a9d2055ca0422f9adfe2595775a8336a571..a7b46852a40cb944de5ec4c06676d812722a3613 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef CONFIGITEM_H
 #define CONFIGITEM_H
 
+#include "config/i2-config.h"
+#include "config/expressionlist.h"
 #include "base/dynamicobject.h"
 
 namespace icinga
index c34cbd5d8fa0682b828fc27b6fe11b62434845e9..0023c4d9842203f7ce7c708455ab4f576f4b4a51 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <boost/smart_ptr/make_shared.hpp>
 #include <sstream>
index 26f57601da4c2999e9f23fd1c870adc16881d245..6b38ce6181d353c3b4ca4e7dc5a4f943a71c4e08 100644 (file)
 #ifndef 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
 {
 
index dae44df33d25ff564b44cd08324ad364ecce3fde..8f196667eba785a75eda7e7db7dcf2d066ae98ff 100644 (file)
@@ -17,7 +17,8 @@
  * 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/convert.h"
 #include <boost/tuple/tuple.hpp>
index 5ce363a719415dbb2439b862e6edd418be4200a2..6ce37536e7d1645a8c889e676b559a5562e9e69f 100644 (file)
 #ifndef CONFIGTYPE_H\r
 #define CONFIGTYPE_H\r
 \r
+#include "config/i2-config.h"\r
+#include "config/typerule.h"\r
+#include "config/typerulelist.h"\r
+#include "config/configitem.h"\r
 #include "base/array.h"\r
 \r
 namespace icinga\r
index 9425c3ea6236d2debaf2c96fb4cb8971ff8dbedf..e5d7af74eb814896bf7062f703056fa59676dcea 100644 (file)
@@ -17,7 +17,8 @@
  * 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 <sstream>
 #include <boost/tuple/tuple.hpp>
index 1c660c0ed436f8828fecce1522bcceba2b487f94..c785290def5534f62f7e663a72f1c3fe6d73af55 100644 (file)
 #ifndef EXPRESSION_H
 #define EXPRESSION_H
 
+#include "config/i2-config.h"
+#include "config/debuginfo.h"
 #include "base/dictionary.h"
+#include <iostream>
 
 namespace icinga
 {
index b1a97930e3916f964f83566ab2ae98d9a5e98a17..a359f4755cde9c5de76b8b88fd2df07aba390c69 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-config.h"
+#include "config/expressionlist.h"
 #include <boost/foreach.hpp>
 
 using namespace icinga;
index 8ab611743a665c9fd946231bf6955c8d42745bba..73173a273bac22bec016983cf70c7fe58ddcbbe0 100644 (file)
 #ifndef EXPRESSIONLIST_H
 #define EXPRESSIONLIST_H
 
+#include "config/i2-config.h"
+#include "config/expression.h"
 #include "base/dictionary.h"
+#include <vector>
 
 namespace icinga
 {
index 260adb94a0fe15f044905e8c5be5df4d887889d9..3cc4988b65bd4dcdff8babee8f92fd0d5bc0ee55 100644 (file)
@@ -28,7 +28,7 @@
  * at runtime.
  */
 
-//#include "base/i2-base.h"
+#include "base/i2-base.h"
 
 #ifdef I2_CONFIG_BUILD
 #      define I2_CONFIG_API I2_EXPORT
 #      define I2_CONFIG_API I2_IMPORT
 #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 */
index 68cda5f63d91d2ae8f8cf38049b4aeea2114512d..f878a1767f80aace54e74c3350e9249d2b837443 100644 (file)
  * 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/utility.h"
+#include "base/dictionary.h"
+#include "base/array.h"
 
 using namespace icinga;
 
index 6f593f8cf310758f330cf5d9970411b8f04de7ff..c73243020fa244222b7cb36f87f771d888b71d2c 100644 (file)
 #ifndef TYPERULE_H\r
 #define TYPERULE_H\r
 \r
+#include "config/i2-config.h"\r
+#include "config/typerulelist.h"\r
+#include "config/debuginfo.h"\r
+\r
 namespace icinga\r
 {\r
 \r
index 7f27f44965400ae3d9af6e4cc4ffe45a41623826..504377f5db9556d4a07b8a5d56a442cf09695657 100644 (file)
@@ -17,7 +17,8 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *\r
  ******************************************************************************/\r
 \r
-#include "i2-config.h"\r
+#include "config/typerulelist.h"\r
+#include "config/typerule.h"\r
 #include <boost/foreach.hpp>\r
 \r
 using namespace icinga;\r
index 078fff4c255acae3b49a92b9de2e6e06d4ebddff..b75c23b9ce3fee566915ed881c3699206d8c0d03 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef TYPERULELIST_H\r
 #define TYPERULELIST_H\r
 \r
+#include "config/i2-config.h"\r
 #include "base/value.h"\r
 \r
 namespace icinga\r
index 29cea119ad0fa92cebec911cba6082138c7c303b..7a51e7b8e004b11166b578c4288543272ee608f0 100644 (file)
@@ -17,7 +17,8 @@
  * 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"
 
 using namespace icinga;
index 3b222eda21f03e84fd5672dc98374111630f39ef..9e97aedd9a2a6d2cbd734492bdf73c881e9de0ba 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef API_H
 #define API_H
 
+#include "icinga/i2-icinga.h"
+#include "base/scripttask.h"
+
 namespace icinga
 {
 
index 2ecaf9c3579c02700a95ce3322b39d663a76bc7a..f63105d0f21524a9a5fcb56300e1bcf7a78912d6 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/checkresultmessage.h"
 
 using namespace icinga;
 
index c3d53fd278d9b12726df2abf65b14d2675e123f3..314f3a6f5a37e15c01692451ac00212d53aff499 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef CHECKRESULTMESSAGE_H
 #define CHECKRESULTMESSAGE_H
 
+#include "icinga/i2-icinga.h"
+#include "remoting/messagepart.h"
+
 namespace icinga
 {
 
index 1f91d8d60a4575b738356de6dc82a7e5ac23c715..a12666045419c48a142097951d19429bf72cc454 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/cib.h"
 
 using namespace icinga;
 
index 232fb72ea2d03b6b6dc4cd21933a0dd478064fe4..dff294268afbe59d0d87d00ad6b8f794fea9dc06 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef CIB_H
 #define CIB_H
 
+#include "icinga/i2-icinga.h"
 #include "base/ringbuffer.h"
 
 namespace icinga
index b0430517be4063d30b920377fd7bdffb224d8134..68701317f9cf45a09bfb4b33ce45e4876158a9ba 100644 (file)
  * 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/logger_fwd.h"
 #include "base/objectlock.h"
+#include "base/application.h"
+#include <fstream>
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/foreach.hpp>
 #include <boost/exception/diagnostic_information.hpp>
index 4c5c4b5806dff219917274659454dba6bec263d4..8f5682700ac5177143afe1e9b8ec52281852519a 100644 (file)
 #ifndef 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
 {
 
index 7d4be7238a2fd9a04a9df5705188895357d2a5dc..20948d57b24a098ba9ccdaed07c0005b61fddd3b 100644 (file)
  * 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/objectlock.h"
 #include "base/logger_fwd.h"
+#include "config/configitembuilder.h"
+#include "config/configcompilercontext.h"
 #include <boost/tuple/tuple.hpp>
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
index e91d665b3e5c6cfa993d08af568e7ff9b7f00c02..d6184fda29da9a6ae1e9483c5330655a46aab553 100644 (file)
 #ifndef HOST_H
 #define HOST_H
 
+#include "icinga/i2-icinga.h"
+#include "base/array.h"
+#include "base/dynamicobject.h"
+#include "base/dictionary.h"
+
 namespace icinga
 {
 
index 2dccfe20a6323cfb66d425809308d0a7c6a53915..b10309406ffb1af7060eb0464b12095d9a4ae8c6 100644 (file)
@@ -17,7 +17,7 @@
  * 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/logger_fwd.h"
 #include "base/objectlock.h"
index 5ec1681cf230aaefe396d3c67a88ede7dd85bcb5..a390665ea284d3b39ff52161121466f05330684f 100644 (file)
 #ifndef HOSTGROUP_H
 #define HOSTGROUP_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/host.h"
+#include "base/dynamicobject.h"
+#include <set>
+
 namespace icinga
 {
 
index 1b9d734ffead39cc304b905ab6bf1a02c82de730..44743bda013b67a952ac17c32de05d5bcfeb36af 100644 (file)
@@ -28,8 +28,6 @@
  */
 
 #include "base/i2-base.h"
-#include "config/i2-config.h"
-#include "remoting/i2-remoting.h"
 
 #ifdef I2_ICINGA_BUILD
 #      define I2_ICINGA_API I2_EXPORT
 #      define I2_ICINGA_API I2_IMPORT
 #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 */
index 9ab690a76911fc6a24d2371877a9c829eee4d9b3..0eab4b4cd96d6bd5de1273df53e2bfcc2b43a890 100644 (file)
@@ -17,7 +17,8 @@
  * 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/logger_fwd.h"
 #include "base/objectlock.h"
index cb25260d67724afe8d6a70a1833b8521b7e7b841..9d5ba5fea7dbd45bc8a671fd25101b9c9d3528e4 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef ICINGAAPPLICATION_H
 #define ICINGAAPPLICATION_H
 
+#include "icinga/i2-icinga.h"
 #include "base/application.h"
 
 namespace icinga
index 5b5a28bd9104c50b82c111c40e3410db1c328ee1..43458036640f2b4299f1cd7de832dd9637948a54 100644 (file)
@@ -17,7 +17,9 @@
  * 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 <boost/tuple/tuple.hpp>
 #include <boost/smart_ptr/make_shared.hpp>
index bad3136c644393aa58a5b0f148afa7e8305638c6..acbd278fc8ce3ef295d7dc86918e88f5a6d07713 100644 (file)
 #ifndef MACROPROCESSOR_H
 #define MACROPROCESSOR_H
 
+#include "icinga/i2-icinga.h"
+#include "base/dictionary.h"
+#include <vector>
+
 namespace icinga
 {
 
index 816d8ede6ec8f5f7fe4de5ba0128f40231dc46fd..7cc1b1f0c17cd5d4e9f86732636967f55e5d0467 100644 (file)
@@ -17,7 +17,9 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/notification.h"
+#include "icinga/macroprocessor.h"
+#include "icinga/service.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
index 8eb616ade77ffd1567b71a8dfd4f7f8d315cb93d..151092f5d6b9e0b186de72c6ca097317739aa3cf 100644 (file)
 #ifndef NOTIFICATION_H
 #define NOTIFICATION_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/user.h"
+#include "icinga/usergroup.h"
+#include "base/array.h"
+
 namespace icinga
 {
 
index a8361efc7b36fe0166b7ebf033d1145fef423565..931ef58f409a2c6809e5f1022edf20e2ff2ddd19 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/notificationrequestmessage.h"
 
 using namespace icinga;
 
index f355abd6a1241b88af250ff578ff287b1ff71e9a..88cd87f81bd643c3e18728e99fe3102d52ad9ce7 100644 (file)
 #ifndef NOTIFICATIONREQUESTMESSAGE_H
 #define NOTIFICATIONREQUESTMESSAGE_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/notification.h"
+#include "remoting/messagepart.h"
+
 namespace icinga
 {
 
index eddf62abc511bc8414642e2709f5573380470cdd..2f5d9687a948b200db816ae9193e3317da80f8c1 100644 (file)
@@ -17,7 +17,9 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/nullchecktask.h"
+#include "icinga/service.h"
+#include "base/dictionary.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
index e748e92d607367651034807cae06b38a73f92b3c..342604a3b668fe39fd549bd0ebf4d045e15fdb0f 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef NULLCHECKTASK_H
 #define NULLCHECKTASK_H
 
+#include "icinga/i2-icinga.h"
 #include "base/scripttask.h"
 
 namespace icinga
index 571f11f6fbbed2c3a4961b0fbcd0f413f5840e0e..3e866b4f32706601556bef923300c564167e7d2e 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/perfdatawriter.h"
+#include "icinga/checkresultmessage.h"
+#include "icinga/service.h"
+#include "icinga/macroprocessor.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
 #include "base/convert.h"
+#include "base/application.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
index af37c2275ef476ccef32449ae412621d730e33ee..b7cf49c6d9eae25129e4fa0a86cb15a2136c09c2 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef PERFDATAWRITER_H
 #define PERFDATAWRITER_H
 
+#include "icinga/i2-icinga.h"
+#include "remoting/endpoint.h"
 #include "base/dynamicobject.h"
 #include <fstream>
 
index 5c17dbe5974bb0ec960bdd90ca42e69eaa465284..6b25fe8c06e26f888d4e66a250127bf02d491c0d 100644 (file)
@@ -17,7 +17,9 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/pluginchecktask.h"
+#include "icinga/macroprocessor.h"
+#include "base/dynamictype.h"
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
index 71cdcf62148e4e777f01aa8672455fb424fb65ff..ee995020a9ff7abb355776f57c03d7e1fa609e66 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef PLUGINCHECKTASK_H
 #define PLUGINCHECKTASK_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/service.h"
 #include "base/scripttask.h"
 #include "base/process.h"
 
index 975d861365c17fa8a443907e0670d03fc05c744b..4a565c681f8c3d1ab6f08c317024ce20cee0a138 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/pluginnotificationtask.h"
+#include "icinga/notification.h"
+#include "icinga/service.h"
+#include "icinga/macroprocessor.h"
+#include "base/scriptfunction.h"
 #include "base/logger_fwd.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
index c9a55f299b67f22fe1a6f807420af81c16e094f8..9aba9a968a71c31b28131f99421047db0d192246 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef PLUGINNOTIFICATIONTASK_H
 #define PLUGINNOTIFICATIONTASK_H
 
+#include "icinga/i2-icinga.h"
 #include "base/scripttask.h"
 #include "base/process.h"
 
index 330655cf673adc941a3cada9a3aff535fa204fb5..f0c918f5ce90d5b0aae24539859403cdd0c17a31 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
 #include "icinga/service.h"
+#include "icinga/icingaapplication.h"
+#include "icinga/checkresultmessage.h"
+#include "icinga/cib.h"
+#include "remoting/endpointmanager.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
index e2e777eaf6e8f201852eb4bd3b68dc5995a7f4f6..148858ccc8057bdfd380c7cf12e41b98ddece919 100644 (file)
@@ -17,7 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
 #include "icinga/service.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
index fdba26daea095b1769c0748f4ea1741ca06e5216..9738f4a2b071d7c4aebfd1240c76a967e5c85b55 100644 (file)
@@ -17,7 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
 #include "icinga/service.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
index bad86a97b240d533699e2730bc46ebb0fe9bb33c..84882fff77e8401c8e82ef300cc26bc2992567c6 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
 #include "icinga/service.h"
+#include "icinga/notificationrequestmessage.h"
+#include "remoting/endpointmanager.h"
+#include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
+#include "config/configitembuilder.h"
 #include <boost/tuple/tuple.hpp>
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
index 28ef74b52b44db7d06a0e600d0824c21e2814f1f..24166b0b95d1ecaf3930aae72487b7ed51612595 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
 #include "icinga/service.h"
+#include "icinga/servicegroup.h"
+#include "icinga/icingaapplication.h"
+#include "icinga/macroprocessor.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
+#include "config/configitembuilder.h"
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
 
index e41717f2feb5dc5cc6b3188f6078cc5bf62c1ec0..40bbf7fabb8aae096a41ca185f56c586531959b4 100644 (file)
 #ifndef SERVICE_H
 #define SERVICE_H
 
-#include "base/dynamictype.h"
+#include "icinga/i2-icinga.h"
+#include "icinga/host.h"
+#include "icinga/timeperiod.h"
+#include "icinga/notification.h"
+#include "base/dynamicobject.h"
+#include "base/array.h"
 #include <boost/signals2.hpp>
 
 namespace icinga
index 5801c1d9b244f056ec8db5f2861cbb09211fa5c4..07ce4961cb2a31d0d8f9f0d9a8a4a7e4a9b9113b 100644 (file)
 #ifndef SERVICEGROUP_H
 #define SERVICEGROUP_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/service.h"
 #include "base/dynamictype.h"
+#include <set>
 
 namespace icinga
 {
index 80e5f138520c6f5bb15b3c29c32b77028474eafe..31b7bf99b647d8d19fabf376190afa7266c65c07 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/timeperiod.h"
 #include "base/dynamictype.h"
 #include "base/scriptfunction.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
+#include "config/configitem.h"
 #include <boost/smart_ptr/make_shared.hpp>
 #include <boost/foreach.hpp>
 
@@ -69,11 +70,15 @@ void TimePeriod::AddSegment(double begin, double end)
 {
        ASSERT(OwnsLock());
 
-       if (m_ValidBegin.IsEmpty() || begin < m_ValidBegin)
+       if (m_ValidBegin.IsEmpty() || begin < m_ValidBegin) {
                m_ValidBegin = begin;
+               Touch("valid_begin");
+       }
 
-       if (m_ValidEnd.IsEmpty() || end > m_ValidEnd)
+       if (m_ValidEnd.IsEmpty() || end > m_ValidEnd) {
                m_ValidEnd = end;
+               Touch("valid_end");
+       }
 
        Array::Ptr segments = m_Segments;
 
@@ -119,11 +124,15 @@ void TimePeriod::RemoveSegment(double begin, double end)
 {
        ASSERT(OwnsLock());
 
-       if (m_ValidBegin.IsEmpty() || begin < m_ValidBegin)
+       if (m_ValidBegin.IsEmpty() || begin < m_ValidBegin) {
                m_ValidBegin = begin;
+               Touch("valid_begin");
+       }
 
-       if (m_ValidEnd.IsEmpty() || end > m_ValidEnd)
+       if (m_ValidEnd.IsEmpty() || end > m_ValidEnd) {
                m_ValidEnd = end;
+               Touch("valid_end");
+       }
 
        Array::Ptr segments = m_Segments;
 
@@ -168,6 +177,7 @@ void TimePeriod::PurgeSegments(double end)
                return;
 
        m_ValidBegin = end;
+       Touch("valid_begin");
 
        Array::Ptr segments = m_Segments;
 
@@ -276,13 +286,17 @@ void TimePeriod::UpdateTimerHandler(void)
                if (!ConfigItem::GetObject("TimePeriod", tp->GetName()))
                        continue;
 
+               double valid_end;
+
                {
                        ObjectLock olock(tp);
                        tp->PurgeSegments(now - 3600);
+
+                       valid_end = tp->m_ValidEnd;
                }
 
-               if (tp->m_ValidEnd < now + 3 * 3600)
-                       tp->UpdateRegion(tp->m_ValidEnd, tp->m_ValidEnd + 24 * 3600);
+               if (valid_end < now + 3 * 3600)
+                       tp->UpdateRegion(valid_end, now + 24 * 3600);
        }
 }
 
index 98a07d93b052197bd5c85397513f8c60cb969fd2..bc89bb2b4765f66d7af6ad530498dbccf7cad241 100644 (file)
 #ifndef TIMEPERIOD_H
 #define TIMEPERIOD_H
 
+#include "icinga/i2-icinga.h"
+#include "base/dynamicobject.h"
+#include "base/array.h"
+
 namespace icinga
 {
 
index b90ed9d00429b04fb32c60d57f6e6c83d8601337..41a843b767880a1e3e1bca65f81ecc12d9a535f2 100644 (file)
@@ -17,7 +17,8 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/user.h"
+#include "icinga/usergroup.h"
 #include "base/dynamictype.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
index 56d10de95ff6c911a4a362bd2eaaab9ae70cdd37..dd0e849b6d60e1e504a37c4a0115f7f05ba42d1f 100644 (file)
 #ifndef USER_H
 #define USER_H
 
+#include "icinga/i2-icinga.h"
+#include "base/dynamicobject.h"
+#include "base/array.h"
+
 namespace icinga
 {
 
index 396206585dc2dcdca7e22b679242adc9e5d15a04..9d1a417b09cc0d74acebb6e859b26019b4cc1329 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "icinga/usergroup.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
index 3ac92bb812d91390fc3ec1e3f24df60806bebb3a..4d6365b3f1ef35e541a09a684677409a3cf50487 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef USERGROUP_H
 #define USERGROUP_H
 
+#include "icinga/i2-icinga.h"
+#include "icinga/user.h"
 #include "base/dynamicobject.h"
 
 namespace icinga
index 8b6a6879933e004c8532f0281a713d93cd3da98d..271b4726d7bac9f43a5f94d6d662914bdca42b16 100644 (file)
@@ -29,8 +29,6 @@
 #include <Python.h>
 
 #include <i2-base.h>
-#include <i2-config.h>
-#include <i2-remoting.h>
 
 #ifdef I2_PYTHON_BUILD
 #      define I2_PYTHON_API I2_EXPORT
@@ -38,7 +36,4 @@
 #      define I2_PYTHON_API I2_IMPORT
 #endif /* I2_PYTHON_BUILD */
 
-#include "pythonlanguage.h"
-#include "pythoninterpreter.h"
-
 #endif /* I2PYTHON_H */
index 674d6280cbd993d6317628de2abb86ace32785a0..3c4093a04d6be6a0cbaadf72c1415286ad259163 100644 (file)
@@ -7,12 +7,14 @@ pkglib_LTLIBRARIES = \
 .conf.cpp: $(top_builddir)/tools/mkembedconfig.c
        $(top_builddir)/tools/mkembedconfig $< $@
 
+EXTRA_DIST = \
+       i2-remoting.cpp
+
 libremoting_la_SOURCES = \
        endpoint.cpp \
        endpoint.h \
        endpointmanager.cpp \
        endpointmanager.h \
-       i2-remoting.cpp \
        i2-remoting.h \
        jsonrpcconnection.cpp \
        jsonrpcconnection.h \
index e7bf0561573e973bfc06a1cd5af51a7772ea0d7a..c4470bd197c5261f166547287bdddeb82846e1bc 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/endpoint.h"
+#include "remoting/endpointmanager.h"
 #include "base/application.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
+#include "config/configitembuilder.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
index e60c8f5dc0c0407b56376145bc2e30fadfe94b98..5a09732ad553afa3a7c7c77e8041b3a21b80b9c9 100644 (file)
 #ifndef ENDPOINT_H
 #define ENDPOINT_H
 
+#include "remoting/i2-remoting.h"
+#include "remoting/requestmessage.h"
+#include "remoting/responsemessage.h"
+#include "remoting/jsonrpcconnection.h"
 #include "base/dynamicobject.h"
 #include <boost/signals2.hpp>
 
index a0e2b27dce19edca61858803ccdcd04f70f66d65..6694b4e3d32ec5da04b0f2251aa2acf3ccaa5b0f 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/endpointmanager.h"
 #include "base/dynamictype.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
index e180a983b389ae8ee5d6f26f5eb896cda5206644..9f0cc3e292005da468191f4865c0e5a58013366f 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef ENDPOINTMANAGER_H
 #define ENDPOINTMANAGER_H
 
+#include "remoting/i2-remoting.h"
+#include "remoting/endpoint.h"
 #include "base/tcpsocket.h"
 #include "base/tlsstream.h"
 #include <boost/signals2.hpp>
index 47c4ade2a7a97bb9b97019a18893cbbacc78874d..e44cafcd97c09ec21407f0866c9998a06b873511 100644 (file)
@@ -28,7 +28,6 @@
  */
 
 #include "base/i2-base.h"
-#include "config/i2-config.h"
 
 #ifdef I2_REMOTING_BUILD
 #      define I2_REMOTING_API I2_EXPORT
 #      define I2_REMOTING_API I2_IMPORT
 #endif /* I2_REMOTING_BUILD */
 
-#include "messagepart.h"
-#include "requestmessage.h"
-#include "responsemessage.h"
-#include "jsonrpcconnection.h"
-#include "endpoint.h"
-#include "endpointmanager.h"
-
 #endif /* I2REMOTING_H */
index b7ac5d7276171f98d10fb286685d36b46467a4f4..a6225288ee9cd4c7c600ac16b5ec34c80027e005 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/jsonrpcconnection.h"
 #include "base/netstring.h"
 #include "base/objectlock.h"
 #include "base/logger_fwd.h"
index daeec311d0407c9064a07e43a5c9433e8321e562..3aaaa247ea10bcba2ee200beec12c0d802a849ce 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef JSONRPCCONNECTION_H
 #define JSONRPCCONNECTION_H
 
+#include "remoting/i2-remoting.h"
+#include "remoting/messagepart.h"
 #include "base/connection.h"
 #include <boost/signals2.hpp>
 
index 4da41ebc4a3015b964a0221d473cf7f71e981e05..69a1f5fc3d859825b721e401d9210c3c6b129d74 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/messagepart.h"
 #include <boost/smart_ptr/make_shared.hpp>
 
 using namespace icinga;
index 385cc9b2a1430684dd78e671504060569829866d..1c02fd25830343a1fa65a23dc6fdb571959d329e 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef MESSAGEPART_H
 #define MESSAGEPART_H
 
+#include "remoting/i2-remoting.h"
+#include "base/dictionary.h"
+
 struct cJSON;
 
 namespace icinga
index c18b8596ca0fb713aa67d72294217e867d17c096..a530317ba5f906a629eaa7d2ad8d1a8a5534dd58 100644 (file)
@@ -17,6 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/requestmessage.h"
 
 using namespace icinga;
index 5068856281c4cc50bb1145d5b4495850d8427abc..eb75752cb1309319499396590bb09c5ac3f416ad 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef REQUESTMESSAGE_H
 #define REQUESTMESSAGE_H
 
+#include "remoting/i2-remoting.h"
+#include "remoting/messagepart.h"
+
 namespace icinga
 {
 
index c18b8596ca0fb713aa67d72294217e867d17c096..5461015e95f1b6c223f9416bfeb4e11d3f4a1683 100644 (file)
@@ -17,6 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-remoting.h"
+#include "remoting/responsemessage.h"
 
 using namespace icinga;
index d46ef18a2653536b40c3a529c8608cce22de371f..a3cd9b9e615a967371c7f1b6f7d801d768bd05e9 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef RESPONSEMESSAGE_H
 #define RESPONSEMESSAGE_H
 
+#include "remoting/i2-remoting.h"
+#include "remoting/messagepart.h"
+
 namespace icinga
 {