From 347373103401007000eb7eb37fe89a265ca60d35 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 22 Oct 2015 10:26:56 +0200 Subject: [PATCH] Remove api.cpp and api.hpp fixes #10407 --- lib/icinga/CMakeLists.txt | 2 +- lib/icinga/api.cpp | 39 ---------------------------------- lib/icinga/api.hpp | 44 --------------------------------------- 3 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 lib/icinga/api.cpp delete mode 100644 lib/icinga/api.hpp diff --git a/lib/icinga/CMakeLists.txt b/lib/icinga/CMakeLists.txt index cca5f9d61..e48f21482 100644 --- a/lib/icinga/CMakeLists.txt +++ b/lib/icinga/CMakeLists.txt @@ -39,7 +39,7 @@ mkclass_target(usergroup.ti usergroup.tcpp usergroup.thpp) mkclass_target(user.ti user.tcpp user.thpp) set(icinga_SOURCES - api.cpp apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp + apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp checkable-flapping.cpp checkcommand.cpp checkcommand.thpp checkresult.cpp checkresult.thpp cib.cpp clusterevents.cpp command.cpp command.thpp comment.cpp comment.thpp compatutility.cpp dependency.cpp dependency.thpp dependency-apply.cpp downtime.cpp downtime.thpp eventcommand.cpp eventcommand.thpp diff --git a/lib/icinga/api.cpp b/lib/icinga/api.cpp deleted file mode 100644 index bb81c9cd8..000000000 --- a/lib/icinga/api.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** - * Icinga 2 * - * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software Foundation * - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - ******************************************************************************/ - -#include "icinga/api.hpp" -#include "remote/apifunction.hpp" -#include "base/logger.hpp" - -using namespace icinga; - -REGISTER_APIFUNCTION(GetAnswerToEverything, uapi, boost::bind(&API::GetAnswerToEverything, _2)); - -Value API::GetAnswerToEverything(const Dictionary::Ptr& params) -{ - String text; - - if (params) - text = params->Get("text"); - - Log(LogInformation, "API") - << "Hello from the Icinga 2 API: " << text; - - return 42; -} diff --git a/lib/icinga/api.hpp b/lib/icinga/api.hpp deleted file mode 100644 index acf4e2e3f..000000000 --- a/lib/icinga/api.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/****************************************************************************** - * Icinga 2 * - * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) * - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; either version 2 * - * of the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software Foundation * - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - ******************************************************************************/ - -#ifndef API_H -#define API_H - -#include "icinga/i2-icinga.hpp" -#include "base/value.hpp" -#include "base/dictionary.hpp" - -namespace icinga -{ - -/** - * @ingroup icinga - */ -class I2_ICINGA_API API -{ -public: - static Value GetAnswerToEverything(const Dictionary::Ptr& params); - -private: - API(void); -}; - -} - -#endif /* API_H */