[Release] wrt-commons_0.2.107
authorleerang song <leerang.song@samsung.com>
Thu, 21 Mar 2013 02:13:39 +0000 (11:13 +0900)
committerleerang song <leerang.song@samsung.com>
Thu, 21 Mar 2013 02:13:39 +0000 (11:13 +0900)
Change-Id: Ida34aa7af228983f502ceb69d846821548b6746c

13 files changed:
debian/changelog
modules/security_origin_dao/dao/security_origin_dao.cpp [changed mode: 0644->0755]
modules/security_origin_dao/dao/security_origin_dao_types.cpp [changed mode: 0644->0755]
modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao.h [changed mode: 0644->0755]
modules/security_origin_dao/include/wrt-commons/security-origin-dao/security_origin_dao_types.h [changed mode: 0644->0755]
modules/widget_dao/CMakeLists.txt [changed mode: 0644->0755]
modules/widget_dao/dao/widget_dao_read_only.cpp [changed mode: 0644->0755]
modules/widget_dao/dao/widget_dao_types.cpp [new file with mode: 0755]
modules/widget_dao/include/dpl/wrt-dao-ro/common_dao_types.h [changed mode: 0644->0755]
modules/widget_dao/include/dpl/wrt-dao-ro/config_parser_data.h
modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h [changed mode: 0644->0755]
modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_types.h [new file with mode: 0755]
packaging/wrt-commons.spec

index 6f7aaea..e427917 100644 (file)
@@ -1,3 +1,10 @@
+wrt-commons (0.2.107) unstable; urgency=low
+
+  * Add Account parser
+  * Get plivilege feature for auto W3C fullsceen mode
+
+ -- leerang <leerang.song@samsung.com>  Thu, 21 Mar 2013 10:56:01 +0900
+
 wrt-commons (0.2.106) unstable; urgency=low
 
   * Add one field for new attribute 'touch-effect' of <tizen:box-content>
old mode 100644 (file)
new mode 100755 (executable)
index 9840665..746e61c
@@ -37,6 +37,7 @@ using namespace DPL::DB::ORM;
 using namespace DPL::DB::ORM::security_origin;
 
 namespace SecurityOriginDB {
+using namespace WrtDB;
 #define SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN          Try
 
 #define SQL_CONNECTION_EXCEPTION_HANDLER_END(message)   \
old mode 100644 (file)
new mode 100755 (executable)
index 23ea30c..8d2a9f8
@@ -26,9 +26,4 @@
 #include <dpl/log/log.h>
 
 namespace SecurityOriginDB {
-const std::map<std::string, Feature> g_W3CPrivilegeTextMap = {
-    {"http://tizen.org/privilege/location",     FEATURE_GEOLOCATION},
-    {"http://tizen.org/privilege/notification", FEATURE_WEB_NOTIFICATION},
-    {"http://tizen.org/privilege/mediacapture", FEATURE_USER_MEDIA}
-};
 } // namespace SecurityOriginDB
old mode 100644 (file)
new mode 100755 (executable)
index 964715e..146ea6d
@@ -25,6 +25,7 @@
 #include <dpl/db/thread_database_support.h>
 #include <wrt-commons/security-origin-dao/security_origin_dao_types.h>
 #include <dpl/wrt-dao-ro/common_dao_types.h>
+#include <dpl/wrt-dao-ro/widget_dao_types.h>
 
 namespace SecurityOriginDB {
 class SecurityOriginDAO
@@ -47,7 +48,7 @@ class SecurityOriginDAO
     void setSecurityOriginData(const SecurityOriginData &securityOriginData,
                                const Result result,
                                const bool readOnly = false);
-    void setPrivilegeSecurityOriginData(const Feature feature,
+    void setPrivilegeSecurityOriginData(const WrtDB::Feature feature,
                                         bool isOnlyAllowedLocalOrigin = true);
     void removeSecurityOriginData(const SecurityOriginData &securityOriginData);
     void removeSecurityOriginData(const Result result);
old mode 100644 (file)
new mode 100755 (executable)
index 582de0f..feaaf89
 #include <memory>
 #include <map>
 #include <dpl/string.h>
+#include <dpl/wrt-dao-ro/widget_dao_types.h>
 
 namespace SecurityOriginDB {
-enum Feature
-{
-    FEATURE_START = 0,
-    FEATURE_GEOLOCATION = 0,
-    FEATURE_WEB_NOTIFICATION,
-    FEATURE_USER_MEDIA,
-    FEATURE_END = FEATURE_USER_MEDIA
-};
-
 enum Result
 {
     RESULT_UNKNOWN = 0,
@@ -48,8 +40,6 @@ enum Result
     RESULT_DENY_ALWAYS
 };
 
-extern const std::map<std::string, Feature> g_W3CPrivilegeTextMap;
-
 struct Origin
 {
     DPL::String scheme;
@@ -79,10 +69,10 @@ struct Origin
 
 struct SecurityOriginData
 {
-    Feature feature;
+    WrtDB::Feature feature;
     Origin origin;
 
-    SecurityOriginData(const Feature features, const Origin& ori) :
+    SecurityOriginData(const WrtDB::Feature features, const Origin& ori) :
         feature(features),
         origin(ori)
     {}
old mode 100644 (file)
new mode 100755 (executable)
index cf1034f..1c58aa9
@@ -52,6 +52,7 @@ set(WRT_DAO_RO_SOURCES
     dao/widget_dao_read_only.cpp
     dao/webruntime_database.cpp
     dao/WrtDatabase.cpp
+    dao/widget_dao_types.cpp
 )
 
 set(WRT_DAO_RW_SOURCES
@@ -130,6 +131,7 @@ INSTALL(FILES
     include/dpl/wrt-dao-ro/widget_dao_read_only.h
     include/dpl/wrt-dao-ro/wrt_db_types.h
     include/dpl/wrt-dao-ro/WrtDatabase.h
+    include/dpl/wrt-dao-ro/widget_dao_types.h
     DESTINATION include/dpl-efl/dpl/wrt-dao-ro
     )
 
old mode 100644 (file)
new mode 100755 (executable)
index b52a2b0..d97416e
@@ -1268,6 +1268,19 @@ TizenPkgId WidgetDAOReadOnly::getTizenPkgId() const
     return row.Get_tizen_pkgid();
 }
 
+PrivilegeList WidgetDAOReadOnly::getWidgetPrivilege() const
+{
+    //TODO check widget existance
+    SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
+    {
+        WRT_DB_SELECT(select, WidgetPrivilege, &WrtDatabase::interface())
+        select->Where(Equals<WidgetPrivilege::app_id>(m_widgetHandle));
+
+        return select->GetValueList<WidgetPrivilege::name>();
+    }
+    SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get PrivilegeList")
+}
+
 #undef SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN
 #undef SQL_CONNECTION_EXCEPTION_HANDLER_END
 #undef CHECK_WIDGET_EXISTENCE
diff --git a/modules/widget_dao/dao/widget_dao_types.cpp b/modules/widget_dao/dao/widget_dao_types.cpp
new file mode 100755 (executable)
index 0000000..50976e2
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+/**
+ *
+ * @file    widget_dao_types.cpp
+ * @author  Leerang Song (leerang.song@samsung.com)
+ * @version 1.0
+ * @brief This file contains the declaration of
+ *           common data types forwidget database.
+ */
+
+#include <dpl/wrt-dao-ro/widget_dao_types.h>
+#include <dpl/log/log.h>
+
+namespace WrtDB {
+
+const std::map<std::string, Feature> g_W3CPrivilegeTextMap = {
+    {"http://tizen.org/privilege/location",     FEATURE_GEOLOCATION},
+    {"http://tizen.org/privilege/notification", FEATURE_WEB_NOTIFICATION},
+    {"http://tizen.org/privilege/mediacapture", FEATURE_USER_MEDIA},
+    {"http://tizen.org/privilege/fullscreen", FEATURE_FULLSCREEN_MODE}
+};
+} // namespace SecurityOriginDB
old mode 100644 (file)
new mode 100755 (executable)
index 234ef6e..5866b20
@@ -157,6 +157,8 @@ typedef std::list<WidgetAccessInfo> WidgetAccessInfoList;
 
 typedef std::list<DPL::String> WindowModeList;
 
+typedef std::list<DPL::String> PrivilegeList;
+
 typedef std::set<EncryptedFileInfo> EncryptedFileList;
 
 /**
index 27f9855..77a633e 100644 (file)
@@ -260,6 +260,29 @@ class ConfigParserData
         bool operator<=(const LiveboxInfo&) const;
     };
     typedef std::list<DPL::Optional<LiveboxInfo> > LiveboxList;
+
+    enum IconSectionType
+    {
+        DefaultIcon =0,
+        SmallIcon,
+    };
+
+    typedef std::set<std::pair<IconSectionType, DPL::String>> IconSet;
+    typedef std::list<DPL::String> CapabilityList;
+    typedef std::set<std::pair<DPL::String, DPL::String>> DisplayNameSet;
+
+    struct AccountProvider
+    {
+        AccountProvider() :
+            m_multiAccountSupport(false)
+        { }
+
+        bool m_multiAccountSupport;
+        IconSet m_iconSet;
+        DisplayNameSet m_displayNameSet;
+        CapabilityList m_capabilityList;
+    };
+
     LiveboxList m_livebox;
 
     typedef std::list<DPL::OptionalString> DependsPkgList;
@@ -327,6 +350,8 @@ class ConfigParserData
     DPL::OptionalString backgroundPage;
     // For category
     CategoryList categoryList;
+    // For Account
+    AccountProvider accountProvider;
 
     ConfigParserData() :
         flashNeeded(false),
old mode 100644 (file)
new mode 100755 (executable)
index 95f0365..738434d
@@ -827,6 +827,7 @@ class WidgetDAOReadOnly
      * @return tizen package id
      */
     TizenPkgId getTizenPkgId() const;
+    PrivilegeList getWidgetPrivilege() const;
 };
 } // namespace WrtDB
 
diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_types.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_types.h
new file mode 100755 (executable)
index 0000000..d170f3b
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+/**
+ *
+ * @file    widget_dao_types.h
+ * @author  Leerang Song (leerang.song@samsung.com)
+ * @version 1.0
+ * @brief This file contains the declaration of
+ *           common data types forwidget database.
+ */
+#ifndef _WIDGET_DAO_TYPES_H_
+#define _WIDGET_DAO_TYPES_H_
+
+#include <list>
+#include <memory>
+#include <map>
+#include <dpl/string.h>
+
+namespace WrtDB {
+
+enum Feature
+{
+    FEATURE_START = 0,
+    FEATURE_GEOLOCATION = 0,
+    FEATURE_WEB_NOTIFICATION,
+    FEATURE_USER_MEDIA,
+    FEATURE_FULLSCREEN_MODE,
+    FEATURE_END = FEATURE_FULLSCREEN_MODE
+};
+extern const std::map<std::string, Feature> g_W3CPrivilegeTextMap;
+} // namespace WrtDB
+
+#endif // _WIDGET_DAO_TYPES_H_
index 45775fe..a0e65fe 100644 (file)
@@ -1,7 +1,7 @@
-#git:framework/web/wrt-commons wrt-commons 0.2.106
+#git:framework/web/wrt-commons wrt-commons 0.2.107
 Name:       wrt-commons
 Summary:    Wrt common library
-Version:    0.2.106
+Version:    0.2.107
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0