Reduce package dependencies 84/239484/6
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 27 Jul 2020 05:36:19 +0000 (14:36 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 30 Jul 2020 08:00:03 +0000 (17:00 +0900)
Change-Id: I1c14e7f5cd38050346d256397157f94a266c53a2
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
14 files changed:
configure.ac
engine-loader/Makefile.am
engine-loader/include/engine_loader.h
engine-loader/include/engine_loader_error.h [new file with mode: 0644]
engine-loader/src/engine_loader.cpp
engine-loader/src/engine_loader_dbus.cpp
engine-loader/src/engine_loader_main.cpp
ism/extras/efl_panel/Makefile.am
ism/extras/efl_panel/isf_panel_efl.cpp
ism/src/Makefile.am
ism/src/isf_query_utility.cpp
ism/src/isf_query_utility.h
ism/src/scim_module.cpp
packaging/isf.spec

index 89884f0..60ecd3e 100644 (file)
@@ -294,9 +294,6 @@ PKG_CHECK_MODULES(GLIB, [glib-2.0])
 # Check gio library
 PKG_CHECK_MODULES(GIO, [gio-2.0])
 
-# Check dbus library
-PKG_CHECK_MODULES(DBUS, [dbus-1])
-
 # Check tzplatform-config library
 PKG_CHECK_MODULES(TZPLATFORM_CONFIG, [libtzplatform-config])
 
@@ -367,10 +364,7 @@ PKG_CHECK_MODULES(PKGMGR_INFO, [pkgmgr-info],
                   [ISF_HAS_PKGMGR_INFO=yes],
                   [ISF_HAS_PKGMGR_INFO=no])
 
-# Check db-util library
-PKG_CHECK_MODULES(DB_UTIL, [db-util],
-                  [ISF_HAS_DB_UTIL=yes],
-                  [ISF_HAS_DB_UTIL=no])
+PKG_CHECK_MODULES(SQLITE3, [sqlite3])
 
 # Ignore checked modules if --disable option is added
 AC_ARG_ENABLE(include-notification,
index 3cfc400..55f6fae 100644 (file)
@@ -10,13 +10,14 @@ AM_CPPFLAGS = -I$(top_builddir) \
            -I$(top_srcdir)/ism/utils \
            -I$(top_srcdir)/engine-loader/include \
            -I$(includedir) \
+           -DISF_VERSION=\"@ISF_VERSION@\" \
+           -DSCIM_BINDIR=\"@SCIM_BINDIR@\" \
            -DSCIM_DATADIR=\"@SCIM_DATADIR@\" \
            -DSCIM_LOCALEDIR=\"@SCIM_LOCALEDIR@\" \
            -DSCIM_SYSCONFDIR=\"@SCIM_SYSCONFDIR@\" \
            -DSCIM_LIBEXECDIR=\"@SCIM_LIBEXECDIR@\" \
            -DSCIM_ICONDIR=\"@SCIM_ICONDIR@\" \
-           -DSCIM_MODULE_PATH=\"@SCIM_MODULE_PATH@\" \
-           -DSCIM_TEMPDIR=\"@SCIM_TEMPDIR@\"
+           -DSCIM_MODULE_PATH=\"@SCIM_MODULE_PATH@\"
 
 
 noinst_HEADERS =
@@ -27,21 +28,35 @@ bin_PROGRAMS          = $(ISE_ENGINE_LOADER)
 
 ise_engine_loader_SOURCES  = src/engine_loader.cpp \
                              src/engine_loader_main.cpp \
-                             src/engine_loader_dbus.cpp
-
-
-ise_engine_loader_CXXFLAGS = @DLOG_CFLAGS@ \
-                        @GLIB_CFLAGS@ \
+                             src/engine_loader_dbus.cpp \
+                             ../ism/src/scim_imengine.cpp \
+                             ../ism/src/scim_imengine_module.cpp \
+                             ../ism/src/scim_signals.cpp \
+                             ../ism/src/scim_slot.cpp \
+                             ../ism/src/scim_connection.cpp \
+                             ../ism/src/scim_transaction.cpp \
+                             ../ism/src/scim_object.cpp \
+                             ../ism/src/scim_lookup_table.cpp \
+                             ../ism/src/scim_config_base.cpp \
+                             ../ism/src/scim_config_module.cpp \
+                             ../ism/src/scim_global_config.cpp \
+                             ../ism/src/scim_debug.cpp \
+                             ../ism/src/scim_module.cpp \
+                             ../ism/src/scim_utility.cpp \
+                             ../ism/src/scim_socket.cpp \
+                             ../ism/src/isf_query_utility.cpp
+
+ise_engine_loader_CXXFLAGS = @GLIB_CFLAGS@ \
                         @GIO_CFLAGS@ \
-                        @PKGMGR_INFO_CFLAGS@ \
+                        @DLOG_CFLAGS@ \
+                        @SQLITE3_CFLAGS@ \
                         -fPIE
 
 ise_engine_loader_LDFLAGS  = @LTLIBINTL@ -rpath $(libdir) \
-                        @DLOG_LIBS@ \
                         @GLIB_LIBS@ \
                         @GIO_LIBS@ \
-                        @PKGMGR_INFO_LIBS@ \
+                        @DLOG_LIBS@ \
+                        @SQLITE3_LIBS@ \
                         -pie
 
-ise_engine_loader_LDADD    = $(top_builddir)/ism/src/libscim@SCIM_EPOCH@.la \
-                        $(top_builddir)/ism/src/libprofile.la
+ise_engine_loader_LDADD    = $(top_builddir)/ism/src/libltdlc.la
index c5baa85..0266a2c 100644 (file)
@@ -47,7 +47,7 @@ public:
     EngineLoader();
     ~EngineLoader();
 
-    bool set_keyboard_ise_by_uuid(const scim::String &uuid);
+    bool set_keyboard_ise_by_uuid(const scim::String &uuid, const scim::String &module_name);
     void flush_imengine();
     void reset_imengine();
     void send_imengine_event(int command, uint32_t value);
diff --git a/engine-loader/include/engine_loader_error.h b/engine-loader/include/engine_loader_error.h
new file mode 100644 (file)
index 0000000..8cdcd27
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * ISF(Input Service Framework)
+ *
+ * ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable.
+ * Copyright (c) 2012-2020 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Inhong Han <inhong1.han@samsung.com>
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __ENGINE_LOADER_ERROR_H
+#define __ENGINE_LOADER_ERROR_H
+
+enum {
+    ENGINE_LOADER_ERROR_NONE,
+    ENGINE_LOADER_ERROR_OUT_OF_MEMORY,
+    ENGINE_LOADER_ERROR_UNKNOWN,
+    ENGINE_LOADER_ERROR_INVALID_PARAMETER,
+    ENGINE_LOADER_ERROR_IO_ERROR
+};
+
+#endif /* __ENGINE_LOADER_ERROR_H */
index 8391bcb..e609302 100644 (file)
 #include <string.h>
 #include <string>
 #include <vector>
-#include <tizen.h>
 #include <dlog.h>
-#include <pkgmgr-info.h>
 #include <gio/gio.h>
 
+#include "engine_loader_error.h"
 #include "engine_loader.h"
 #include "engine_loader_dbus.h"
 #include "scim_imengine.h"
@@ -70,7 +69,7 @@ public:
 
     EngineLoaderImpl(EngineLoader *thiz) : thiz(thiz), layout(0), is_focused(false)
     {
-        m_config = ConfigBase::get(true, "socket");
+        m_config = ConfigBase::get(false, "socket");
         if (m_config.null())
             m_config = new scim::DummyConfig();
     }
@@ -95,50 +94,50 @@ public:
     void slot_show_preedit_string(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "show_preedit_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to show preedit string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to show preedit string");
     }
 
     void slot_show_aux_string(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "show_aux_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to show aux string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to show aux string");
     }
 
     void slot_show_lookup_table(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "show_lookup_table");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to show lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to show lookup table");
     }
 
     void slot_hide_preedit_string(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "hide_preedit_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide preedit string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to hide preedit string");
     }
 
     void slot_hide_aux_string(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "hide_aux_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide aux string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to hide aux string");
     }
 
     void slot_hide_lookup_table(IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "hide_lookup_table");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to hide lookup table");
     }
 
     void slot_update_preedit_caret(IMEngineInstanceBase *si, int caret)
     {
         int ret = engine_loader_send_message(g_variant_new("(i)", caret), "update_preedit_caret");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update preedit caret");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to update preedit caret");
     }
 
     void slot_update_preedit_string(IMEngineInstanceBase *si,
@@ -151,8 +150,8 @@ public:
         generate_attr_builder(builder, attrs);
 
         int ret = engine_loader_send_message(g_variant_new("(a(v)s)", builder, utf8_wcstombs(str).c_str()), "update_preedit_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update preedit string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to update preedit string");
 
         if (builder)
             g_variant_builder_unref(builder);
@@ -170,8 +169,8 @@ public:
 
         int ret = engine_loader_send_message(g_variant_new("(a(v)ssi)", builder, utf8_wcstombs(preedit).c_str(),
                                             utf8_wcstombs(commit).c_str(), caret), "update_preedit_string_with_commit");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update preedit string with commit");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to update preedit string with commit");
 
         if (builder)
             g_variant_builder_unref(builder);
@@ -186,8 +185,8 @@ public:
         generate_attr_builder(builder, attrs);
 
         int ret = engine_loader_send_message(g_variant_new("(a(v)s)", builder, utf8_wcstombs(str).c_str()), "update_aux_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update aux string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to update aux string");
 
         if (builder)
             g_variant_builder_unref(builder);
@@ -196,8 +195,8 @@ public:
     void slot_commit_string(IMEngineInstanceBase *si, const WideString &str)
     {
         int ret = engine_loader_send_message(g_variant_new("(s)", utf8_wcstombs(str).c_str()), "commit_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to commit string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to commit string");
     }
 
     void slot_recapture_string(IMEngineInstanceBase *si,
@@ -213,8 +212,8 @@ public:
 
         int ret = engine_loader_send_message(g_variant_new("(a(v)ssii)", builder, utf8_wcstombs(preedit).c_str(),
                                             utf8_wcstombs(commit).c_str(), offset, len), "recapture_string");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update recapture string");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to update recapture string");
 
         if (builder)
             g_variant_builder_unref(builder);
@@ -231,8 +230,8 @@ public:
         g_variant_builder_add(key_event_builder, "{sv}", "key_dev_subclass", g_variant_new_uint16(key.dev_subclass));
 
         int ret = engine_loader_send_message(g_variant_new("(a{sv}s)", key_event_builder, key.dev_name.c_str()), "forward_key_event");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to forward key event");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to forward key event");
 
         if (key_event_builder)
             g_variant_builder_unref(key_event_builder);
@@ -273,8 +272,8 @@ public:
         }
 
         int ret = engine_loader_send_message(g_variant_new("(a(a(v))a(v)ii)", attr_builder, candidate_builder, page_size, cursor_pos), "update_lookup_table");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to update lookup table");
 
         if (attr_builder)
             g_variant_builder_unref(attr_builder);
@@ -296,8 +295,8 @@ public:
         }
 
         int ret = engine_loader_send_message(g_variant_new("(a(v))", builder), "register_properties");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to register properties");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to register properties");
 
         if (builder)
             g_variant_builder_unref(builder);
@@ -311,8 +310,8 @@ public:
         const char *tip = property.get_tip().c_str();
 
         int ret = engine_loader_send_message(g_variant_new("(ssss)", key, label, icon, tip), "update_property");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to update property");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to update property");
     }
 
     void slot_send_helper_event(IMEngineInstanceBase *si,
@@ -335,8 +334,8 @@ public:
                                       int len)
     {
         int ret = engine_loader_send_message(g_variant_new("(ii)", offset, len), "delete_surrounding_text");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to delete surrounding text");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to delete surrounding text");
         return true;
     }
 
@@ -350,37 +349,37 @@ public:
                             int end)
     {
         int ret = engine_loader_send_message(g_variant_new("(ii)", start, end), "set_selection");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to delete surrounding text");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to delete surrounding text\n");
         return true;
     }
 
     void slot_expand_candidate (IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "expand_candidate");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to hide lookup table");
     }
 
     void slot_contract_candidate (IMEngineInstanceBase *si)
     {
         int ret = engine_loader_send_message(g_variant_new("()"), "contract_candidate");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to hide lookup table");
     }
 
     void slot_set_candidate_style (IMEngineInstanceBase *si, ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, ISF_CANDIDATE_MODE_T mode)
     {
         int ret = engine_loader_send_message(g_variant_new("(ii)", (int)portrait_line, (int)mode), "set_candidate_style");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to hide lookup table");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGD("Failed to hide lookup table");
     }
 
     void slot_send_private_command (IMEngineInstanceBase *si, const String &command)
     {
         int ret = engine_loader_send_message(g_variant_new("(s)", command.c_str()), "send_private_command");
-        if (ret != TIZEN_ERROR_NONE)
-            LOGD("Falied to send private command");
+        if (ret != ENGINE_LOADER_ERROR_NONE)
+            LOGE("Failed to send private command");
     }
 
     void attach_instance()
@@ -474,7 +473,7 @@ EngineLoader::~EngineLoader()
     delete m_impl;
 }
 
-bool EngineLoader::set_keyboard_ise_by_uuid(const scim::String &uuid)
+bool EngineLoader::set_keyboard_ise_by_uuid(const scim::String &uuid, const scim::String &module_name)
 {
     ImeInfoDB imeInfo;
     IMEngineFactoryPointer factory;
@@ -482,7 +481,7 @@ bool EngineLoader::set_keyboard_ise_by_uuid(const scim::String &uuid)
     static int instance_count = 1;
 
     if ((!m_impl->si.null ()) && m_impl->si->get_factory_uuid () == uuid) {
-        LOGD("Already in UUID : %s", uuid.c_str());
+        LOGW("Already in UUID : %s", uuid.c_str());
         return false;
     }
 
@@ -492,41 +491,24 @@ bool EngineLoader::set_keyboard_ise_by_uuid(const scim::String &uuid)
     }
 
     if (m_impl->m_config.null ()) {
-        LOGD("config is not working");
+        LOGE("config is not working");
         return false;
     }
 
-    int ret = 0;
-    char *pkgid = NULL;
-    pkgmgrinfo_appinfo_h handle;
-    ret = pkgmgrinfo_appinfo_get_appinfo(uuid.c_str(), &handle);
-    if (ret != PMINFO_R_OK) {
-        LOGD("Retrieve app info failed : %s", uuid.c_str ());
-        return false;
-    }
-
-    ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid);
-    if (ret != PMINFO_R_OK) {
-        LOGD("Retrieve pkgid failed : %s, %p", uuid.c_str(), handle);
-        pkgmgrinfo_appinfo_destroy_appinfo(handle);
-        return false;
-    }
-
-    imeInfo.module_name = pkgid;
-    pkgmgrinfo_appinfo_destroy_appinfo(handle);
+    imeInfo.module_name = module_name;
 
     engine_module = &m_impl->engine_module;
     if (engine_module->valid() && imeInfo.module_name != engine_module->get_module_name()) {
-        LOGD("imengine module %s unloaded", engine_module->get_module_name().c_str());
+        LOGE("imengine module %s unloaded", engine_module->get_module_name().c_str());
         engine_module->unload();
     }
 
     if (!engine_module->valid()) {
         if (engine_module->load (imeInfo.module_name, m_impl->m_config) == false) {
-            LOGD("load module %s failed", imeInfo.module_name.c_str());
+            LOGE("load module %s failed", imeInfo.module_name.c_str());
             return false;
         }
-        LOGD("imengine module %s loaded", imeInfo.module_name.c_str());
+        LOGE("imengine module %s loaded", imeInfo.module_name.c_str());
     }
 
     for (size_t j = 0; j < engine_module->number_of_factories (); ++j) {
@@ -541,18 +523,18 @@ bool EngineLoader::set_keyboard_ise_by_uuid(const scim::String &uuid)
     }
 
     if (factory.null()) {
-        LOGD("imengine uuid %s is not found", uuid.c_str());
+        LOGE("imengine uuid %s is not found", uuid.c_str());
         return false;
     }
 
     m_impl->si = factory->create_instance ("UTF-8", instance_count++);
     if (m_impl->si.null ()) {
-        LOGD("create_instance %s failed", uuid.c_str ());
+        LOGE("create_instance %s failed", uuid.c_str ());
         return false;
     }
 
     m_impl->attach_instance ();
-    LOGD("Require UUID: %s Current UUID: %s", uuid.c_str(), m_impl->si->get_factory_uuid().c_str());
+    LOGE("Require UUID: %s Current UUID: %s", uuid.c_str(), m_impl->si->get_factory_uuid().c_str());
     m_impl->si->set_layout (m_impl->layout);
     if (m_impl->is_focused)
         m_impl->si->focus_in ();
index 39bc355..fdef7e0 100644 (file)
 
 #define Uses_SCIM_IMENGINE_MODULE
 
-#include <tizen.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <cstdint>
+#include <string.h>
 #include <dlog.h>
 
+#include "engine_loader_error.h"
 #include "engine_loader_dbus.h"
 #include "engine_loader.h"
 #include "scim.h"
@@ -81,7 +82,7 @@ static void _client_dbus_method_call_handler(GDBusConnection *conn, const gchar
 
     GVariant *reply_body = NULL;
     g_sender = std::string(sender);
-    int ret = TIZEN_ERROR_UNKNOWN;
+    int ret = ENGINE_LOADER_ERROR_UNKNOWN;
 
     if (g_strcmp0(method_name, "loader_service_register") == 0) {
         ret = engine_loader_server_register(parameters, &reply_body, sender, _on_name_appeared, _on_name_vanished);
@@ -141,7 +142,7 @@ static void _client_dbus_method_call_handler(GDBusConnection *conn, const gchar
         ret = engine_loader_long_press_candidate_item(parameters, &reply_body);
     }
 
-    if (ret == TIZEN_ERROR_NONE)
+    if (ret == ENGINE_LOADER_ERROR_NONE)
         g_dbus_method_invocation_return_value(invocation, reply_body);
     else
         g_dbus_method_invocation_return_error(invocation, G_DBUS_ERROR, ret, "engine loader error");
@@ -168,6 +169,7 @@ static int _register_dbus_interface(void)
 
             "        <method name='set_imengine'>"
             "          <arg type='s' name='engine_id' direction='in'/>"
+            "          <arg type='s' name='module_name' direction='in'/>"
             "          <arg type='b' name='result' direction='out'/>"
             "        </method>"
 
@@ -276,15 +278,15 @@ int engine_loader_dbus_init(void)
 {
     int ret;
     ret = _register_dbus_interface();
-    if (ret != TIZEN_ERROR_NONE)
-        LOGE("Failed to register dbus interface : %s", get_error_message(ret));
+    if (ret != ENGINE_LOADER_ERROR_NONE)
+        LOGE("Failed to register dbus interface : %d", ret);
 
     return ret;
 }
 
 int engine_loader_server_register_dbus_interface(char *introspection_xml, GDBusInterfaceVTable interface_vtable)
 {
-    int ret = TIZEN_ERROR_NONE;
+    int ret = ENGINE_LOADER_ERROR_NONE;
     int own_id, registration_id;
     GError *error = NULL;
     GDBusNodeInfo *introspection_data = NULL;
@@ -296,7 +298,7 @@ int engine_loader_server_register_dbus_interface(char *introspection_xml, GDBusI
                 LOGE("g_bus_get_sync error message = %s", error->message);
                 g_error_free(error);
             }
-            ret = TIZEN_ERROR_UNKNOWN;
+            ret = ENGINE_LOADER_ERROR_UNKNOWN;
             goto cleanup;
         }
     }
@@ -310,14 +312,14 @@ int engine_loader_server_register_dbus_interface(char *introspection_xml, GDBusI
             NULL, NULL);
     if (own_id == 0) {
         LOGE("Failed to register bus name");
-        ret = TIZEN_ERROR_UNKNOWN;
+        ret = ENGINE_LOADER_ERROR_UNKNOWN;
         goto cleanup;
     }
 
     introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, &error);
     if (introspection_data == NULL) {
         LOGE("Failed to get GDBusNodeInfo");
-        ret = TIZEN_ERROR_UNKNOWN;
+        ret = ENGINE_LOADER_ERROR_UNKNOWN;
         if (error != NULL) {
             LOGE("g_dbus_node_info_new_for_xml error message = %s", error->message);
             g_error_free(error);
@@ -331,12 +333,12 @@ int engine_loader_server_register_dbus_interface(char *introspection_xml, GDBusI
         if (error != NULL) {
             LOGE("Failed to register object. error message = %s", error->message);
             g_error_free(error);
-            ret = TIZEN_ERROR_UNKNOWN;
+            ret = ENGINE_LOADER_ERROR_UNKNOWN;
         }
         goto cleanup;
     }
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 
 cleanup:
     if (introspection_data)
@@ -348,19 +350,19 @@ cleanup:
 int engine_loader_server_register(GVariant *parameters, GVariant **reply_body, const gchar *sender,
                                   GBusNameAppearedCallback appeared_handler, GBusNameVanishedCallback vanished_handler)
 {
-    int ret = TIZEN_ERROR_NONE;
+    int ret = ENGINE_LOADER_ERROR_NONE;
     monitoring_info_s *m_info = NULL;
 
     if (reply_body == NULL)
-        return TIZEN_ERROR_INVALID_PARAMETER;
+        return ENGINE_LOADER_ERROR_INVALID_PARAMETER;
 
     if (sender == NULL)
-        return TIZEN_ERROR_INVALID_PARAMETER;
+        return ENGINE_LOADER_ERROR_INVALID_PARAMETER;
 
     m_info = (monitoring_info_s *)calloc(1, sizeof(monitoring_info_s));
     if (m_info == NULL) {
         LOGE("Failed to alloc memory");
-        ret = TIZEN_ERROR_OUT_OF_MEMORY;
+        ret = ENGINE_LOADER_ERROR_OUT_OF_MEMORY;
         goto cleanup;
     }
 
@@ -376,18 +378,18 @@ int engine_loader_server_register(GVariant *parameters, GVariant **reply_body, c
 
     if (m_info->watcher_id == 0) {
         LOGE("Failed to get identifier");
-        ret = TIZEN_ERROR_UNKNOWN;
+        ret = ENGINE_LOADER_ERROR_UNKNOWN;
         goto cleanup;
     }
 
     *reply_body = g_variant_new("(i)", m_info->watcher_id);
     if (*reply_body == NULL) {
         LOGE("Failed to make reply");
-        ret = TIZEN_ERROR_OUT_OF_MEMORY;
+        ret = ENGINE_LOADER_ERROR_OUT_OF_MEMORY;
         goto cleanup;
     }
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 
 cleanup:
     if (m_info) {
@@ -403,7 +405,7 @@ int engine_loader_server_unregister(GVariant *parameters, GVariant **reply_body,
     int watcher_id = 0;
     g_variant_get(parameters, "(i)", &watcher_id);
     g_bus_unwatch_name(watcher_id);
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_send_message(GVariant *body, const char *cmd)
@@ -426,43 +428,44 @@ int engine_loader_send_message(GVariant *body, const char *cmd)
             g_error_free(err);
         }
 
-        return TIZEN_ERROR_IO_ERROR;
+        return ENGINE_LOADER_ERROR_IO_ERROR;
     }
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_imengine(GVariant *parameters, GVariant **reply_body)
 {
     bool result = false;
     char *engine_id = NULL;
+    char *module_name = NULL;
 
-    g_variant_get(parameters, "(&s)", &engine_id);
+    g_variant_get(parameters, "(&ss)", &engine_id, &module_name);
 
     if (engine_id)
-        result = m_engine_loader.set_keyboard_ise_by_uuid(scim::String(engine_id));
+        result = m_engine_loader.set_keyboard_ise_by_uuid(scim::String(engine_id), scim::String(module_name));
 
     *reply_body = g_variant_new("(b)", result);
     if (*reply_body == NULL) {
         LOGE("Failed to create reply_body");
-        return TIZEN_ERROR_OUT_OF_MEMORY;
+        return ENGINE_LOADER_ERROR_OUT_OF_MEMORY;
     }
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_flush_imengine(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.flush_imengine();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_reset_imengine(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.reset_imengine();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_send_imengine_event(GVariant *parameters, GVariant **reply_body)
@@ -473,7 +476,7 @@ int engine_loader_send_imengine_event(GVariant *parameters, GVariant **reply_bod
     g_variant_get(parameters, "(iu)", &command, &value);
     m_engine_loader.send_imengine_event(command, value);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_process_key_event(GVariant *parameters, GVariant **reply_body)
@@ -524,24 +527,24 @@ int engine_loader_process_key_event(GVariant *parameters, GVariant **reply_body)
     *reply_body = g_variant_new("(b)", result);
     if (*reply_body == NULL) {
         LOGE("Failed to create reply_body");
-        return TIZEN_ERROR_OUT_OF_MEMORY;
+        return ENGINE_LOADER_ERROR_OUT_OF_MEMORY;
     }
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_focus_in(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.focus_in();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_focus_out(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.focus_out();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_update_cursor_position(GVariant *parameters, GVariant **reply_body)
@@ -552,7 +555,7 @@ int engine_loader_update_cursor_position(GVariant *parameters, GVariant **reply_
     if (cursor_pos >= 0)
         m_engine_loader.update_cursor_position(cursor_pos);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_autocapital_type(GVariant *parameters, GVariant **reply_body)
@@ -562,7 +565,7 @@ int engine_loader_set_autocapital_type(GVariant *parameters, GVariant **reply_bo
     g_variant_get(parameters, "(u)", &type);
     m_engine_loader.set_autocapital_type(type);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_prediction_allow(GVariant *parameters, GVariant **reply_body)
@@ -572,14 +575,14 @@ int engine_loader_set_prediction_allow(GVariant *parameters, GVariant **reply_bo
     g_variant_get(parameters, "(u)", &prediction_allow);
     m_engine_loader.set_prediction_allow(prediction_allow);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_reset_input_context(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.reset_input_context();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_layout(GVariant *parameters, GVariant **reply_body)
@@ -589,7 +592,7 @@ int engine_loader_set_layout(GVariant *parameters, GVariant **reply_body)
     g_variant_get(parameters, "(u)", &layout);
     m_engine_loader.set_layout(layout);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_imdata(GVariant *parameters, GVariant **reply_body)
@@ -600,7 +603,7 @@ int engine_loader_set_imdata(GVariant *parameters, GVariant **reply_body)
     g_variant_get(parameters, "(&su)", &imdata, &len);
     m_engine_loader.set_imdata(imdata, len);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_input_hint(GVariant *parameters, GVariant **reply_body)
@@ -610,7 +613,7 @@ int engine_loader_set_input_hint(GVariant *parameters, GVariant **reply_body)
     g_variant_get(parameters, "(u)", &hint);
     m_engine_loader.set_input_hint(hint);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_update_bidi_direction(GVariant *parameters, GVariant **reply_body)
@@ -620,7 +623,7 @@ int engine_loader_update_bidi_direction(GVariant *parameters, GVariant **reply_b
     g_variant_get(parameters, "(u)", &direction);
     m_engine_loader.update_bidi_direction(direction);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_trigger_property(GVariant *parameters, GVariant **reply_body)
@@ -630,21 +633,21 @@ int engine_loader_set_trigger_property(GVariant *parameters, GVariant **reply_bo
     g_variant_get(parameters, "(&s)", &property);
     m_engine_loader.set_trigger_property(property);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_show_candidate_more_window(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.show_candidate_more_window();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_hide_candidate_more_window(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.hide_candidate_more_window();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_select_aux(GVariant *parameters, GVariant **reply_body)
@@ -654,7 +657,7 @@ int engine_loader_select_aux(GVariant *parameters, GVariant **reply_body)
     g_variant_get(parameters, "(u)", &item);
     m_engine_loader.select_aux(item);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_select_candidate(GVariant *parameters, GVariant **reply_body)
@@ -664,21 +667,21 @@ int engine_loader_select_candidate(GVariant *parameters, GVariant **reply_body)
     g_variant_get(parameters, "(u)", &item);
     m_engine_loader.select_candidate(item);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_candidate_table_page_up(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.candidate_table_page_up();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_candidate_table_page_down(GVariant *parameters, GVariant **reply_body)
 {
     m_engine_loader.candidate_table_page_down();
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_change_candidate_page_size(GVariant *parameters, GVariant **reply_body)
@@ -688,7 +691,7 @@ int engine_loader_change_candidate_page_size(GVariant *parameters, GVariant **re
     g_variant_get(parameters, "(u)", &size);
     m_engine_loader.change_candidate_page_size(size);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_set_candidate_item_layout(GVariant *parameters, GVariant **reply_body)
@@ -701,7 +704,7 @@ int engine_loader_set_candidate_item_layout(GVariant *parameters, GVariant **rep
 
     g_variant_get(parameters, "(a(v))", &item_iter);
     if (!item_iter) {
-        LOGD("Failed to get iter");
+        LOGE("Failed to get iter");
         result = false;
     }
 
@@ -715,13 +718,13 @@ int engine_loader_set_candidate_item_layout(GVariant *parameters, GVariant **rep
     *reply_body = g_variant_new("(b)", result);
     if (*reply_body == NULL) {
         LOGE("Failed to create reply_body");
-        return TIZEN_ERROR_OUT_OF_MEMORY;
+        return ENGINE_LOADER_ERROR_OUT_OF_MEMORY;
     }
 
     if (value)
         g_variant_unref(value);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_change_candidate_number(GVariant *parameters, GVariant **reply_body)
@@ -731,7 +734,7 @@ int engine_loader_change_candidate_number(GVariant *parameters, GVariant **reply
     g_variant_get(parameters, "(u)", &page_num);
     m_engine_loader.change_candidate_number(page_num);
 
-    return TIZEN_ERROR_NONE;
+    return ENGINE_LOADER_ERROR_NONE;
 }
 
 int engine_loader_long_press_candidate_item(GVariant *parameters, GVariant **reply_body)
@@ -741,5 +744,5 @@ int engine_loader_long_press_candidate_item(GVariant *parameters, GVariant **rep
     g_variant_get(parameters, "(u)", &index);
     m_engine_loader.long_press_candidate_item(index);
 
-    return TIZEN_ERROR_NONE;
-}
\ No newline at end of file
+    return ENGINE_LOADER_ERROR_NONE;
+}
index 8fef269..9faf10e 100644 (file)
@@ -22,7 +22,6 @@
  *
  */
 
-#include <tizen.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <glib.h>
 #include <sys/signalfd.h>
 #include <signal.h>
+#include <string.h>
+#include <errno.h>
 
+#include "engine_loader_error.h"
 #include "engine_loader_dbus.h"
 
 #ifdef LOG_TAG
@@ -121,7 +123,7 @@ int main(int argc, char** argv)
     }
 
     ret = engine_loader_dbus_init();
-    if (ret != TIZEN_ERROR_NONE)
+    if (ret != ENGINE_LOADER_ERROR_NONE)
         LOGW("Failed to init dbus");
 
     register_signal_handler();
index 52f664c..2287b3f 100644 (file)
@@ -55,6 +55,7 @@ isf_panel_efl_CXXFLAGS = @ECOREX_CFLAGS@ \
                          @XKBCOMMON_CFLAGS@ \
                          @APP_CONTROL_CFLAGS@ \
                          @PKGMGR_INFO_CFLAGS@ \
+                         @PACKAGE_MANAGER_CFLAGS@ \
                          @AUL_CFLAGS@ \
                          -fPIE
 
@@ -76,6 +77,7 @@ isf_panel_efl_LDFLAGS  = @LTLIBINTL@ -rpath $(libdir) \
                          @XKBCOMMON_LIBS@ \
                          @APP_CONTROL_LIBS@ \
                          @PKGMGR_INFO_LIBS@ \
+                         @PACKAGE_MANAGER_LIBS@ \
                          @AUL_LIBS@ \
                          -pie
 
index 1ce3a71..940ac1b 100644 (file)
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <malloc.h>
+
 #include <Eina.h>
 #include <Ecore.h>
 #include <Ecore_File.h>
-#include <malloc.h>
+#include <tzplatform_config.h>
+
 #include "scim_private.h"
 #include "scim.h"
 #include "scim_stl_map.h"
index 549650e..6acf40d 100644 (file)
@@ -117,8 +117,8 @@ libprofile_la_CXXFLAGS      = @SYSTEM_INFO_CFLAGS@
 libprofile_la_LIBADD   = @SYSTEM_INFO_LIBS@
 
 libisf_pkg_la_SOURCES  = isf_pkg.cpp
-libisf_pkg_la_CXXFLAGS = @DLOG_CFLAGS@ @PKGMGR_INFO_CFLAGS@ @PACKAGE_MANAGER_CFLAGS@ @TZPLATFORM_CONFIG_CFLAGS@
-libisf_pkg_la_LIBADD   = @DLOG_LIBS@ @PKGMGR_INFO_LIBS@  @PACKAGE_MANAGER_LIBS@ @TZPLATFORM_CONFIG_LIBS@
+libisf_pkg_la_CXXFLAGS = @DLOG_CFLAGS@ @PKGMGR_INFO_CFLAGS@ @TZPLATFORM_CONFIG_CFLAGS@
+libisf_pkg_la_LIBADD   = @DLOG_LIBS@ @PKGMGR_INFO_LIBS@ @TZPLATFORM_CONFIG_LIBS@
 
 if SCIM_LD_VERSION_SCRIPT
 LD_VERSION_SCRIPT_OPTION="-Wl,--version-script=$(srcdir)/libscim.version-script"
@@ -175,7 +175,7 @@ libscim@SCIM_EPOCH@_la_CXXFLAGS = @EVAS_CFLAGS@ \
                          @ECORE_IMF_CFLAGS@ \
                          @ECORE_INPUT_CFLAGS@ \
                          @DLOG_CFLAGS@ \
-                         @DB_UTIL_CFLAGS@ \
+                         @SQLITE3_CFLAGS@ \
                          @TZPLATFORM_CONFIG_CFLAGS@ \
                          @PKGMGR_INFO_CFLAGS@ \
                          @VCONF_CFLAGS@ \
@@ -192,7 +192,7 @@ libscim@SCIM_EPOCH@_la_LDFLAGS  = -version-info $(SCIM_CURRENT):$(SCIM_REVISION)
                          @ECORE_INPUT_LIBS@ \
                          @EINA_LIBS@ \
                          @DLOG_LIBS@ \
-                         @DB_UTIL_LIBS@ \
+                         @SQLITE3_LIBS@ \
                          @TZPLATFORM_CONFIG_LIBS@ \
                          @PKGMGR_INFO_LIBS@ \
                          @VCONF_LIBS@ \
@@ -250,7 +250,6 @@ lib@ISF_CONTROL@_la_SOURCES = \
 
 lib@ISF_CONTROL@_la_CXXFLAGS = @EINA_CFLAGS@ \
                           @DLOG_CFLAGS@ \
-                          @TZPLATFORM_CONFIG_CFLAGS@ \
                           @VCONF_CFLAGS@
 
 lib@ISF_CONTROL@_la_LDFLAGS  = -version-info $(SCIM_CURRENT):$(SCIM_REVISION):$(SCIM_AGE) \
@@ -258,7 +257,6 @@ lib@ISF_CONTROL@_la_LDFLAGS  = -version-info $(SCIM_CURRENT):$(SCIM_REVISION):$(
                           -rpath $(libdir) \
                           @EINA_LIBS@ \
                           @DLOG_LIBS@ \
-                          @TZPLATFORM_CONFIG_LIBS@ \
                           @VCONF_LIBS@ \
                           -lstdc++
 
index aa27c53..7720b1e 100644 (file)
@@ -43,9 +43,7 @@
 #include "scim.h"
 #include "isf_query_utility.h"
 #include "scim_helper.h"
-#include <db-util.h>
-#include "isf_debug.h"
-
+#include <sqlite3.h>
 
 using namespace scim;
 
@@ -74,7 +72,8 @@ using namespace scim;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // DATABASE
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-#define DB_PATH tzplatform_mkpath(TZ_USER_DB, ".ime_info.db")
+#define USER_DB "/opt/usr/home/owner/.applications/dbspace/"
+#define DB_PATH USER_DB".ime_info.db"
 static struct {
     const char* pPath;
     sqlite3* pHandle;
@@ -225,6 +224,16 @@ static inline int _db_create_table(void)
     return ret;
 }
 
+static int _db_open(const char *pszFilePath, sqlite3 **ppDB)
+{
+    int rc = sqlite3_open(pszFilePath, ppDB);
+    if (SQLITE_OK != rc) {
+        return rc;
+    }
+
+    return rc;
+}
+
 static inline int _db_init(void)
 {
     if (!isf_db_check_path_available()) {
@@ -233,11 +242,11 @@ static inline int _db_init(void)
     }
 
     struct stat stat;
-    int ret = db_util_open(databaseInfo.pPath, &databaseInfo.pHandle, DB_UTIL_REGISTER_HOOK_METHOD);
+    int ret = _db_open(databaseInfo.pPath, &databaseInfo.pHandle);
     if (ret != SQLITE_OK) {
         LOGE ("db_util_open(\"%s\", ~) returned %d: %s", databaseInfo.pPath, ret, sqlite3_errmsg(databaseInfo.pHandle));
         if (databaseInfo.pHandle)
-            db_util_close(databaseInfo.pHandle);
+            sqlite3_close(databaseInfo.pHandle);
         databaseInfo.pHandle = NULL;
         databaseInfo.need_reset = true;
         return -EIO;
@@ -247,7 +256,7 @@ static inline int _db_init(void)
         char buf_err[256];
         LOGE("lstat failed. %s", strerror_r (errno, buf_err, sizeof (buf_err)));
         if (databaseInfo.pHandle)
-            db_util_close(databaseInfo.pHandle);
+            sqlite3_close(databaseInfo.pHandle);
         databaseInfo.pHandle = NULL;
         databaseInfo.need_reset = true;
         return -ENOENT;
@@ -256,7 +265,7 @@ static inline int _db_init(void)
     if (!S_ISREG(stat.st_mode)) {
         LOGE ("S_ISREG failed.");
         if (databaseInfo.pHandle)
-            db_util_close(databaseInfo.pHandle);
+            sqlite3_close(databaseInfo.pHandle);
         databaseInfo.pHandle = NULL;
         databaseInfo.need_reset = true;
         return -EINVAL;
@@ -266,7 +275,7 @@ static inline int _db_init(void)
     if (_db_create_table() != 0) {
         LOGE ("CREATE TABLE IF NOT EXISTS ime_info ~ failed.");
         if (databaseInfo.pHandle)
-            db_util_close(databaseInfo.pHandle);
+            sqlite3_close(databaseInfo.pHandle);
         databaseInfo.pHandle = NULL;
         databaseInfo.need_reset = true;
         return -EIO;
@@ -328,7 +337,7 @@ static inline int _db_disconnect(void)
     if (!databaseInfo.pHandle)
         return 0;
 
-    db_util_close(databaseInfo.pHandle);
+    sqlite3_close(databaseInfo.pHandle);
 
     databaseInfo.pHandle = NULL;
 
@@ -1808,7 +1817,7 @@ EXAPI int isf_db_rollback_transaction(void)
  */
 EXAPI int isf_db_check_path_available(void)
 {
-    const char *user_db_path = tzplatform_getenv(TZ_USER_DB);
+    const char *user_db_path = USER_DB;
     char buf_err[256];
     if (access(user_db_path, F_OK) != 0) {
         LOGW("access failed : %s, errno(%d) - %s", user_db_path, errno, strerror_r(errno, buf_err, sizeof(buf_err)));
index 0fd94ee..f2dbc47 100644 (file)
@@ -25,9 +25,6 @@
 #ifndef __ISF_QUERY_UTILITY_H__
 #define __ISF_QUERY_UTILITY_H__
 
-/* For multi-user support */
-#include <tzplatform_config.h>
-
 using namespace scim;
 
 
index f08a424..3a74bcf 100644 (file)
@@ -310,7 +310,7 @@ Module::load (const String &name, const String &type)
 bool
 Module::unload ()
 {
-    if (!m_impl->handle)
+    if (!m_impl || !m_impl->handle)
         return true;
 
     if (is_resident ())
@@ -340,7 +340,7 @@ Module::unload ()
 bool
 Module::make_resident () const
 {
-    if (m_impl->handle) {
+    if (m_impl && m_impl->handle) {
         return lt_dlmakeresident (m_impl->handle) == 0;
     }
     return false;
@@ -349,7 +349,7 @@ Module::make_resident () const
 bool
 Module::is_resident () const
 {
-    if (m_impl->handle) {
+    if (m_impl && m_impl->handle) {
         return lt_dlisresident (m_impl->handle) == 1;
     }
     return false;
@@ -358,7 +358,7 @@ Module::is_resident () const
 bool
 Module::valid () const
 {
-    return (m_impl->handle && m_impl->init);
+    return (m_impl && m_impl->handle && m_impl->init);
 }
 
 String
index e440097..5a8b9c5 100644 (file)
@@ -38,7 +38,7 @@ BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires:  pkgconfig(efl-extension)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(pkgmgr-info)
-BuildRequires:  pkgconfig(db-util)
+BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(capi-appfw-app-control)
 BuildRequires:  pkgconfig(capi-appfw-application)
@@ -49,7 +49,6 @@ BuildRequires:  pkgconfig(capi-appfw-package-manager)
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(libsystemd)
 BuildRequires:  pkgconfig(notification)
-BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(gio-2.0)
 Requires(postun): /sbin/ldconfig
 Requires:      org.tizen.isf-kbd-mode-changer