Add new attribute 'touch-effect' into <tizen:box-content>
authorYunchan Cho <yunchan.cho@samsung.com>
Sun, 17 Mar 2013 10:14:55 +0000 (19:14 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Sun, 17 Mar 2013 10:57:26 +0000 (19:57 +0900)
[Issue#] N/A
[Problem] In Web livebox, touch-effect is always activated as default.
[Cause] There is no way to indicate for web livebox to use touch effect, or not.
[Solution] New attribute 'touch-effect' for this is added.

Before releasing installer package, wrt-commons package including the following patch must be released first.
 http://slp-info.sec.samsung.net/gerrit/#/c/166466/

Change-Id: I848f52ed7a51d0c6ba381abcade0cc99e2d89eb9

configuration/config.tizen.xsd
configuration/config.xsd
packaging/wrt-installer.spec
src/CMakeLists.txt
src/configuration_parser/widget_parser.cpp
src/configuration_parser/widget_parser.h
src/jobs/widget_install/manifest.cpp
src/jobs/widget_install/manifest.h
src/jobs/widget_install/task_database.cpp
src/jobs/widget_install/task_manifest_file.cpp
src/jobs/widget_uninstall/task_db_update.cpp

index 99e8ecf..765f2b6 100755 (executable)
@@ -44,9 +44,9 @@
     </xs:restriction>
 </xs:simpleType>
 
-<xs:simpleType name="liveboxIdType">
+<xs:simpleType name="appWidgetIdType">
     <xs:restriction base="xs:string">
-        <xs:pattern value="[0-9a-zA-Z]{10}.[0-9a-zA-Z]{1,}"/>
+        <xs:pattern value="[0-9a-zA-Z]{10}.[0-9a-zA-Z]{1,}.[0-9a-zA-Z]{1,}"/>
     </xs:restriction>
 </xs:simpleType>
 
   </xs:complexType>
 </xs:element>
 
-<xs:element name="livebox">
+<xs:element name="app-widget">
     <xs:complexType mixed="true">
         <xs:all>
             <xs:element ref="tizen:box-label"/>
             <xs:element ref="tizen:box-icon"/>
             <xs:element ref="tizen:box-content"/>
         </xs:all>     
-        <xs:attribute name="id" type="tizen:liveboxIdType" use="required"/>
+        <xs:attribute name="id" type="tizen:appWidgetIdType" use="required"/>
         <xs:attribute name="primary" type="widgets:data.boolean" use="required"/>
         <xs:attribute name="auto-launch" type="widgets:data.boolean" use="optional"/>
         <xs:attribute name="update-period" type="tizen:updatePeriodType" use="optional"/>
             <xs:element ref="tizen:pd"/>
         </xs:sequence>
         <xs:attribute name="src" use="required" type="xs:anyURI"/>
+        <xs:attribute name="mouse-event" use="optional" type="xs:anyURI"/>
+        <xs:attribute name="touch-effect" use="optional" type="xs:anyURI"/>
     </xs:complexType>
 </xs:element>
 
index 4e6a005..ba1c5ab 100755 (executable)
@@ -75,7 +75,7 @@
                 <xs:element ref="tizen:setting"  maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
                 <xs:element ref="tizen:application" minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
                 <xs:element ref="tizen:content"  minOccurs="1" maxOccurs="1" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
-                <xs:element ref="tizen:livebox"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
+                <xs:element ref="tizen:app-widget"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
                 <xs:element ref="tizen:privilege"  minOccurs="0" maxOccurs="unbounded" xmlns:tizen="http://tizen.org/ns/widgets"/>\r
                 </xs:choice>\r
             <xs:attribute ref="xml:lang"/>\r
index 4b0ccb7..e613c9f 100644 (file)
@@ -38,7 +38,7 @@ BuildRequires:  pkgconfig(dpl-encryption)
 BuildRequires:  pkgconfig(capi-appfw-app-manager)
 BuildRequires:  pkgconfig(drm-service-core-intel)
 BuildRequires:  pkgconfig(app2sd)
-BuildRequires:  pkgconfig(web-provider-svc)
+BuildRequires:  pkgconfig(web-provider)
 BuildRequires:  pkgconfig(libprivilege-control)
 BuildRequires:  pkgconfig(osp-appfw)
 BuildRequires:  osp-appfw-internal-devel
index 67b1189..0c86bc0 100644 (file)
@@ -123,7 +123,7 @@ PKG_CHECK_MODULES(INSTALLER_STATIC_DEP
     wrt-plugins-types
     pkgmgr-installer
     pkgmgr-parser
-    web-provider-svc
+    web-provider
     osp-appfw
     REQUIRED
 )
index 59c984f..71dc7a8 100644 (file)
@@ -1761,7 +1761,7 @@ class CategoryParser : public ElementParser
     ConfigParserData& m_data;
 };
 
-class LiveboxParser : public ElementParser
+class AppWidgetParser : public ElementParser
 {
   public:
 
@@ -1974,12 +1974,12 @@ class LiveboxParser : public ElementParser
             if (name == L"box-size") {
                 return DPL::MakeDelegate(
                            this,
-                           &LiveboxParser::BoxContentParser::
+                           &AppWidgetParser::BoxContentParser::
                                OnBoxSizeElement);
             } else if (name == L"pd") {
                 return DPL::MakeDelegate(
                            this,
-                           &LiveboxParser::BoxContentParser::
+                           &AppWidgetParser::BoxContentParser::
                                OnPdElement);
             } else {
                 ThrowMsg(Exception::ParseError,
@@ -1996,6 +1996,9 @@ class LiveboxParser : public ElementParser
                 if (attribute.name == L"mouse-event") {
                     m_box.m_boxMouseEvent = attribute.value;
                 }
+                if (attribute.name == L"touch-effect") {
+                    m_box.m_boxTouchEffect = attribute.value;
+                }
             }
         }
 
@@ -2043,11 +2046,11 @@ class LiveboxParser : public ElementParser
                                         const DPL::String& name)
     {
         if (name == L"box-label") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxLabelElement);
+            return DPL::MakeDelegate(this, &AppWidgetParser::OnBoxLabelElement);
         } else if (name == L"box-icon") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxIconElement);
+            return DPL::MakeDelegate(this, &AppWidgetParser::OnBoxIconElement);
         } else if (name == L"box-content") {
-            return DPL::MakeDelegate(this, &LiveboxParser::OnBoxContentElement);
+            return DPL::MakeDelegate(this, &AppWidgetParser::OnBoxContentElement);
         } else {
             return &IgnoringParser::Create;
         }
@@ -2093,7 +2096,7 @@ class LiveboxParser : public ElementParser
         m_data.m_livebox.push_back(m_livebox);
     }
 
-    explicit LiveboxParser(ConfigParserData& data) :
+    explicit AppWidgetParser(ConfigParserData& data) :
         ElementParser(),
         m_data(data),
         m_properNamespace(false)
@@ -2269,7 +2272,7 @@ WidgetParser::WidgetParser(ConfigParserData& data) :
                 OnAppControlElement);
     m_map[L"category"] = DPL::MakeDelegate(this,
                                            &WidgetParser::OnCategoryElement);
-    m_map[L"livebox"] = DPL::MakeDelegate(this, &WidgetParser::OnLiveboxElement);
+    m_map[L"app-widget"] = DPL::MakeDelegate(this, &WidgetParser::OnAppWidgetElement);
 #ifdef CSP_ENABLED
     m_map[L"Content-Security-Policy"] = DPL::MakeDelegate(
             this,
@@ -2372,9 +2375,9 @@ ElementParserPtr WidgetParser::OnCategoryElement()
     return ElementParserPtr(new CategoryParser(m_data));
 }
 
-ElementParserPtr WidgetParser::OnLiveboxElement()
+ElementParserPtr WidgetParser::OnAppWidgetElement()
 {
-    return ElementParserPtr(new LiveboxParser(m_data));
+    return ElementParserPtr(new AppWidgetParser(m_data));
 }
 
 ElementParserPtr WidgetParser::OnCspElement()
index c8c1a2b..af9f7db 100644 (file)
@@ -82,7 +82,7 @@ class WidgetParser : public ElementParser
     ElementParserPtr OnAppServiceElement();
     ElementParserPtr OnAppControlElement();
     ElementParserPtr OnCategoryElement();
-    ElementParserPtr OnLiveboxElement();
+    ElementParserPtr OnAppWidgetElement();
     ElementParserPtr OnCspElement();
     ElementParserPtr OnCspReportOnlyElement();
 
index f11c954..f143d46 100644 (file)
@@ -380,6 +380,7 @@ void LiveBox::serialize(xmlTextWriterPtr writer)
         startElement(writer, "box");
         writeAttribute(writer, "type", "buffer");
         writeAttribute(writer, "mouse_event", this->box.boxMouseEvent);
+        writeAttribute(writer, "touch_effect", this->box.boxTouchEffect);
 
         FOREACH(m, this->box.boxSize)
         {
index d2b3917..342c387 100644 (file)
@@ -330,6 +330,7 @@ struct BoxInfo
 {
     NcnameType boxSrc;
     NcnameType boxMouseEvent;
+    NcnameType boxTouchEffect;
     boxSizeType boxSize;
     NcnameType pdSrc;
     NcnameType pdWidth;
index b9971c1..341edf4 100644 (file)
@@ -28,7 +28,7 @@
 #include <widget_install/job_widget_install.h>
 #include <widget_install/widget_install_errors.h>
 #include <widget_install/widget_install_context.h>
-#include <web-provider-info.h>
+#include <web_provider_livebox_info.h>
 #include <dpl/wrt-dao-rw/widget_dao.h>
 #include <dpl/wrt-dao-ro/vconf_config.h>
 #include <dpl/foreach.h>
@@ -305,7 +305,7 @@ void TaskDatabase::StepLiveboxDBInsert()
         std::string boxId = DPL::ToUTF8String((**it).m_liveboxId);
         std::string boxType;
         if ((**it).m_type == L"") {
-            boxType = web_provider_info_get_default_type();
+            boxType = web_provider_livebox_get_default_type();
         } else {
             boxType = DPL::ToUTF8String((**it).m_type);
         }
@@ -313,7 +313,7 @@ void TaskDatabase::StepLiveboxDBInsert()
         LogInfo("livebox type: " << boxType);
 
         int ret =
-            web_provider_info_insert_box_type(
+            web_provider_livebox_insert_box_type(
                 boxId.c_str(), tizenId.c_str(), boxType.c_str());
 
         if (ret < 0) {
index 135b252..6821d26 100644 (file)
@@ -942,6 +942,12 @@ void TaskManifestFile::setLiveBoxInfo(Manifest& manifest)
                 box.boxMouseEvent = L"false";
             }
 
+            if (ConfigInfo->m_boxInfo.m_boxTouchEffect == L"true") {
+                box.boxTouchEffect = ConfigInfo->m_boxInfo.m_boxTouchEffect;
+            } else {
+                box.boxTouchEffect= L"false";
+            }
+
             std::list<std::pair<DPL::String, DPL::String> > BoxSizeList
                 = ConfigInfo->m_boxInfo.m_boxSize;
             FOREACH(im, BoxSizeList) {
index 0418ce8..9047aae 100644 (file)
@@ -20,7 +20,7 @@
  * @brief   Implementation file for uninstaller task database updating
  */
 
-#include <web-provider-info.h>
+#include <web_provider_livebox_info.h>
 #include <widget_uninstall/task_db_update.h>
 #include <widget_uninstall/job_widget_uninstall.h>
 #include <widget_uninstall/widget_uninstall_errors.h>
@@ -73,7 +73,7 @@ void TaskDbUpdate::StepDbUpdate()
 void TaskDbUpdate::StepLiveboxDBDelete()
 {
     int ret =
-        web_provider_info_delete_by_app_id(m_context.tzAppid.c_str());
+        web_provider_livebox_delete_by_app_id(m_context.tzAppid.c_str());
 
     if (ret < 0) {
         LogDebug("failed to delete box info");