Add support for watch-application to pkgmgr-parser
[platform/core/appfw/pkgmgr-info.git] / src / pkgmgrinfo_appinfo.c
index ad98138..15383a0 100644 (file)
@@ -491,7 +491,7 @@ static int _appinfo_get_splashscreens(sqlite3 *db, const char *appid,
                GList **splashscreens)
 {
        static const char query_raw[] =
-               "SELECT src, type, orientation, indicatordisplay "
+               "SELECT src, type, orientation, indicatordisplay, operation "
                "FROM package_app_splash_screen WHERE app_id=%Q";
        int ret;
        char *query;
@@ -524,6 +524,7 @@ static int _appinfo_get_splashscreens(sqlite3 *db, const char *appid,
                _save_column_str(stmt, idx++, &info->type);
                _save_column_str(stmt, idx++, &info->orientation);
                _save_column_str(stmt, idx++, &info->indicatordisplay);
+               _save_column_str(stmt, idx++, &info->operation);
                *splashscreens = g_list_append(*splashscreens, info);
        }
 
@@ -961,6 +962,8 @@ static gpointer __copy_splashscreens(gconstpointer src, gpointer data)
                splashscreen->orientation = strdup(tmp->orientation);
        if (tmp->indicatordisplay)
                splashscreen->indicatordisplay = strdup(tmp->indicatordisplay);
+       if (tmp->operation)
+               splashscreen->operation = strdup(tmp->operation);
 
        return splashscreen;
 }
@@ -1506,10 +1509,14 @@ API int pkgmgrinfo_appinfo_get_localed_label(const char *appid, const char *loca
 
 static pkgmgrinfo_app_component __appcomponent_convert(const char *comp)
 {
-       if ( strcasecmp(comp, "uiapp") == 0)
+       if (strcasecmp(comp, "uiapp") == 0)
                return PMINFO_UI_APP;
-       else if ( strcasecmp(comp, "svcapp") == 0)
+       else if (strcasecmp(comp, "svcapp") == 0)
                return PMINFO_SVC_APP;
+       else if (strcasecmp(comp, "widgetapp") == 0)
+               return PMINFO_WIDGET_APP;
+       else if (strcasecmp(comp, "watchapp") == 0)
+               return PMINFO_WATCH_APP;
        else
                return -1;
 }
@@ -2134,6 +2141,7 @@ API int pkgmgrinfo_appinfo_foreach_splash_screen(pkgmgrinfo_appinfo_h handle,
                                splashscreen->type,
                                splashscreen->orientation,
                                splashscreen->indicatordisplay,
+                               splashscreen->operation,
                                user_data);
                if (ret < 0)
                        break;