diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index d230c402c..86c765e7b 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -19,7 +19,6 @@ mkclass_target(application.ti application.th) mkclass_target(dynamicobject.ti dynamicobject.th) mkclass_target(filelogger.ti filelogger.th) mkclass_target(logger.ti logger.th) -mkclass_target(script.ti script.th) mkclass_target(streamlogger.ti streamlogger.th) mkclass_target(sysloglogger.ti sysloglogger.th) @@ -28,9 +27,9 @@ add_library(base SHARED convert.cpp dictionary.cpp dynamicobject.cpp dynamicobject.th dynamictype.cpp exception.cpp fifo.cpp filelogger.cpp filelogger.th logger.cpp logger.th netstring.cpp networkstream.cpp object.cpp objectlock.cpp process.cpp - process-unix.cpp process-windows.cpp qstring.cpp ringbuffer.cpp script.cpp - script.th scriptfunction.cpp scriptfunctionwrapper.cpp scriptinterpreter.cpp - scriptlanguage.cpp scriptutils.cpp scriptvariable.cpp serializer.cpp socket.cpp stacktrace.cpp + process-unix.cpp process-windows.cpp qstring.cpp ringbuffer.cpp + scriptfunction.cpp scriptfunctionwrapper.cpp scriptutils.cpp + scriptvariable.cpp serializer.cpp socket.cpp stacktrace.cpp statsfunction.cpp stdiostream.cpp stream_bio.cpp stream.cpp streamlogger.cpp streamlogger.th sysloglogger.cpp sysloglogger.th tcpsocket.cpp threadpool.cpp timer.cpp tlsstream.cpp tlsutility.cpp type.cpp unixsocket.cpp utility.cpp value.cpp diff --git a/lib/base/script.cpp b/lib/base/script.cpp deleted file mode 100644 index 0306cf2e5..000000000 --- a/lib/base/script.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * Icinga 2 * - * Copyright (C) 2012-2014 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 "base/script.h" -#include "base/scriptlanguage.h" -#include "base/dynamictype.h" -#include "base/logger_fwd.h" -#include "base/objectlock.h" -#include "base/debug.h" - -using namespace icinga; - -REGISTER_TYPE(Script); - -void Script::Start(void) -{ - DynamicObject::Start(); - - ASSERT(OwnsLock()); - - SpawnInterpreter(); -} - -void Script::SpawnInterpreter(void) -{ - Log(LogInformation, "base", "Reloading script '" + GetName() + "'"); - - ScriptLanguage::Ptr language = ScriptLanguage::GetByName(GetLanguage()); - m_Interpreter = language->CreateInterpreter(GetSelf()); -} diff --git a/lib/base/script.h b/lib/base/script.h deleted file mode 100644 index 6547792d1..000000000 --- a/lib/base/script.h +++ /dev/null @@ -1,51 +0,0 @@ -/****************************************************************************** - * Icinga 2 * - * Copyright (C) 2012-2014 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 SCRIPT_H -#define SCRIPT_H - -#include "base/i2-base.h" -#include "base/script.th" - -namespace icinga -{ - -class ScriptInterpreter; - -/** - * A script. - * - * @ingroup base - */ -class I2_BASE_API Script : public ObjectImpl