From c835ab84b440be1d96e533a225857212fd96c042 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Thu, 15 Nov 2012 19:33:02 +0900 Subject: [PATCH] Added set_path_info function to HelperModule to support OSP based keyboard Change-Id: I00e5f4952eee136cfde3d0b456a8ce76727046ce --- ism/src/scim_helper_module.cpp | 7 +++++++ ism/src/scim_helper_module.h | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ism/src/scim_helper_module.cpp b/ism/src/scim_helper_module.cpp index 2a883b4..6e1338e 100644 --- a/ism/src/scim_helper_module.cpp +++ b/ism/src/scim_helper_module.cpp @@ -75,6 +75,9 @@ HelperModule::load (const String &name) m_set_arg_info = (HelperModuleSetArgInfoFunc) m_module.symbol ("scim_helper_module_set_arg_info"); + m_set_path_info = + (HelperModuleSetPathInfoFunc) m_module.symbol ("scim_helper_module_set_path_info"); + if (!m_number_of_helpers || !m_get_helper_info || !m_run_helper) { m_module.unload (); m_number_of_helpers = 0; @@ -83,6 +86,10 @@ HelperModule::load (const String &name) m_run_helper = 0; return false; } + + if (m_set_path_info) { + m_set_path_info(m_module.get_path().c_str()); + } } catch (...) { m_module.unload (); m_number_of_helpers = 0; diff --git a/ism/src/scim_helper_module.h b/ism/src/scim_helper_module.h index 981c7e1..9953a0f 100644 --- a/ism/src/scim_helper_module.h +++ b/ism/src/scim_helper_module.h @@ -114,6 +114,19 @@ typedef void (*HelperModuleRunHelperFunc) (const String &uuid, const Confi typedef void (*HelperModuleSetArgInfoFunc) (int argc, char *argv []); /** + * @brief Deliver the .so filepath to ISE currently being loaded. + * + * In Tizen platform, there are cases that helper module requires the filepath of .so file + * currently being loaded, since the binary does not contain any information such as ModuleName or UUID. + * This function delivers the filepath information to those applications, + * so that it can acquire the necessary information using the filepath information. + * This also should be removed when there is no need for the filepath since this is only tizen-specific. + * + * @param path The filepath of the .so file currently being loaded + */ +typedef void (*HelperModuleSetPathInfoFunc) (const char *path); + +/** * @brief The class used to load a Helper module and run its Helpers. * * This class should not be used directly. HelperManager should be used instead. @@ -127,6 +140,7 @@ class HelperModule HelperModuleGetHelperLangFunc m_get_helper_lang; HelperModuleRunHelperFunc m_run_helper; HelperModuleSetArgInfoFunc m_set_arg_info; + HelperModuleSetPathInfoFunc m_set_path_info; HelperModule (const HelperModule &); HelperModule & operator= (const HelperModule &); -- 2.7.4