extern MapStringVectorSizeT _groups;
extern std::vector<ImeInfoDB> _ime_info;
-extern EXAPI CommonLookupTable g_isf_candidate_table;
+CommonLookupTable g_isf_candidate_table;
/////////////////////////////////////////////////////////////////////////////
#define IMEMANAGER_PRIVILEGE "http://tizen.org/privilege/imemanager"
-EXAPI scim::CommonLookupTable g_isf_candidate_table;
-
-
namespace scim
{
/***************************************************/
/*** Beginning of panel agent interface for ISF ***/
/***************************************************/
-static scim::PanelAgentBase* instance = NULL;
+static scim::PanelAgentPointer instance;
extern "C" {
EXAPI void scim_module_exit(void)
{
- if (instance) {
- delete instance;
- instance = NULL;
- }
+ instance.reset();
}
EXAPI void scim_panel_agent_module_init(const scim::ConfigPointer& config)
EXAPI scim::PanelAgentPointer scim_panel_agent_module_get_instance()
{
-
- if (!instance) {
+ scim::PanelAgentBase* _instance = NULL;
+ if (instance.null()) {
try {
- instance = new scim::EcoreSocketPanelAgent();
+ _instance = new scim::EcoreSocketPanelAgent();
} catch (...) {
- delete instance;
- instance = NULL;
+ delete _instance;
+ _instance = NULL;
}
+ if(_instance)
+ instance = _instance;
}
-
- return scim::PanelAgentPointer(instance);
+ return instance;
}
}
};
-static scim::PanelAgentBase* instance = NULL;
+static scim::PanelAgentPointer instance;
extern "C" {
EXAPI void scim_module_init (void)
EXAPI void scim_module_exit (void)
{
LOGD ("");
- if (instance) {
- delete instance;
- instance = NULL;
- }
+ instance.reset();
}
EXAPI void scim_panel_agent_module_init (const scim::ConfigPointer& config)
EXAPI scim::PanelAgentPointer scim_panel_agent_module_get_instance ()
{
- if (!instance) {
+ scim::PanelAgentBase* _instance = NULL;
+ if (instance.null()) {
try {
- LOGD ("");
- instance = new WaylandPanelAgent ();
+ _instance = new WaylandPanelAgent();
} catch (...) {
- delete instance;
- instance = NULL;
+ delete _instance;
+ _instance = NULL;
}
+ if(_instance)
+ instance = _instance;
}
+ return instance;
- return scim::PanelAgentPointer (instance);
}
}
#define MIN_REPEAT_TIME 2.0
-EXAPI scim::CommonLookupTable g_isf_candidate_table;
-
-
namespace scim
{
}
~PanelAgentManagerImpl () {
+ m_socket.reset(0);
+ m_wayland.reset(0);
std::vector<PanelAgentModule*>::iterator iter = m_panel_agent_modules.begin ();
for (; iter != m_panel_agent_modules.end (); iter++) {
+ (*iter)->unload();
delete *iter;
}
}
bool
+PanelAgentModule::unload ()
+{
+ return m_module.unload ();
+}
+
+bool
PanelAgentModule::valid () const
{
return (m_module.valid () && m_panel_agent_init && m_panel_agent_get_instance);
bool load (const String& name, const ConfigPointer& config);
/**
+ * @brief Unload the PanelAgent Module.
+ * @return true if sucessfully unloaded.
+ */
+ bool unload ();
+
+ /**
* @brief Check if a module is loaded and initialized successfully.
*
* @return true if a module is already loaded and initialized successfully.