From 77dbac657d2f47d12044130b62ab124a9bb8ff1e Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Tue, 8 Jan 2013 13:28:49 +0900 Subject: [PATCH] [Release] wrt-commons_0.2.90 Change-Id: I04f5de8ec6f66320219270654fe588b171ba1208 --- debian/changelog | 7 +++++ .../widget_dao/dao/widget_dao_read_only.cpp | 12 ++++----- .../include/dpl/wrt-dao-ro/common_dao_types.h | 2 +- .../dpl/wrt-dao-ro/config_parser_data.h | 27 +++++++++++++++++-- modules/widget_dao/orm/wrt_db | 3 +-- packaging/wrt-commons.spec | 4 +-- tests/dao/TestCases_WidgetDAO.cpp | 6 ++--- 7 files changed, 45 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4f04063..34786b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +wrt-commons (0.2.90) unstable; urgency=low + + * Changed PkgName type from DPL::Optional to DPL::String. PART 4 + * User agent database update + + -- Jihoon Chung Tue, 08 Jan 2013 11:12:49 +0900 + wrt-commons (0.2.89) unstable; urgency=low * Handle return value from pthread_setspecific diff --git a/modules/widget_dao/dao/widget_dao_read_only.cpp b/modules/widget_dao/dao/widget_dao_read_only.cpp index 58a8c27..ade490b 100644 --- a/modules/widget_dao/dao/widget_dao_read_only.cpp +++ b/modules/widget_dao/dao/widget_dao_read_only.cpp @@ -404,13 +404,13 @@ DbWidgetHandleList WidgetDAOReadOnly::getHandleList() WidgetPkgNameList WidgetDAOReadOnly::getPkgnameList() { - LogDebug("Getting Pkgname List"); - WidgetPkgNameList_TEMPORARY_API pkgnameList_TEMPORARY_API = getPkgnameList_TEMPORARY_API(); - WidgetPkgNameList pkgnameList; - FOREACH(it,pkgnameList_TEMPORARY_API ){ - pkgnameList.push_back(DPL::Optional(*it)); + LogDebug("Getting Pkgname List "); + SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN + { + WRT_DB_SELECT(select, WidgetInfo, &WrtDatabase::interface()) + return select->GetValueList(); } - return pkgnameList; + SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get Pkgname list") } WidgetPkgNameList_TEMPORARY_API WidgetDAOReadOnly::getPkgnameList_TEMPORARY_API() diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h index 17ebf57..444f176 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h @@ -236,7 +236,7 @@ typedef std::multiset DbWidgetFeatureSet; */ typedef std::list DbWidgetHandleList; -typedef std::list > WidgetPkgNameList; //TODO: this cannot be null -> appropriate changes in db schema needed +typedef std::list WidgetPkgNameList; //TODO: this cannot be null -> appropriate changes in db schema needed typedef std::list WidgetPkgNameList_TEMPORARY_API; //TODO: this cannot be null -> appropriate changes in db schema needed class WidgetDAOReadOnly; //forward declaration diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h index 2520bd4..ad9929d 100755 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h @@ -183,6 +183,9 @@ class ConfigParserData typedef std::set SettingsList; + /* ServiceInfo will be removed. + * ServiceInfo will be changed AppControl + */ struct ServiceInfo { ServiceInfo( @@ -204,7 +207,25 @@ class ConfigParserData bool operator==(const ServiceInfo&) const; bool operator!=(const ServiceInfo&) const; }; - typedef std::list ServiceInfoList; + + struct AppControlInfo + { + AppControlInfo( + const DPL::String& operation) : + m_operation(operation) + { + } + DPL::String m_src; + DPL::String m_operation; + std::set m_uriList; + std::set m_mimeList; + + bool operator==(const AppControlInfo&) const; + bool operator!=(const AppControlInfo&) const; + }; + + typedef std::list ServiceInfoList; // It will be removed. + typedef std::list AppControlInfoList; typedef std::list> BoxSizeList; @@ -288,7 +309,9 @@ class ConfigParserData DPL::OptionalString tizenMinVersionRequired; //Application service model list - ServiceInfoList appServiceList; + ServiceInfoList appServiceList; //It will be removed. + AppControlInfoList appControlList; + // For link shared directory DependsPkgList dependsPkgList; // Splash image path diff --git a/modules/widget_dao/orm/wrt_db b/modules/widget_dao/orm/wrt_db index fc79bd9..46198c7 100755 --- a/modules/widget_dao/orm/wrt_db +++ b/modules/widget_dao/orm/wrt_db @@ -393,7 +393,6 @@ SQL( INSERT INTO UserAgents VALUES("Galaxy Tab 10.1", "Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"); INSERT INTO UserAgents VALUES("iPad 2", "Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5"); ) - -SQL( + SQL( COMMIT; ) diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index 41357df..e2cbe91 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -1,7 +1,7 @@ -#git:framework/web/wrt-commons wrt-commons 0.2.89 +#git:framework/web/wrt-commons wrt-commons 0.2.90 Name: wrt-commons Summary: Wrt common library -Version: 0.2.89 +Version: 0.2.90 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 diff --git a/tests/dao/TestCases_WidgetDAO.cpp b/tests/dao/TestCases_WidgetDAO.cpp index 92e1995..4964038 100644 --- a/tests/dao/TestCases_WidgetDAO.cpp +++ b/tests/dao/TestCases_WidgetDAO.cpp @@ -88,7 +88,7 @@ WidgetPkgName _registerWidget(const WidgetRegisterInfo& regInfo, { WidgetPkgName pkgname; Try { - auto previous = WidgetDAO::getPkgnameList_TEMPORARY_API(); + auto previous = WidgetDAO::getPkgnameList(); // register widget pkgname = WidgetDAO::registerWidgetGenerateTizenId(regInfo, sec); @@ -96,7 +96,7 @@ WidgetPkgName _registerWidget(const WidgetRegisterInfo& regInfo, RUNNER_ASSERT_MSG(!pkgname.empty(), "(called from line " << line << ")"); - auto current = WidgetDAO::getPkgnameList_TEMPORARY_API(); + auto current = WidgetDAO::getPkgnameList(); RUNNER_ASSERT_MSG(previous.size()+1 == current.size(), "(called from line " << line << ")"); @@ -828,7 +828,7 @@ Expected: For all position in database should be returned one item in list */ RUNNER_TEST(widget_dao_test_get_widget_pkgname_list) { - WidgetPkgNameList_TEMPORARY_API pkgnames = WidgetDAO::getPkgnameList_TEMPORARY_API(); + WidgetPkgNameList pkgnames = WidgetDAO::getPkgnameList(); RUNNER_ASSERT(pkgnames.size() >= 3); } -- 2.34.1