]> granicus.if.org Git - icinga2/commitdiff
Remove api.cpp and api.hpp
authorGunnar Beutner <gunnar@beutner.name>
Thu, 22 Oct 2015 08:26:56 +0000 (10:26 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 22 Oct 2015 08:26:56 +0000 (10:26 +0200)
fixes #10407

lib/icinga/CMakeLists.txt
lib/icinga/api.cpp [deleted file]
lib/icinga/api.hpp [deleted file]

index cca5f9d6197f55f286b7bbf9418807315152409c..e48f21482e3d5b3b1979b32a8ffbfe2de1924fe1 100644 (file)
@@ -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 (file)
index bb81c9c..0000000
+++ /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 (file)
index acf4e2e..0000000
+++ /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 */