1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "icinga/checkable.hpp"
4 #include "base/configobject.hpp"
5 #include "base/dictionary.hpp"
6 #include "base/function.hpp"
7 #include "base/functionwrapper.hpp"
8 #include "base/scriptframe.hpp"
10 using namespace icinga;
12 static void CheckableProcessCheckResult(const CheckResult::Ptr& cr)
14 ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
15 Checkable::Ptr self = vframe->Self;
16 REQUIRE_NOT_NULL(self);
17 self->ProcessCheckResult(cr);
20 Object::Ptr Checkable::GetPrototype()
22 static Dictionary::Ptr prototype = new Dictionary({
23 { "process_check_result", new Function("Checkable#process_check_result", CheckableProcessCheckResult, { "cr" }, false) }