[Release] wrt-commons_0.2.90 submit/tizen_2.0/20130108.043056
authorJihoon Chung <jihoon.chung@samsung.com>
Tue, 8 Jan 2013 04:28:49 +0000 (13:28 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Tue, 8 Jan 2013 04:28:49 +0000 (13:28 +0900)
Change-Id: I04f5de8ec6f66320219270654fe588b171ba1208

debian/changelog
modules/widget_dao/dao/widget_dao_read_only.cpp
modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h
modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h
modules/widget_dao/orm/wrt_db
packaging/wrt-commons.spec
tests/dao/TestCases_WidgetDAO.cpp

index 4f04063fc1410f682b53b319f8332339697953fc..34786b5a19d424f5d26b02627e6e93c4e473c644 100644 (file)
@@ -1,3 +1,10 @@
+wrt-commons (0.2.90) unstable; urgency=low
+
+  * Changed PkgName type from DPL::Optional<DPL::String> to DPL::String. PART 4
+  * User agent database update
+
+ -- Jihoon Chung <jihoon.chung@samsung.com>  Tue, 08 Jan 2013 11:12:49 +0900
+
 wrt-commons (0.2.89) unstable; urgency=low
 
   * Handle return value from pthread_setspecific
index 58a8c27178d478e3bcf0f10356feb1ce8d7a8528..ade490b03de3746064b9934178735f18018dadcb 100644 (file)
@@ -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<WidgetPkgName>(*it));
+    LogDebug("Getting Pkgname List ");
+    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {
+        WRT_DB_SELECT(select, WidgetInfo, &WrtDatabase::interface())
+        return select->GetValueList<WidgetInfo::pkgname>();
     }
-    return pkgnameList;
+    SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get Pkgname list")
 }
 
 WidgetPkgNameList_TEMPORARY_API WidgetDAOReadOnly::getPkgnameList_TEMPORARY_API()
index 17ebf5729c6e8c0ed4187f1c410dba677944a6e3..444f176dd50ab9e9f649efd784524f5e8650242b 100644 (file)
@@ -236,7 +236,7 @@ typedef std::multiset<DbWidgetFeature> DbWidgetFeatureSet;
  */
 typedef std::list<DbWidgetHandle> DbWidgetHandleList;
 
-typedef std::list<DPL::Optional<WidgetPkgName> > WidgetPkgNameList; //TODO: this cannot be null -> appropriate changes in db schema needed
+typedef std::list<WidgetPkgName> WidgetPkgNameList; //TODO: this cannot be null -> appropriate changes in db schema needed
 typedef std::list<WidgetPkgName> WidgetPkgNameList_TEMPORARY_API; //TODO: this cannot be null -> appropriate changes in db schema needed
 
 class WidgetDAOReadOnly; //forward declaration
index 2520bd4d68e15e2730b48c6cfdb1af8e9666f0c0..ad9929d71ec6b6115de35cf34763105dcb041841 100755 (executable)
@@ -183,6 +183,9 @@ class ConfigParserData
 
     typedef std::set<Setting> 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<ServiceInfo> ServiceInfoList;
+
+    struct AppControlInfo
+    {
+        AppControlInfo(
+            const DPL::String& operation) :
+            m_operation(operation)
+        {
+        }
+        DPL::String m_src;
+        DPL::String m_operation;
+        std::set <DPL::String> m_uriList;
+        std::set <DPL::String> m_mimeList;
+
+        bool operator==(const AppControlInfo&) const;
+        bool operator!=(const AppControlInfo&) const;
+    };
+
+    typedef std::list<ServiceInfo> ServiceInfoList; // It will be removed.
+    typedef std::list<AppControlInfo> AppControlInfoList;
 
     typedef std::list<std::pair<DPL::String, DPL::String>> 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
index fc79bd9cdeb01bfa52cb76098e9c4bb013ccbe7b..46198c7c23c703b0b26732ce47110479f3e4faef 100755 (executable)
@@ -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;
 )
index 41357df8fe7f83ae43b76676a61c41f2a1e48629..e2cbe91bc2e3ec6d25b0db7530cc5d2596816306 100644 (file)
@@ -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
index 92e19953aff4bd425ecafa2f4dc97a238036953a..4964038f161ce5168ab550efda9646460cce837a 100644 (file)
@@ -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);
 }