]> granicus.if.org Git - icinga2/commitdiff
Remove libdemo and libhello 5971/head
authorGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 11 Jan 2018 12:29:11 +0000 (13:29 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 11 Jan 2018 12:29:11 +0000 (13:29 +0100)
CMakeLists.txt
icinga-app/CMakeLists.txt
lib/CMakeLists.txt
lib/demo/CMakeLists.txt [deleted file]
lib/demo/demo.cpp [deleted file]
lib/demo/demo.hpp [deleted file]
lib/demo/demo.ti [deleted file]
lib/hello/CMakeLists.txt [deleted file]
lib/hello/helloapplication.cpp [deleted file]
lib/hello/helloapplication.hpp [deleted file]
lib/hello/helloapplication.ti [deleted file]

index 9232ccb3a3f55035d6431e1c3bd8c46c11e8e0e3..ec0fedc182ebc9c352cd526fcdf07e9db11c1264 100644 (file)
@@ -32,8 +32,6 @@ option(ICINGA2_WITH_MYSQL "Build the MySQL IDO module" ON)
 option(ICINGA2_WITH_PGSQL "Build the PostgreSQL IDO module" ON)
 option(ICINGA2_WITH_CHECKER "Build the checker module" ON)
 option(ICINGA2_WITH_COMPAT "Build the compat module" ON)
-option(ICINGA2_WITH_DEMO "Build the demo module" OFF)
-option(ICINGA2_WITH_HELLO "Build the hello module" OFF)
 option(ICINGA2_WITH_LIVESTATUS "Build the Livestatus module" ON)
 option(ICINGA2_WITH_NOTIFICATION "Build the notification module" ON)
 option(ICINGA2_WITH_PERFDATA "Build the perfdata module" ON)
index a6747fb4b7a1563c3af9800f7be906e313a06cb9..3be2db704a9f5bc269804a0cf4091d74dfed2fe5 100644 (file)
@@ -96,27 +96,6 @@ install(
   RUNTIME DESTINATION ${InstallPath}
 )
 
-if(ICINGA2_WITH_HELLO)
-  add_executable(hello-app $<TARGET_OBJECTS:icingaloader>)
-  add_whole_static_library(hello-app base)
-  add_whole_static_library(hello-app config)
-  add_whole_static_library(hello-app remote)
-  add_whole_static_library(hello-app cli)
-  add_whole_static_library(hello-app hello)
-
-  set_target_properties (
-    hello-app PROPERTIES
-    INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
-    FOLDER Bin
-    OUTPUT_NAME hello
-  )
-
-  install(
-    TARGETS hello-app
-    RUNTIME DESTINATION ${InstallPath}
-  )
-endif()
-
 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/icinga2\")")
 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/icinga2\")")
 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_RUNDIR}/icinga2\")")
index 4da7083670b15f205f66b2201bcf6ab1af1d302c..67ad4afeef61eaadc969accebf1e378697a51070 100644 (file)
@@ -22,10 +22,6 @@ add_subdirectory(remote)
 add_subdirectory(icinga)
 add_subdirectory(methods)
 
-if(ICINGA2_WITH_HELLO)
-  add_subdirectory(hello)
-endif()
-
 if(ICINGA2_WITH_CHECKER)
   add_subdirectory(checker)
 endif()
@@ -60,10 +56,6 @@ if(ICINGA2_WITH_PGSQL)
   endif()
 endif()
 
-if(ICINGA2_WITH_DEMO)
-  add_subdirectory(demo)
-endif()
-
 if(ICINGA2_WITH_LIVESTATUS)
   add_subdirectory(livestatus)
 endif()
diff --git a/lib/demo/CMakeLists.txt b/lib/demo/CMakeLists.txt
deleted file mode 100644 (file)
index 9882cf2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Icinga 2
-# Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
-#
-# 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.
-
-mkclass_target(demo.ti demo.tcpp demo.thpp)
-
-set(demo_SOURCES
-  demo.cpp demo.hpp demo.thpp
-)
-
-if(ICINGA2_UNITY_BUILD)
-    mkunity_target(demo demo demo_SOURCES)
-endif()
-
-add_library(demo STATIC ${demo_SOURCES})
-
-target_link_libraries(demo ${Boost_LIBRARIES} base config icinga remote)
-
-set_target_properties (
-  demo PROPERTIES
-  FOLDER Components
-)
diff --git a/lib/demo/demo.cpp b/lib/demo/demo.cpp
deleted file mode 100644 (file)
index bb55046..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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.             *
- ******************************************************************************/
-
-#include "demo/demo.hpp"
-#include "demo/demo.tcpp"
-#include "remote/apilistener.hpp"
-#include "remote/apifunction.hpp"
-#include "base/configtype.hpp"
-#include "base/logger.hpp"
-
-using namespace icinga;
-
-REGISTER_TYPE(Demo);
-
-REGISTER_APIFUNCTION(HelloWorld, demo, &Demo::DemoMessageHandler);
-
-/**
- * Starts the component.
- */
-void Demo::Start(bool runtimeCreated)
-{
-       ObjectImpl<Demo>::Start(runtimeCreated);
-
-       m_DemoTimer = new Timer();
-       m_DemoTimer->SetInterval(5);
-       m_DemoTimer->OnTimerExpired.connect(std::bind(&Demo::DemoTimerHandler, this));
-       m_DemoTimer->Start();
-}
-
-/**
- * Periodically broadcasts an API message.
- */
-void Demo::DemoTimerHandler()
-{
-       Dictionary::Ptr message = new Dictionary();
-       message->Set("method", "demo::HelloWorld");
-
-       ApiListener::Ptr listener = ApiListener::GetInstance();
-       if (listener) {
-               MessageOrigin::Ptr origin = new MessageOrigin();
-               listener->RelayMessage(origin, nullptr, message, true);
-               Log(LogInformation, "Demo", "Sent demo::HelloWorld message");
-       }
-}
-
-Value Demo::DemoMessageHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr&)
-{
-       Log(LogInformation, "Demo")
-               << "Got demo message from '" << origin->FromClient->GetEndpoint()->GetName() << "'";
-
-       return Empty;
-}
diff --git a/lib/demo/demo.hpp b/lib/demo/demo.hpp
deleted file mode 100644 (file)
index a51c359..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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 DEMO_H
-#define DEMO_H
-
-#include "demo/demo.thpp"
-#include "remote/messageorigin.hpp"
-#include "base/timer.hpp"
-
-namespace icinga
-{
-
-/**
- * @ingroup demo
- */
-class Demo final : public ObjectImpl<Demo>
-{
-public:
-       DECLARE_OBJECT(Demo);
-       DECLARE_OBJECTNAME(Demo);
-
-       void Start(bool runtimeCreated) override;
-
-       static Value DemoMessageHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params);
-
-
-private:
-       Timer::Ptr m_DemoTimer;
-
-       void DemoTimerHandler();
-};
-
-}
-
-#endif /* DEMO_H */
diff --git a/lib/demo/demo.ti b/lib/demo/demo.ti
deleted file mode 100644 (file)
index 912aae2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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.             *
- ******************************************************************************/
-
-#include "base/configobject.hpp"
-
-library demo;
-
-namespace icinga
-{
-
-class Demo : ConfigObject
-{
-};
-
-}
diff --git a/lib/hello/CMakeLists.txt b/lib/hello/CMakeLists.txt
deleted file mode 100644 (file)
index 707f1ee..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Icinga 2
-# Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
-#
-# 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.
-
-mkclass_target(helloapplication.ti helloapplication.tcpp helloapplication.thpp)
-
-set(hello_SOURCES
-  helloapplication.cpp helloapplication.hpp helloapplication.thpp
-)
-
-if(ICINGA2_UNITY_BUILD)
-    mkunity_target(hello hello hello_SOURCES)
-endif()
-
-add_library(hello STATIC ${hello_SOURCES})
-
-target_link_libraries(hello ${Boost_LIBRARIES} base config)
-
-set_target_properties (
-  hello PROPERTIES
-  FOLDER Lib
-)
diff --git a/lib/hello/helloapplication.cpp b/lib/hello/helloapplication.cpp
deleted file mode 100644 (file)
index 03a1194..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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.             *
- ******************************************************************************/
-
-#include "hello/helloapplication.hpp"
-#include "hello/helloapplication.tcpp"
-#include "base/initialize.hpp"
-#include "base/logger.hpp"
-#include "base/scriptglobal.hpp"
-
-using namespace icinga;
-
-REGISTER_TYPE(HelloApplication);
-
-INITIALIZE_ONCE([]() {
-       ScriptGlobal::Set("ApplicationType", "HelloApplication");
-});
-
-/**
- * The entry point for the hello application.
- *
- * @returns An exit status.
- */
-int HelloApplication::Main()
-{
-       Log(LogInformation, "HelloApplication", "Hello World!");
-
-       return 0;
-}
diff --git a/lib/hello/helloapplication.hpp b/lib/hello/helloapplication.hpp
deleted file mode 100644 (file)
index 9d9bfa8..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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 HELLOAPPLICATION_H
-#define HELLOAPPLICATION_H
-
-#include "hello/helloapplication.thpp"
-
-namespace icinga
-{
-
-/**
- * The hello application.
- *
- * @ingroup hello
- */
-class HelloApplication final : public ObjectImpl<HelloApplication>
-{
-public:
-       DECLARE_OBJECT(HelloApplication);
-       DECLARE_OBJECTNAME(HelloApplication);
-
-       int Main() override;
-};
-
-}
-
-#endif /* HELLOAPPLICATION_H */
diff --git a/lib/hello/helloapplication.ti b/lib/hello/helloapplication.ti
deleted file mode 100644 (file)
index ec4616f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
- *                                                                            *
- * 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.             *
- ******************************************************************************/
-
-#include "base/application.hpp"
-
-library hello;
-
-namespace icinga
-{
-
-class HelloApplication : Application
-{
-};
-
-}