From 7270fb160c4e8dc5e355e0195c7abd25626bb970 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 16 Jul 2012 08:19:51 +0200 Subject: [PATCH] Renamed "hooks" to "methods". --- base/configobject.cpp | 6 +++--- base/configobject.h | 2 +- cib/configobjectadapter.cpp | 6 +++--- cib/configobjectadapter.h | 2 +- components/checker/checkercomponent.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/configobject.cpp b/base/configobject.cpp index 86a520c31..ef8e3ef9e 100644 --- a/base/configobject.cpp +++ b/base/configobject.cpp @@ -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& 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); diff --git a/base/configobject.h b/base/configobject.h index 0e9f2213c..647f902ba 100644 --- a/base/configobject.h +++ b/base/configobject.h @@ -65,7 +65,7 @@ public: void RemoveTag(const string& key); - ScriptTask::Ptr InvokeHook(const string& hook, + ScriptTask::Ptr InvokeMethod(const string& hook, const vector& arguments, ScriptTask::CompletionCallback callback); string GetType(void) const; diff --git a/cib/configobjectadapter.cpp b/cib/configobjectadapter.cpp index 4e9153d9a..8860bfe8f 100644 --- a/cib/configobjectadapter.cpp +++ b/cib/configobjectadapter.cpp @@ -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& arguments, ScriptTask::CompletionCallback callback) { - return m_ConfigObject->InvokeHook(hook, arguments, callback); -} \ No newline at end of file + return m_ConfigObject->InvokeMethod(method, arguments, callback); +} diff --git a/cib/configobjectadapter.h b/cib/configobjectadapter.h index 07dc57c47..7413fd2f9 100644 --- a/cib/configobjectadapter.h +++ b/cib/configobjectadapter.h @@ -57,7 +57,7 @@ public: void RemoveTag(const string& key); - ScriptTask::Ptr InvokeHook(const string& hook, + ScriptTask::Ptr InvokeMethod(const string& method, const vector& arguments, ScriptTask::CompletionCallback callback); private: diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index 66d0c113a..269f876ef 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -79,7 +79,7 @@ void CheckerComponent::CheckTimerHandler(void) vector 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()); -- 2.40.0