Fixed wrt-launcher -l
authorSoyoung Kim <sy037.kim@samsung.com>
Thu, 21 Feb 2013 10:40:29 +0000 (19:40 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 21 Feb 2013 10:52:01 +0000 (19:52 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Fixed wrt-launcher list
[SCMRequest] N/A

src/wrt-launcher/wrt-launcher.cpp

index 714c4d2..16f8d00 100644 (file)
@@ -68,7 +68,9 @@ typedef struct
                          * (read from its config.xml during installation)*/
     char* version;      /**< the widget's varsion
                          * (read from its config.xml during installation)*/
-    char* pkg_name;     /**< the widget's pkg name */
+    char* pkg_id;       /**< the widget's pkg id */
+
+    char* app_id;
 } widget_info;
 
 static void free_widget_info(widget_info* widget_info)
@@ -77,7 +79,8 @@ static void free_widget_info(widget_info* widget_info)
         delete[] widget_info->guid;
         delete[] widget_info->name;
         delete[] widget_info->version;
-        delete[] widget_info->pkg_name;
+        delete[] widget_info->pkg_id;
+        delete[] widget_info->app_id;
         delete widget_info;
     }
 }
@@ -114,10 +117,10 @@ static bool display_widget_info()
     WidgetDAOReadOnlyList widgetList =
         WrtDB::WidgetDAOReadOnly::getWidgetList();
 
-    printf("%3s %32s %16s %64s %16s\n",
-           "No", "Name", "Version", "GUID", "Package Name");
-    printf("%3s %32s %16s %64s %16s\n",
-           "--", "--", "----", "-------", "----");
+    printf("%3s %32s %16s %64s %16s %24s\n",
+           "No", "Name", "Version", "GUID", "Package ID", "App ID");
+    printf("%3s %32s %16s %64s %16s %24s\n",
+           "--", "--", "----", "-------", "-----", "-----");
 
     int number = 1;
     FOREACH(dao, widgetList) {
@@ -126,7 +129,9 @@ static bool display_widget_info()
 
         WrtDB::WidgetGUID guid = (*dao)->getGUID();
         DPL::Optional<DPL::String> version = (*dao)->getVersion();
-        WrtDB::WidgetPkgName package_name = (*dao)->getPkgName();
+        WrtDB::TizenAppId appid = (*dao)->getTzAppId();
+        WrtDB::TizenPkgId pkgid = (*dao)->getTizenPkgId();
+
 
         /*get WidgetName*/
         DPL::Optional<DPL::String> widget_name;
@@ -156,14 +161,16 @@ static bool display_widget_info()
             info->guid = new_strdup(DPL::ToUTF8String(*guid).c_str());
         }
 
-        info->pkg_name = new_strdup(DPL::ToUTF8String(package_name).c_str());
+        info->app_id = new_strdup(DPL::ToUTF8String(appid).c_str());
+        info->pkg_id = new_strdup(DPL::ToUTF8String(pkgid).c_str());
 
-        printf("%3i %32s %16s %64s %16s\n",
+        printf("%3i %32s %16s %64s %16s %24s\n",
                number++,
                !info->name ? "[NULL]" : info->name,
                !info->version ? "[NULL]" : info->version,
                !info->guid ? "[NULL]" : info->guid,
-               !info->pkg_name ? "[NULL]" : info->pkg_name);
+               !info->pkg_id ? "[NULL]" : info->pkg_id,
+               !info->app_id ? "[NULL]" : info->app_id);
 
         free_widget_info(info);
     }