]> granicus.if.org Git - icinga2/commitdiff
Renamed "hooks" to "methods".
authorGunnar Beutner <gunnar@beutner.name>
Mon, 16 Jul 2012 06:19:51 +0000 (08:19 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 16 Jul 2012 06:19:51 +0000 (08:19 +0200)
base/configobject.cpp
base/configobject.h
cib/configobjectadapter.cpp
cib/configobjectadapter.h
components/checker/checkercomponent.cpp

index 86a520c312bfd2f486733b8174513a6192c7dfbe..ef8e3ef9e442bef85e5dcc10676bf77b2c1c1194 100644 (file)
@@ -197,12 +197,12 @@ void ConfigObject::RemoveTag(const string& key)
        GetTags()->Remove(key);
 }
 
-ScriptTask::Ptr ConfigObject::InvokeHook(const string& hook,
+ScriptTask::Ptr ConfigObject::InvokeMethod(const string& method,
     const vector<Variant>& arguments, ScriptTask::CompletionCallback callback)
 {
-       Dictionary::Ptr hooks;
+       Dictionary::Ptr methods;
        string funcName;
-       if (!GetProperty("hooks", &hooks) || !hooks->Get(hook, &funcName))
+       if (!GetProperty("methods", &methods) || !methods->Get(method, &funcName))
                return ScriptTask::Ptr();
 
        ScriptFunction::Ptr func = ScriptFunction::GetByName(funcName);
index 0e9f2213cb407e732eadc07f660fc0e97c58af6f..647f902badfe6f7b4a14aaff90f141368c6f000b 100644 (file)
@@ -65,7 +65,7 @@ public:
 
        void RemoveTag(const string& key);
 
-       ScriptTask::Ptr InvokeHook(const string& hook,
+       ScriptTask::Ptr InvokeMethod(const string& hook,
            const vector<Variant>& arguments, ScriptTask::CompletionCallback callback);
 
        string GetType(void) const;
index 4e9153d9a2511ec21c1c216dc31d2e2e8ec5be8e..8860bfe8f127f95cf9ee6d38e98ebdf07969e9d1 100644 (file)
@@ -46,8 +46,8 @@ void ConfigObjectAdapter::RemoveTag(const string& key)
        m_ConfigObject->RemoveTag(key);
 }
 
-ScriptTask::Ptr ConfigObjectAdapter::InvokeHook(const string& hook,
+ScriptTask::Ptr ConfigObjectAdapter::InvokeMethod(const string& method,
        const vector<Variant>& arguments, ScriptTask::CompletionCallback callback)
 {
-       return m_ConfigObject->InvokeHook(hook, arguments, callback);
-}
\ No newline at end of file
+       return m_ConfigObject->InvokeMethod(method, arguments, callback);
+}
index 07dc57c475e667aa080dbac37ce720426981cba6..7413fd2f9f546e16d8bb44a892f8edcc01758b0c 100644 (file)
@@ -57,7 +57,7 @@ public:
 
        void RemoveTag(const string& key);
 
-       ScriptTask::Ptr InvokeHook(const string& hook,
+       ScriptTask::Ptr InvokeMethod(const string& method,
            const vector<Variant>& arguments, ScriptTask::CompletionCallback callback);
 
 private:
index 66d0c113a632b6b6aa139f341d57f17fa4e8bb64..269f876ef34ccf8578404ee7528e04fc37298b16 100644 (file)
@@ -79,7 +79,7 @@ void CheckerComponent::CheckTimerHandler(void)
                vector<Variant> arguments;
                arguments.push_back(service.GetConfigObject());
                ScriptTask::Ptr task;
-               task = service.InvokeHook("check", arguments, boost::bind(&CheckerComponent::CheckCompletedHandler, this, service, _1));
+               task = service.InvokeMethod("check", arguments, boost::bind(&CheckerComponent::CheckCompletedHandler, this, service, _1));
                assert(task); /* TODO: gracefully handle missing hooks */
 
                m_PendingServices.insert(service.GetConfigObject());