Merge remote-tracking branch 'rsa/tizen_2.2' into tizen accepted/tizen/20131014.132013 accepted/tizen/20131014.170403 accepted/tizen/20131014.182805 submit/tizen/20131014.114835 submit/tizen/20131014.115253
authorHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 10:49:09 +0000 (19:49 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 10:49:15 +0000 (19:49 +0900)
Conflicts:
packaging/wrt-commons.spec

42 files changed:
CMakeLists.txt
build/auto_save_dao/wrt-commons-auto-save-dao-ro.pc.in
build/auto_save_dao/wrt-commons-auto-save-dao-rw.pc.in
build/auto_save_dao/wrt-commons-auto-save-dao.pc.in
build/certificate_dao/wrt-commons-certificate-dao.pc.in
build/core/CMakeLists.txt
build/core/dpl-efl.pc.in
build/custom_handler_dao/wrt-commons-custom-handler-dao-ro.pc.in
build/custom_handler_dao/wrt-commons-custom-handler-dao-rw.pc.in
build/db/CMakeLists.txt
build/db/dpl-db-efl.pc.in
build/dbus/CMakeLists.txt
build/dbus/dpl-dbus-efl.pc.in
build/event/CMakeLists.txt
build/event/dpl-event-efl.pc.in
build/log/CMakeLists.txt
build/log/dpl-log-efl.pc.in
build/rpc/CMakeLists.txt
build/rpc/dpl-rpc-efl.pc.in
build/security_origin_dao/wrt-commons-security-origin-dao.pc.in
build/socket/CMakeLists.txt
build/socket/dpl-socket-efl.pc.in
build/support/wrt-plugins-types.pc.in
build/test/CMakeLists.txt
build/test/dpl-test-efl.pc.in
build/utils/CMakeLists.txt
build/utils/dpl-utils-efl.pc.in
build/widget_dao/dpl-wrt-dao-ro.pc.in
build/widget_dao/dpl-wrt-dao-rw.pc.in
etc/wrt_commons_create_clean_db.sh
modules/certificate_dao/CMakeLists.txt
modules/core/include/dpl/serialization.h
modules/custom_handler_dao/CMakeLists.txt
modules/db/include/dpl/db/thread_database_support.h
modules/security_origin_dao/CMakeLists.txt
modules/widget_dao/CMakeLists.txt
modules/widget_dao/dao/widget_dao_read_only.cpp
modules/widget_dao/include/dpl/wrt-dao-ro/global_config.h
packaging/wrt-commons.changes [new file with mode: 0644]
packaging/wrt-commons.manifest [new file with mode: 0644]
packaging/wrt-commons.spec
wrt-commons.manifest [deleted file]

index 6b92bd0..934f7dd 100644 (file)
@@ -30,7 +30,7 @@ ADD_DEFINITIONS("-DAPI_VERSION=\"$(API_VERSION)\"")
 
 # Comment this to disable control of global settings with environment variable
 ADD_DEFINITIONS("-DGLOBAL_SETTINGS_CONTROL")
-
+ADD_DEFINITIONS("-DLIBDIR_PREFIX=\"${LIB_INSTALL_DIR}\"")
 # Build type
 IF(NOT CMAKE_BUILD_TYPE)
     SET(CMAKE_BUILD_TYPE "Release")
@@ -196,7 +196,7 @@ SET(TARGET_WIDGET_INTERFACE_DAO_LIB "wrt-commons-widget-interface-dao")
 
 macro(configure_and_install_pkg PKG_FILE)
     CONFIGURE_FILE(${PKG_FILE}.in ${PKG_FILE} @ONLY)
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKG_FILE} DESTINATION lib/pkgconfig)
+    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKG_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 endmacro(configure_and_install_pkg)
 
 ADD_SUBDIRECTORY(modules)
index 2784bef..6600968 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-auto-save-dao-ro
 Description: wrt-commons-auto-save-dao-ro
index bb4bd70..77589bd 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-auto-save-dao-rw
 Description: wrt-commons-auto-save-dao-rw
index 11e3ca9..09e0ab4 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-auto-save-dao
 Description: wrt-commons-auto-save-dao
index 903dc95..56e3aa5 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-certificate-dao
 Description: wrt-commons-certificate-dao
index d0e5699..cbe778f 100644 (file)
@@ -62,7 +62,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_CORE_EFL_DETAIL_HEADERS}
index 6d2a882..d42414a 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-efl
index 7cda187..2fdf647 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-custom-handler-dao-ro
 Description: wrt-commons-custom-handler-dao-ro
@@ -9,4 +9,4 @@ Description: wrt-commons-custom-handler-dao-ro
 Version: @VERSION@
 Requires: dpl-efl
 Libs: -lwrt-commons-custom-handler-dao-ro -L${libdir}
-Cflags: -I${includedir}/dpl-efl
+Cflags: -I${includedir}/dpl-efl -DLIBDIR_PREFIX=\"${libdir}\"
index 4cd2737..91975e2 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-custom-handler-dao-rw
 Description: wrt-commons-custom-handler-dao-rw
index 29dd495..d4e60fc 100644 (file)
@@ -60,7 +60,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_DB_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_DB_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_DB_HEADERS}
index 866bb0f..d68ec91 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-db-efl
index 59b2db1..b837a8c 100644 (file)
@@ -62,7 +62,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_DBUS_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_DBUS_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_DBUS_HEADERS}
index 73f2c03..52742dc 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-dbus-efl
index b023e0a..0c00e91 100644 (file)
@@ -62,7 +62,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_EVENT_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_EVENT_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_EVENT_HEADERS}
index d4befbe..fe6eae5 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-event-efl
index 47379d5..1e4b9ee 100644 (file)
@@ -56,7 +56,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_LOG_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_LOG_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(FILES ${DPL_LOG_HEADERS}
         DESTINATION include/dpl-efl/dpl/log)
index 7f18689..ef14ab9 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-log-efl
index 9c52217..0aad4dd 100644 (file)
@@ -65,7 +65,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_RPC_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_RPC_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_RPC_HEADERS}
index d857bbe..d1e90f2 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-rpc-efl
index 2ab81cb..a618ee4 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: wrt-commons-security-origin-dao
 Description: wrt-commons-security-origin-dao
index 3ef033f..3fa8ce0 100644 (file)
@@ -62,7 +62,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_SOCKET_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_SOCKET_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_SOCKET_HEADERS}
index 1e1409a..5633edb 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-socket-efl
index b35b9b4..0c19577 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: wrt-plugins-types
index d992952..0561cfa 100644 (file)
@@ -60,7 +60,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_TEST_ENGINE_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_TEST_ENGINE_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_TEST_ENGINE_HEADERS}
index 056ae09..a3dee7a 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-test-efl
index ccc52ae..64f6703 100644 (file)
@@ -71,7 +71,7 @@ SET_TARGET_PROPERTIES(${TARGET_DPL_UTILS_EFL} PROPERTIES
 
 # Install libraries
 INSTALL(TARGETS ${TARGET_DPL_UTILS_EFL}
-        DESTINATION lib)
+        DESTINATION ${LIB_INSTALL_DIR})
 
 # Install detail headers
 INSTALL(FILES ${DPL_UTILS_HEADERS}
index 8e1d4c9..17d31ef 100644 (file)
@@ -1,6 +1,6 @@
 prefix=/usr
 exec_prefix=${prefix}
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 
 Name: dpl-utils-efl
index d2d112b..c2bf17a 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: dpl-wrt-dao-ro
 Description: dpl-wrt-dao-ro
index c71e58d..0618fea 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=${prefix}
 
-libdir=${prefix}/lib
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include
 Name: dpl-wrt-dao-rw
 Description: dpl-wrt-dao-rw
index 893631c..37c9a6d 100755 (executable)
@@ -22,22 +22,11 @@ function create_db {
     dbpath=$2
     # extract smack label before removal
     DB_LABEL=""
-    if [ -f $dbpath.$name.db ]
-    then
-        DB_LABEL=`chsmack $dbpath.$name.db | sed -r "s/.*access=\"([^\"]+)\"/\1/"`
-    fi
     rm -f $dbpath.$name.db
-
     # extract smack label before removal
     JOURNAL_LABEL=""
-    if [ -f $dbpath.$name.db-journal ]
-    then
-        JOURNAL_LABEL=`chsmack $dbpath.$name.db-journal | sed -r "s/.*access=\"([^\"]+)\"/\1/"`
-    fi
     rm -f $dbpath.$name.db-journal
 
-    SQL="PRAGMA journal_mode = PERSIST;"
-    sqlite3 $dbpath.$name.db "$SQL"
     SQL=".read /usr/share/wrt-engine/"$name"_db.sql"
     sqlite3 $dbpath.$name.db "$SQL"
     touch $dbpath.$name.db-journal
@@ -49,16 +38,7 @@ function create_db {
     pkill -9 security-serv
 
     # restore smack label
-    if [ -n "$DB_LABEL" ]
-    then
-        chsmack -a $DB_LABEL $dbpath.$name.db
-    fi
-
     # restore smack label
-    if [ -n "$JOURNAL_LABEL" ]
-    then
-        chsmack -a $JOURNAL_LABEL $dbpath.$name.db-journal
-    fi
 }
 
 for name in wrt
index f55ee45..067603e 100755 (executable)
@@ -46,7 +46,7 @@ SET_TARGET_PROPERTIES(${TARGET_CERTIFICATE_DAO_LIB} PROPERTIES SOVERSION ${API_V
 TARGET_LINK_LIBRARIES(${TARGET_CERTIFICATE_DAO_LIB} ${TARGET_DPL_EFL} ${TARGET_DPL_DB_EFL} ${TARGET_WRT_DAP_RO_LIB} ${CERTIFICATE_DAO_DEPS_LIBRARIES})
 ADD_DEPENDENCIES(${TARGET_CERTIFICATE_DAO_LIB} ${TARGET_CERTIFICATE_DAO_DB})
 
-INSTALL(TARGETS ${TARGET_CERTIFICATE_DAO_LIB} DESTINATION lib)
+INSTALL(TARGETS ${TARGET_CERTIFICATE_DAO_LIB} DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(FILES
     include/wrt-commons/certificate-dao/certificate_dao_types.h
index d72c488..f100547 100644 (file)
@@ -70,6 +70,16 @@ struct Serialization {
     {
         stream.Write(sizeof(*value), value);
     }
+     
+    // long int
+    static void Serialize(IStream& stream, const long unsigned int value)
+    {
+        stream.Write(sizeof(value), &value);
+    }
+    static void Serialize(IStream& stream, const long unsigned int* const value)
+    {
+        stream.Write(sizeof(*value), value);
+    }
 
     // int
     static void Serialize(IStream& stream, const int value)
@@ -203,6 +213,17 @@ struct Deserialization {
         stream.Read(sizeof(*value), value);
     }
 
+   // long int
+     static void Deserialize(IStream& stream, long unsigned  int& value)
+    {
+        stream.Read(sizeof(value), &value);
+    }
+    static void Deserialize(IStream& stream, long unsigned  int*& value)
+    {
+        value = new  long unsigned int;
+        stream.Read(sizeof(*value), value);
+    }
+
     // int
     static void Deserialize(IStream& stream, int& value)
     {
index 1afddd5..7954bb7 100644 (file)
@@ -67,8 +67,8 @@ SET_TARGET_PROPERTIES(${TARGET_CUSTOM_HANDLER_DAO_RW_LIB} PROPERTIES COMPILE_FLA
 TARGET_LINK_LIBRARIES(${TARGET_CUSTOM_HANDLER_DAO_RW_LIB} ${TARGET_CUSTOM_HANDLER_DAO_RO_LIB})
 ADD_DEPENDENCIES(${TARGET_CUSTOM_HANDLER_DAO_RW_LIB} ${TARGET_CUSTOM_HANDLER_DAO_DB})
 
-INSTALL(TARGETS ${TARGET_CUSTOM_HANDLER_DAO_RO_LIB} DESTINATION lib)
-INSTALL(TARGETS ${TARGET_CUSTOM_HANDLER_DAO_RW_LIB} DESTINATION lib)
+INSTALL(TARGETS ${TARGET_CUSTOM_HANDLER_DAO_RO_LIB} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(TARGETS ${TARGET_CUSTOM_HANDLER_DAO_RW_LIB} DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(FILES
     include/wrt-commons/custom-handler-dao-ro/common_dao_types.h
index 02d796f..5d997fd 100644 (file)
@@ -253,7 +253,7 @@ class ThreadDatabaseSupport :
             LogPedantic("Transaction is initialized");
 
             TransactionCancel() = false;
-            (*Connection())->ExecCommand("BEGIN;");
+            (*Connection())->ExecCommand("BEGIN IMMEDIATE;");
         }
     }
 
index f307a2b..dce86f5 100644 (file)
@@ -45,7 +45,7 @@ SET_TARGET_PROPERTIES(${TARGET_SECURITY_ORIGIN_DAO_LIB} PROPERTIES SOVERSION ${A
 TARGET_LINK_LIBRARIES(${TARGET_SECURITY_ORIGIN_DAO_LIB} ${TARGET_DPL_EFL} ${TARGET_DPL_DB_EFL} ${TARGET_WRT_DAO_RO_LIB} ${SECURITY_ORIGIN_DAO_DEPS_LIBRARIES})
 ADD_DEPENDENCIES(${TARGET_SECURITY_ORIGIN_DAO_LIB} ${TARGET_SECURITY_ORIGIN_DAO_DB})
 
-INSTALL(TARGETS ${TARGET_SECURITY_ORIGIN_DAO_LIB} DESTINATION lib)
+INSTALL(TARGETS ${TARGET_SECURITY_ORIGIN_DAO_LIB} DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(FILES
     include/wrt-commons/security-origin-dao/security_origin_dao_types.h
index 141a29f..1445e7f 100755 (executable)
@@ -109,10 +109,10 @@ target_link_libraries(${TARGET_WRT_DAO_RW_LIB}
 ADD_DEPENDENCIES(${TARGET_WRT_DAO_RW_LIB} ${TARGET_WRT_DAO_DB})
 
 INSTALL(TARGETS ${TARGET_WRT_DAO_RO_LIB}
-    DESTINATION lib)
+    DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(TARGETS ${TARGET_WRT_DAO_RW_LIB}
-    DESTINATION lib)
+    DESTINATION ${LIB_INSTALL_DIR})
 
 INSTALL(FILES
     include/dpl/wrt-dao-ro/config_parser_data.h
index 343c29a..04cc568 100644 (file)
@@ -55,10 +55,9 @@ namespace WrtDB {
                    message);                                    \
     }
 
-#define CHECK_WIDGET_EXISTENCE(macro_transaction, macro_handle)          \
+#define CHECK_WIDGET_EXISTENCE(macro_handle)          \
     if (!WidgetDAOReadOnly::isWidgetInstalled(macro_handle))             \
     {                                                                    \
-        macro_transaction.Commit();                                      \
         LogWarning("Cannot find widget. Handle: " << macro_handle);      \
         ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist,           \
                  "Cannot find widget. Handle: " << macro_handle);        \
@@ -341,8 +340,7 @@ const
     LogDebug("Getting Localized Info. Handle: " << m_widgetHandle);
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
     {
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
+        CHECK_WIDGET_EXISTENCE(m_widgetHandle)
 
         WRT_DB_SELECT(select, LocalizedWidgetInfo, &WrtDatabase::interface())
         select->Where(
@@ -357,7 +355,6 @@ const
         result.license = info.Get_widget_license();
         result.licenseHref = info.Get_widget_license_href();
 
-        transaction.Commit();
         return result;
     }
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get localized info")
@@ -368,8 +365,7 @@ DbWidgetFeatureSet WidgetDAOReadOnly::getFeaturesList() const
     LogDebug("Getting FeaturesList. Handle: " << m_widgetHandle);
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
     {
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
+        CHECK_WIDGET_EXISTENCE(m_widgetHandle)
 
         WRT_DB_SELECT(select, WidgetFeature, &WrtDatabase::interface())
         select->Where(Equals<WidgetFeature::app_id>(m_widgetHandle));
@@ -386,7 +382,6 @@ DbWidgetFeatureSet WidgetDAOReadOnly::getFeaturesList() const
             feature.pluginId = featureDao.GetPluginHandle();
             resultSet.insert(feature);
         }
-        transaction.Commit();
         return resultSet;
     }
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get features list")
@@ -399,8 +394,7 @@ bool WidgetDAOReadOnly::hasFeature(const std::string& featureName) const
         m_widgetHandle);
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
     {
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
+        CHECK_WIDGET_EXISTENCE(m_widgetHandle)
 
         WRT_DB_SELECT(select, wrt::WidgetFeature, &WrtDatabase::interface())
         select->Where(And(Equals<wrt::WidgetFeature::app_id>(m_widgetHandle),
@@ -408,7 +402,6 @@ bool WidgetDAOReadOnly::hasFeature(const std::string& featureName) const
                               DPL::FromUTF8String(featureName))));
 
         wrt::WidgetFeature::Select::RowList rows = select->GetRowList();
-        transaction.Commit();
         return !rows.empty();
     }
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to check for feature")
@@ -419,8 +412,7 @@ HostList WidgetDAOReadOnly::getAccessHostList() const
     LogDebug("Getting AccessHostList. Handle: " << m_widgetHandle);
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
     {
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
+        CHECK_WIDGET_EXISTENCE(m_widgetHandle)
 
         WRT_DB_SELECT(select, WidgetAccessHost, &WrtDatabase::interface())
         select->Where(Equals<WidgetAccessHost::app_id>(m_widgetHandle));
@@ -430,7 +422,6 @@ HostList WidgetDAOReadOnly::getAccessHostList() const
         FOREACH(it, values)
         ret.push_back(DPL::ToUTF8String(*it));
 
-        transaction.Commit();
         return ret;
     }
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get access host list")
@@ -537,47 +528,68 @@ ExternalLocationList WidgetDAOReadOnly::getWidgetExternalLocations() const
 CertificateChainList WidgetDAOReadOnly::getWidgetCertificate(
     CertificateSource source) const
 {
-    WRT_DB_SELECT(select, WidgetCertificate, &WrtDatabase::interface())
-    select->Where(
-        And(
+    CertificateChainList result;
+
+    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {
+
+               WRT_DB_SELECT(select, WidgetCertificate, &WrtDatabase::interface())
+               select->Where(
+                       And(
             Equals<WidgetCertificate::app_id>(m_widgetHandle),
             Equals<WidgetCertificate::cert_source>(source)));
 
     std::list<WidgetCertificate::Row> chainList = select->GetRowList();
 
-    CertificateChainList result;
 
     FOREACH(iter, chainList)
     result.push_back(DPL::ToUTF8String(iter->Get_encoded_chain()));
+   }
+   SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to getWidgetCertificate")
+
     return result;
 }
 
 DbWidgetSize WidgetDAOReadOnly::getPreferredSize() const
 {
-    WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
+        DbWidgetSize size;
+       SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {   WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
 
-    DbWidgetSize size;
     size.width = row.Get_widget_width();
     size.height = row.Get_widget_height();
 
     LogDebug("Return size wxh = " <<
              (!!size.width ? *size.width : -1) << " x " <<
              (!!size.height ? *size.height : -1));
+   }
+   SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to getPreferredSize")
 
     return size;
 }
 
 WidgetType WidgetDAOReadOnly::getWidgetType() const
 {
-    WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
-    DPL::OptionalInt result = row.Get_widget_type();
+       DPL::OptionalInt result;
+    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {
+               WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
+       result = row.Get_widget_type();
+       
+       } SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to getWidgetType")
+
     return WidgetType(static_cast<AppType>(*result));
 }
 
 WidgetGUID WidgetDAOReadOnly::getGUID() const
 {
-    WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
-    return row.Get_widget_id();
+       WidgetInfoRow row;
+    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {
+               row = getWidgetInfoRow(m_widgetHandle);
+    
+    } SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to getGUID")
+       return row.Get_widget_id();
 }
 
 DPL::OptionalString WidgetDAOReadOnly::getTizenAppId() const
@@ -1103,8 +1115,7 @@ void WidgetDAOReadOnly::getAppControlList(
     LogDebug("Getting getAppControlList. Handle: " << m_widgetHandle);
     SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
     {
-        ScopedTransaction transaction(&WrtDatabase::interface());
-        CHECK_WIDGET_EXISTENCE(transaction, m_widgetHandle)
+        CHECK_WIDGET_EXISTENCE(m_widgetHandle)
 
         WRT_DB_SELECT(select, AppControlInfo, &WrtDatabase::interface())
         select->Where(Equals<AppControlInfo::app_id>(m_widgetHandle));
@@ -1127,7 +1138,6 @@ void WidgetDAOReadOnly::getAppControlList(
             outAppControlList.push_back(ret);
         }
 
-        transaction.Commit();
     }
     SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get AppControl list")
 }
index ab41158..832f9e2 100644 (file)
@@ -41,7 +41,7 @@ inline const char* GetWrtDatabaseFilePath()
  */
 inline const char* GetDevicePluginPath()
 {
-    return "/usr/lib/wrt-plugins";
+    return LIBDIR_PREFIX "/wrt-plugins";
 }
 
 /**
diff --git a/packaging/wrt-commons.changes b/packaging/wrt-commons.changes
new file mode 100644 (file)
index 0000000..c817bc0
--- /dev/null
@@ -0,0 +1,10 @@
+* Mon May 20 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130520.103517@f203c87
+- Fix WRT Runtimes Change post section : call wrt_common_create_cleandb.sh
+- Fix WRT Runtime : SQL Issue , remove transaction around CHECK_WIDGET_EXISTENCE + Force transaction BEGIN IMEDIATE + Try catch
+- Add Serialize/Deserialize function for unsigned long
+- Fix PC File
+- Fix x86-64 compliance
+
+* Sat May 18 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130517.045648@957c86e
+- Call ldconfig
+
diff --git a/packaging/wrt-commons.manifest b/packaging/wrt-commons.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
index 21c4827..e8ae047 100644 (file)
@@ -1,12 +1,11 @@
-#git:framework/web/wrt-commons
 Name:       wrt-commons
 Summary:    Wrt common library
 Version:    0.2.157
 Release:    1
-Group:      Development/Libraries
-License:    Apache License, Version 2.0
-URL:        N/A
+Group:      System/Libraries
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source1001:    wrt-commons.manifest
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(appcore-efl)
@@ -38,6 +37,7 @@ Wrt common library development headers
 
 %prep
 %setup -q
+cp %{SOURCE1001} .
 
 %define with_tests 0
 %if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
@@ -58,28 +58,26 @@ export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 
 export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed"
 
-cmake . -DVERSION=%{version} \
+%cmake . -DVERSION=%{version} \
         -DDPL_LOG="OFF"      \
-        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
         %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS} \
         %{?WITH_CHILD:-DWITH_CHILD=%WITH_CHILD}
 make %{?jobs:-j%jobs}
 
 %install
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
 %make_install
 
-%clean
-rm -rf %{buildroot}
 
-%post
+%postun -p /sbin/ldconfig
+
+%post 
+/sbin/ldconfig
 mkdir -p /opt/share/widget/system
 mkdir -p /opt/share/widget/user
 mkdir -p /opt/share/widget/exec
 mkdir -p /opt/share/widget/data/Public
-mkdir -p /usr/lib/wrt-plugins
+mkdir -p %{_libdir}/wrt-plugins
 
 #Don't reset DB when install on QEMU (during other packages building witch GBS)
 if [ -z "$EMULATOR_ARCHS" ]; then
@@ -143,11 +141,10 @@ chsmack -a 'wrt-commons::db_wrt_i18n' /opt/usr/dbspace/.wrt_i18n.db-journal
 echo "[WRT] wrt-commons postinst done ..."
 
 %files
-%manifest wrt-commons.manifest
-%{_libdir}/*.so
+%manifest %{name}.manifest
+%license  LICENSE
 %{_libdir}/*.so.*
 %{_datadir}/wrt-engine/*
-%{_datadir}/license/%{name}
 %attr(755,root,root) %{_bindir}/wrt_commons_create_clean_db.sh
 %attr(755,root,root) %{_bindir}/wrt_commons_reset_db.sh
 %if %{with_tests}
@@ -160,5 +157,7 @@ echo "[WRT] wrt-commons postinst done ..."
 %endif
 
 %files devel
+%manifest %{name}.manifest
+%{_libdir}/*.so
 %{_includedir}/dpl-efl/*
 %{_libdir}/pkgconfig/*.pc
diff --git a/wrt-commons.manifest b/wrt-commons.manifest
deleted file mode 100644 (file)
index c63943b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<manifest>
-  <define>
-    <domain name="wrt-commons"/>
-    <provide>   
-        <label name="wrt-commons::db_wrt"/>
-    </provide>
-  </define>
-  <request>
-    <domain name="_"/>
-  </request>
-</manifest>