Add app type handler for widget-application 13/87713/1 accepted/tizen/common/20160920.131851 accepted/tizen/ivi/20160920.231602 accepted/tizen/mobile/20160920.231509 accepted/tizen/tv/20160920.231526 accepted/tizen/wearable/20160920.231543 submit/tizen/20160920.011443
authorJunghoon Park <jh9216.park@samsung.com>
Fri, 9 Sep 2016 07:22:31 +0000 (16:22 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Fri, 9 Sep 2016 07:22:31 +0000 (16:22 +0900)
- The attribute 'type' should be added in the element 'widget-application' because of c# widget app.
- The app type of widget application for c# would be "dotnet".

Change-Id: I80d2443ee6bb28fb6fea86309267cef20e67d1d6
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/tpk_manifest_handlers/widget_application_handler.cc
src/tpk_manifest_handlers/widget_application_handler.h

index b417e9fd0b976a376627cc30d6c86e16e25248f7..40c93d5c7c5e5d000ad9dfe4d629bc5c29e0b76d 100644 (file)
@@ -37,6 +37,7 @@ const char kWidgetApplicationMultipleKey[] = "@multiple";
 const char kWidgetApplicationNoDisplayKey[] = "@nodisplay";
 const char kWidgetApplicationHwAccelerationKey[] = "@hwacceleration";
 const char kWidgetApplicationKey[] = "manifest.widget-application";
+const char kWidgetApplicationTypeKey[] = "@type";
 
 const char kTrue[] = "true";
 const char kFalse[] = "false";
@@ -166,6 +167,9 @@ bool ParseWidgetApplicationAndStore(
   std::string nodisplay;
   if (app_dict.GetString(kWidgetApplicationNoDisplayKey, &nodisplay))
     widgetapplicationinfo->app_info.set_nodisplay(nodisplay);
+  std::string type;
+  if (app_dict.GetString(kWidgetApplicationTypeKey, &type))
+    widgetapplicationinfo->app_info.set_type(type);
 
   std::string launch_mode;
   if (app_dict.GetString(kWidgetApplicationLaunchModeKey, &launch_mode)) {
@@ -194,7 +198,8 @@ bool ParseWidgetApplicationAndStore(
 WidgetApplicationInfo::WidgetApplicationInfo()
     : multiple_("false"),
       nodisplay_("false"),
-      hwacceleration_("default") {
+      hwacceleration_("default"),
+      type_("capp") {
 }
 
 bool WidgetApplicationHandler::Parse(
index 6a03ef2306a13fc9af73f07280bf61c0fe6bdf4a..1b6efc04c44b132c3de54786e17dfa575e2dc41b 100644 (file)
@@ -50,6 +50,14 @@ class WidgetApplicationInfo : public ApplicationInfo {
     hwacceleration_ = std::move(hwacceleration);
   }
 
+  /**
+   * @brief set_launch_mode sets launch mdoe
+   * @param launch_mode
+   */
+  void set_type(std::string type) {
+    type_ = std::move(type);
+  }
+
   /**
    * @brief launch_mode
    * @return launch mode string
@@ -76,11 +84,17 @@ class WidgetApplicationInfo : public ApplicationInfo {
     return hwacceleration_;
   }
 
+  const std::string& type() const {
+    return type_;
+  }
+
  private:
   std::string launch_mode_;
   std::string multiple_;
   std::string nodisplay_;
   std::string hwacceleration_;
+  std::string type_;
+
 };
 
 struct WidgetApplicationSingleEntry :