[gnome-software] Use the new symbol in appstream-glib



commit 7def80dc8fe7002531e69d24d694a8b16429522b
Author: Richard Hughes <richard hughsie com>
Date:   Thu Feb 25 20:51:08 2016 +0000

    Use the new symbol in appstream-glib
    
    This is the first step to de-duplicating the GsAppKind and AsAppKind.

 configure.ac                               |    2 +-
 src/gs-app-row.c                           |   10 +++++-----
 src/gs-app.c                               |   16 ++++++++--------
 src/gs-app.h                               |    4 ++--
 src/gs-page.c                              |    2 +-
 src/gs-plugin-loader.c                     |    2 +-
 src/gs-shell-details.c                     |   14 +++++++-------
 src/gs-shell-installed.c                   |   14 +++++++-------
 src/gs-sources-dialog.c                    |   12 ++++++------
 src/gs-update-list.c                       |   14 +++++++-------
 src/gs-utils.c                             |    4 ++--
 src/plugins/gs-plugin-appstream.c          |   12 ++++++------
 src/plugins/gs-plugin-dummy.c              |   12 ++++++------
 src/plugins/gs-plugin-epiphany.c           |    4 ++--
 src/plugins/gs-plugin-fwupd.c              |    4 ++--
 src/plugins/gs-plugin-limba.c              |    2 +-
 src/plugins/gs-plugin-packagekit-refine.c  |    8 ++++----
 src/plugins/gs-plugin-packagekit-refresh.c |    2 +-
 src/plugins/gs-plugin-xdg-app-reviews.c    |    4 ++--
 src/plugins/gs-plugin-xdg-app.c            |    8 ++++----
 20 files changed, 75 insertions(+), 75 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b51f118..6206126 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ dnl ---------------------------------------------------------------------------
 dnl - Check library dependencies
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.18.2 gio-unix-2.0 gtkspell3-3.0)
-PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.5.5)
+PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.5.10)
 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.31.5)
 PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0)
 PKG_CHECK_MODULES(SQLITE, sqlite3)
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 749ccf2..553c1ba 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -168,12 +168,12 @@ gs_app_row_refresh (GsAppRow *app_row)
                gtk_widget_set_visible (priv->label_tag_foreign, FALSE);
        } else {
                switch (gs_app_get_id_kind (priv->app)) {
-               case AS_ID_KIND_UNKNOWN:
+               case AS_APP_KIND_UNKNOWN:
                        gtk_widget_set_visible (priv->label_tag_webapp, FALSE);
                        gtk_widget_set_visible (priv->label_tag_nonfree, FALSE);
                        gtk_widget_set_visible (priv->label_tag_foreign, FALSE);
                        break;
-               case AS_ID_KIND_WEB_APP:
+               case AS_APP_KIND_WEB_APP:
                        gtk_widget_set_visible (priv->label_tag_webapp, TRUE);
                        gtk_widget_set_visible (priv->label_tag_nonfree, FALSE);
                        gtk_widget_set_visible (priv->label_tag_foreign, FALSE);
@@ -335,9 +335,9 @@ gs_app_row_refresh (GsAppRow *app_row)
        }
 
        if (priv->selectable) {
-               if (gs_app_get_id_kind (priv->app) == AS_ID_KIND_DESKTOP ||
-                   gs_app_get_id_kind (priv->app) == AS_ID_KIND_RUNTIME ||
-                   gs_app_get_id_kind (priv->app) == AS_ID_KIND_WEB_APP)
+               if (gs_app_get_id_kind (priv->app) == AS_APP_KIND_DESKTOP ||
+                   gs_app_get_id_kind (priv->app) == AS_APP_KIND_RUNTIME ||
+                   gs_app_get_id_kind (priv->app) == AS_APP_KIND_WEB_APP)
                        gtk_widget_set_visible (priv->checkbox, TRUE);
                gtk_widget_set_sensitive (priv->button, FALSE);
        } else {
diff --git a/src/gs-app.c b/src/gs-app.c
index 99cd994..a13fa1a 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -87,7 +87,7 @@ struct _GsApp
        GPtrArray               *reviews; /* of GsReview */
        guint64                  size;
        GsAppKind                kind;
-       AsIdKind                 id_kind;
+       AsAppKind                id_kind;
        AsAppState               state;
        guint                    progress;
        GHashTable              *metadata;
@@ -176,9 +176,9 @@ gs_app_to_string (GsApp *app)
        str = g_string_new ("GsApp:\n");
        g_string_append_printf (str, "\tkind:\t%s\n",
                                gs_app_kind_to_string (app->kind));
-       if (app->id_kind != AS_ID_KIND_UNKNOWN) {
+       if (app->id_kind != AS_APP_KIND_UNKNOWN) {
                g_string_append_printf (str, "\tid-kind:\t%s\n",
-                                       as_id_kind_to_string (app->id_kind));
+                                       as_app_kind_to_string (app->id_kind));
        }
        g_string_append_printf (str, "\tstate:\t%s\n",
                                as_app_state_to_string (app->state));
@@ -656,7 +656,7 @@ gs_app_set_kind (GsApp *app, GsAppKind kind)
 /**
  * gs_app_get_id_kind:
  */
-AsIdKind
+AsAppKind
 gs_app_get_id_kind (GsApp *app)
 {
        g_return_val_if_fail (GS_IS_APP (app), GS_APP_KIND_UNKNOWN);
@@ -667,7 +667,7 @@ gs_app_get_id_kind (GsApp *app)
  * gs_app_set_id_kind:
  */
 void
-gs_app_set_id_kind (GsApp *app, AsIdKind id_kind)
+gs_app_set_id_kind (GsApp *app, AsAppKind id_kind)
 {
        g_return_if_fail (GS_IS_APP (app));
        app->id_kind = id_kind;
@@ -861,11 +861,11 @@ gs_app_set_project_group (GsApp *app, const gchar *project_group)
 static gboolean
 gs_app_is_addon_id_kind (GsApp *app)
 {
-       AsIdKind id_kind;
+       AsAppKind id_kind;
        id_kind = gs_app_get_id_kind (app);
-       if (id_kind == AS_ID_KIND_DESKTOP)
+       if (id_kind == AS_APP_KIND_DESKTOP)
                return FALSE;
-       if (id_kind == AS_ID_KIND_WEB_APP)
+       if (id_kind == AS_APP_KIND_WEB_APP)
                return FALSE;
        return TRUE;
 }
diff --git a/src/gs-app.h b/src/gs-app.h
index 97d9c9f..c88eb16 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -103,9 +103,9 @@ const gchar *gs_app_get_id_no_prefix        (GsApp          *app);
 GsAppKind       gs_app_get_kind                (GsApp          *app);
 void            gs_app_set_kind                (GsApp          *app,
                                                 GsAppKind       kind);
-AsIdKind        gs_app_get_id_kind             (GsApp          *app);
+AsAppKind       gs_app_get_id_kind             (GsApp          *app);
 void            gs_app_set_id_kind             (GsApp          *app,
-                                                AsIdKind        id_kind);
+                                                AsAppKind       id_kind);
 AsAppState      gs_app_get_state               (GsApp          *app);
 void            gs_app_set_state               (GsApp          *app,
                                                 AsAppState      state);
diff --git a/src/gs-page.c b/src/gs-page.c
index bf79568..8a772d1 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -174,7 +174,7 @@ gs_page_update_app (GsPage *page, GsApp *app)
        g_autofree gchar *escaped = NULL;
 
        /* non-firmware applications do not have to be prepared */
-       if (gs_app_get_id_kind (app) != AS_ID_KIND_FIRMWARE) {
+       if (gs_app_get_id_kind (app) != AS_APP_KIND_FIRMWARE) {
                gs_page_update_app_real (page, app);
                return;
        }
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 5fae8e6..670b570 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1543,7 +1543,7 @@ gs_plugin_loader_convert_unavailable (GList *list, const gchar *search)
                        continue;
                if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
                        continue;
-               if (gs_app_get_id_kind (app) != AS_ID_KIND_CODEC)
+               if (gs_app_get_id_kind (app) != AS_APP_KIND_CODEC)
                        continue;
                if (gs_app_get_url (app, AS_URL_KIND_MISSING) == NULL)
                        continue;
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 97262e1..f172371 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -235,8 +235,8 @@ gs_shell_details_switch_to (GsShellDetails *self)
        case AS_APP_STATE_INSTALLED:
        case AS_APP_STATE_UPDATABLE:
        case AS_APP_STATE_UPDATABLE_LIVE:
-               if (gs_app_get_id_kind (self->app) == AS_ID_KIND_DESKTOP ||
-                   gs_app_get_id_kind (self->app) == AS_ID_KIND_WEB_APP) {
+               if (gs_app_get_id_kind (self->app) == AS_APP_KIND_DESKTOP ||
+                   gs_app_get_id_kind (self->app) == AS_APP_KIND_WEB_APP) {
                        gtk_widget_set_visible (self->button_details_launch, TRUE);
                } else {
                        gtk_widget_set_visible (self->button_details_launch, FALSE);
@@ -420,7 +420,7 @@ gs_shell_details_refresh_screenshots (GsShellDetails *self)
        guint i;
 
        /* treat screenshots differently */
-       if (gs_app_get_id_kind (self->app) == AS_ID_KIND_FONT) {
+       if (gs_app_get_id_kind (self->app) == AS_APP_KIND_FONT) {
                gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_thumbnails));
                gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_main));
                screenshots = gs_app_get_screenshots (self->app);
@@ -727,7 +727,7 @@ gs_shell_details_refresh_all (GsShellDetails *self)
 
        /* set the rating */
        switch (gs_app_get_id_kind (self->app)) {
-       case AS_ID_KIND_WEB_APP:
+       case AS_APP_KIND_WEB_APP:
                gtk_widget_set_visible (self->star, FALSE);
                break;
        default:
@@ -791,7 +791,7 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        gs_shell_details_set_sensitive (self->label_details_kudo_integration, ret);
 
        /* set the tags buttons */
-       if (gs_app_get_id_kind (self->app) == AS_ID_KIND_WEB_APP) {
+       if (gs_app_get_id_kind (self->app) == AS_APP_KIND_WEB_APP) {
                gtk_widget_set_visible (self->label_details_tag_webapp, TRUE);
                gtk_widget_set_visible (self->label_details_tag_nonfree, FALSE);
                gtk_widget_set_visible (self->label_details_tag_3rdparty, FALSE);
@@ -848,7 +848,7 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        /* make history button insensitive if there is none */
        history = gs_app_get_history (self->app);
        switch (gs_app_get_id_kind (self->app)) {
-       case AS_ID_KIND_WEB_APP:
+       case AS_APP_KIND_WEB_APP:
                gtk_widget_set_visible (self->button_history, FALSE);
                break;
        default:
@@ -898,7 +898,7 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        switch (gs_app_get_kind (self->app)) {
        case GS_APP_KIND_NORMAL:
        case GS_APP_KIND_SYSTEM:
-               if (gs_app_get_id_kind (self->app) == AS_ID_KIND_FIRMWARE) {
+               if (gs_app_get_id_kind (self->app) == AS_APP_KIND_FIRMWARE) {
                        gtk_widget_set_visible (self->infobar_details_app_norepo, FALSE);
                } else {
                        gtk_widget_set_visible (self->infobar_details_app_norepo,
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index f0885a3..0353092 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -329,11 +329,11 @@ gs_shell_installed_get_app_sort_key (GsApp *app)
 
        /* sort desktop files, then addons */
        switch (gs_app_get_id_kind (app)) {
-       case AS_ID_KIND_DESKTOP:
-       case AS_ID_KIND_WEB_APP:
+       case AS_APP_KIND_DESKTOP:
+       case AS_APP_KIND_WEB_APP:
                g_string_append (key, "1:");
                break;
-       case AS_ID_KIND_RUNTIME:
+       case AS_APP_KIND_RUNTIME:
                g_string_append (key, "2:");
                break;
        default:
@@ -394,11 +394,11 @@ gs_shell_installed_sort_func (GtkListBoxRow *a,
 static gboolean
 gs_shell_installed_is_addon_id_kind (GsApp *app)
 {
-       AsIdKind id_kind;
+       AsAppKind id_kind;
        id_kind = gs_app_get_id_kind (app);
-       if (id_kind == AS_ID_KIND_DESKTOP)
+       if (id_kind == AS_APP_KIND_DESKTOP)
                return FALSE;
-       if (id_kind == AS_ID_KIND_WEB_APP)
+       if (id_kind == AS_APP_KIND_WEB_APP)
                return FALSE;
        return TRUE;
 }
@@ -406,7 +406,7 @@ gs_shell_installed_is_addon_id_kind (GsApp *app)
 static gboolean
 gs_shell_installed_is_system_application (GsApp *app)
 {
-       if (gs_app_get_id_kind (app) == AS_ID_KIND_DESKTOP &&
+       if (gs_app_get_id_kind (app) == AS_APP_KIND_DESKTOP &&
            gs_app_get_kind (app) == GS_APP_KIND_SYSTEM)
                return TRUE;
        return FALSE;
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index 9711078..7c6ba41 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -73,14 +73,14 @@ add_source (GtkListBox *listbox, GsApp *app)
        for (i = 0; i < related->len; i++) {
                GsApp *app_tmp = g_ptr_array_index (related, i);
                switch (gs_app_get_id_kind (app_tmp)) {
-               case AS_ID_KIND_WEB_APP:
-               case AS_ID_KIND_DESKTOP:
+               case AS_APP_KIND_WEB_APP:
+               case AS_APP_KIND_DESKTOP:
                        cnt_apps++;
                        break;
-               case AS_ID_KIND_FONT:
-               case AS_ID_KIND_CODEC:
-               case AS_ID_KIND_INPUT_METHOD:
-               case AS_ID_KIND_ADDON:
+               case AS_APP_KIND_FONT:
+               case AS_APP_KIND_CODEC:
+               case AS_APP_KIND_INPUT_METHOD:
+               case AS_APP_KIND_ADDON:
                        cnt_addon++;
                        break;
                default:
diff --git a/src/gs-update-list.c b/src/gs-update-list.c
index 4fa7c17..743fc11 100644
--- a/src/gs-update-list.c
+++ b/src/gs-update-list.c
@@ -95,15 +95,15 @@ gs_update_list_get_apps (GsUpdateList *update_list)
 static gboolean
 is_addon_id_kind (GsApp *app)
 {
-       AsIdKind id_kind;
+       AsAppKind id_kind;
        id_kind = gs_app_get_id_kind (app);
-       if (id_kind == AS_ID_KIND_DESKTOP)
+       if (id_kind == AS_APP_KIND_DESKTOP)
                return FALSE;
-       if (id_kind == AS_ID_KIND_WEB_APP)
+       if (id_kind == AS_APP_KIND_WEB_APP)
                return FALSE;
-       if (id_kind == AS_ID_KIND_FIRMWARE)
+       if (id_kind == AS_APP_KIND_FIRMWARE)
                return FALSE;
-       if (id_kind == AS_ID_KIND_RUNTIME)
+       if (id_kind == AS_APP_KIND_RUNTIME)
                return FALSE;
        return TRUE;
 }
@@ -157,10 +157,10 @@ get_app_sort_key (GsApp *app)
 
        /* sort desktop files, then addons */
        switch (gs_app_get_id_kind (app)) {
-       case AS_ID_KIND_FIRMWARE:
+       case AS_APP_KIND_FIRMWARE:
                g_string_append (key, "1:");
                break;
-       case AS_ID_KIND_DESKTOP:
+       case AS_APP_KIND_DESKTOP:
                g_string_append (key, "2:");
                break;
        default:
diff --git a/src/gs-utils.c b/src/gs-utils.c
index 9597e7f..f494a43 100644
--- a/src/gs-utils.c
+++ b/src/gs-utils.c
@@ -139,7 +139,7 @@ gs_app_notify_installed (GsApp *app)
         * has been successfully installed */
        summary = g_strdup_printf (_("%s is now installed"), gs_app_get_name (app));
        n = g_notification_new (summary);
-       if (gs_app_get_id_kind (app) == AS_ID_KIND_DESKTOP) {
+       if (gs_app_get_id_kind (app) == AS_APP_KIND_DESKTOP) {
                /* TRANSLATORS: this is button that opens the newly installed application */
                g_notification_add_button_with_target (n, _("Launch"),
                                                       "app.launch", "s",
@@ -294,7 +294,7 @@ gs_app_notify_unavailable (GsApp *app, GtkWindow *parent)
        /* be aware of patent clauses */
        if (hint & GS_APP_LICENCE_PATENT_CONCERN) {
                g_string_append (body, "\n\n");
-               if (gs_app_get_id_kind (app) != AS_ID_KIND_CODEC) {
+               if (gs_app_get_id_kind (app) != AS_APP_KIND_CODEC) {
                        g_string_append_printf (body,
                                                /* TRANSLATORS: Laws are geographical, urgh... */
                                                _("It may be illegal to install "
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index f1e063a..d4dfe3b 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -497,7 +497,7 @@ gs_plugin_appstream_create_runtime (GsApp *parent, const gchar *runtime)
        app = gs_app_new (id);
        source = g_strdup_printf ("runtime/%s", runtime);
        gs_app_add_source (app, source);
-       gs_app_set_id_kind (app, AS_ID_KIND_RUNTIME);
+       gs_app_set_id_kind (app, AS_APP_KIND_RUNTIME);
        gs_app_set_version (app, id_split[2]);
 
        return g_steal_pointer (&app);
@@ -568,7 +568,7 @@ gs_plugin_refine_item (GsPlugin *plugin, GsApp *app, AsApp *item, GError **error
        /* is an app */
        if (gs_app_get_kind (app) == GS_APP_KIND_UNKNOWN ||
            gs_app_get_kind (app) == GS_APP_KIND_PACKAGE) {
-               if (as_app_get_id_kind (item) == AS_ID_KIND_SOURCE) {
+               if (as_app_get_kind (item) == AS_APP_KIND_SOURCE) {
                        gs_app_set_kind (app, GS_APP_KIND_SOURCE);
                } else {
                        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
@@ -683,8 +683,8 @@ gs_plugin_refine_item (GsPlugin *plugin, GsApp *app, AsApp *item, GError **error
                gs_app_set_kind (app, GS_APP_KIND_SYSTEM);
 
        /* set id kind */
-       if (gs_app_get_id_kind (app) == AS_ID_KIND_UNKNOWN)
-               gs_app_set_id_kind (app, as_app_get_id_kind (item));
+       if (gs_app_get_id_kind (app) == AS_APP_KIND_UNKNOWN)
+               gs_app_set_id_kind (app, as_app_get_kind (item));
 
        /* copy all the metadata */
        gs_plugin_appstream_copy_metadata (app, item);
@@ -850,8 +850,8 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
                g_autoptr(GsApp) app = NULL;
                item = g_ptr_array_index (array, i);
 
-               // FIXME: AS_ID_KIND_DISTRO_UPGRADE
-               if (as_app_get_id_kind (item) != AS_ID_KIND_UNKNOWN)
+               // FIXME: AS_APP_KIND_DISTRO_UPGRADE
+               if (as_app_get_kind (item) != AS_APP_KIND_UNKNOWN)
                        continue;
                if (as_app_get_metadata_item (item, "X-IsUpgrade") == NULL)
                        continue;
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index 02a84df..df5c287 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -74,7 +74,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Boxes");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Do not segfault when using newer versons of 
libvirt.");
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
        g_object_unref (app);
 
@@ -83,7 +83,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "libvirt-glib-devel");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Fix several memory leaks.");
        gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
        g_object_unref (app);
 
@@ -92,7 +92,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "gnome-boxes-libs");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Do not segfault when using newer versons of 
libvirt.");
        gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
        g_object_unref (app);
 
@@ -114,7 +114,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        gs_plugin_add_app (list, app);
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
 
        return TRUE;
 }
@@ -134,7 +134,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        gs_plugin_add_app (list, app);
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
 
        return TRUE;
 }
@@ -234,7 +234,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
        gs_app_set_pixbuf (app, gdk_pixbuf_new_from_file 
("/usr/share/icons/hicolor/48x48/apps/gnome-boxes.png", NULL));
-       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
        return TRUE;
 }
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index a954a73..ff20553 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -116,7 +116,7 @@ gs_plugin_app_install (GsPlugin *plugin, GsApp *app,
        g_autoptr(GFile) symlink_icon = NULL;
 
        /* only process web apps */
-       if (gs_app_get_id_kind (app) != AS_ID_KIND_WEB_APP)
+       if (gs_app_get_id_kind (app) != AS_APP_KIND_WEB_APP)
                return TRUE;
 
        /* create the correct directory */
@@ -303,7 +303,7 @@ gs_plugin_refine (GsPlugin *plugin,
 
        for (l = *list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               if (gs_app_get_id_kind (app) != AS_ID_KIND_WEB_APP)
+               if (gs_app_get_id_kind (app) != AS_APP_KIND_WEB_APP)
                        continue;
                gs_app_set_size (app, 4096);
                tmp = gs_app_get_source_id_default (app);
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index 43acecf..01d51f9 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -362,7 +362,7 @@ gs_plugin_add_update_app (GsPlugin *plugin,
 
        /* actually add the application */
        gs_app_set_management_plugin (app, "fwupd");
-       gs_app_set_id_kind (app, AS_ID_KIND_FIRMWARE);
+       gs_app_set_id_kind (app, AS_APP_KIND_FIRMWARE);
        gs_app_add_source_id (app, filename_cache);
        gs_app_add_category (app, "System");
        gs_app_set_kind (app, GS_APP_KIND_FIRMWARE_UPDATE);
@@ -1079,7 +1079,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
 
        /* get results */
        app = gs_app_new (NULL);
-       gs_app_set_id_kind (app, AS_ID_KIND_FIRMWARE);
+       gs_app_set_id_kind (app, AS_APP_KIND_FIRMWARE);
        gs_app_set_management_plugin (app, "fwupd");
        gs_app_set_kind (app, GS_APP_KIND_FIRMWARE_UPDATE);
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
diff --git a/src/plugins/gs-plugin-limba.c b/src/plugins/gs-plugin-limba.c
index be191d2..b9d3ff5 100644
--- a/src/plugins/gs-plugin-limba.c
+++ b/src/plugins/gs-plugin-limba.c
@@ -364,7 +364,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
                         * In any other case, the Limba bundle name equals the AppStream ID of the component 
it contains */
                        tmp = g_strdup_printf ("%s.desktop", li_pkg_info_get_name (old_pki));
                        app = gs_app_new (tmp);
-                       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+                       gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
                } else {
                        app = gs_app_new (li_pkg_info_get_name (old_pki));
                }
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 6947d76..14372e3 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -661,7 +661,7 @@ gs_plugin_refine_require_details (GsPlugin *plugin,
        ptask = as_profile_start_literal (plugin->profile, "packagekit-refine[source->licence]");
        for (l = list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               if (gs_app_get_id_kind (app) == AS_ID_KIND_WEB_APP)
+               if (gs_app_get_id_kind (app) == AS_APP_KIND_WEB_APP)
                        continue;
                if (g_strcmp0 (gs_app_get_management_plugin (app), "PackageKit") != 0)
                        continue;
@@ -833,7 +833,7 @@ gs_plugin_refine (GsPlugin *plugin,
        ptask = as_profile_start_literal (plugin->profile, "packagekit-refine[name->id]");
        for (l = *list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               if (gs_app_get_id_kind (app) == AS_ID_KIND_WEB_APP)
+               if (gs_app_get_id_kind (app) == AS_APP_KIND_WEB_APP)
                        continue;
                if (g_strcmp0 (gs_app_get_management_plugin (app), "PackageKit") != 0)
                        continue;
@@ -873,10 +873,10 @@ gs_plugin_refine (GsPlugin *plugin,
                if (tmp == NULL)
                        continue;
                switch (gs_app_get_id_kind (app)) {
-               case AS_ID_KIND_DESKTOP:
+               case AS_APP_KIND_DESKTOP:
                        fn = g_strdup_printf ("/usr/share/applications/%s", tmp);
                        break;
-               case AS_ID_KIND_ADDON:
+               case AS_APP_KIND_ADDON:
                        fn = g_strdup_printf ("/usr/share/appdata/%s.metainfo.xml", tmp);
                        break;
                default:
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index 76b0cf9..4b424d0 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -288,7 +288,7 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin,
                                g_autofree gchar *basename = g_path_get_basename (fns[j]);
                                gs_app_set_id (app, basename);
                                gs_app_set_kind (app, GS_APP_KIND_NORMAL);
-                               gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+                               gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
                                break;
                        }
                }
diff --git a/src/plugins/gs-plugin-xdg-app-reviews.c b/src/plugins/gs-plugin-xdg-app-reviews.c
index 7d57c57..45be4c3 100644
--- a/src/plugins/gs-plugin-xdg-app-reviews.c
+++ b/src/plugins/gs-plugin-xdg-app-reviews.c
@@ -684,7 +684,7 @@ gs_plugin_refine (GsPlugin *plugin,
                                continue;
                        if (gs_app_get_id_no_prefix (app) == NULL)
                                continue;
-                       if (gs_app_get_id_kind (app) == AS_ID_KIND_ADDON)
+                       if (gs_app_get_id_kind (app) == AS_APP_KIND_ADDON)
                                continue;
                        if (!gs_plugin_refine_reviews (plugin, app,
                                                       cancellable,
@@ -704,7 +704,7 @@ gs_plugin_refine (GsPlugin *plugin,
                                continue;
                        if (gs_app_get_id_no_prefix (app) == NULL)
                                continue;
-                       if (gs_app_get_id_kind (app) == AS_ID_KIND_ADDON)
+                       if (gs_app_get_id_kind (app) == AS_APP_KIND_ADDON)
                                continue;
                        if (!gs_plugin_refine_ratings (plugin, app,
                                                       cancellable,
diff --git a/src/plugins/gs-plugin-xdg-app.c b/src/plugins/gs-plugin-xdg-app.c
index 1ed19ec..e7d1ca1 100644
--- a/src/plugins/gs-plugin-xdg-app.c
+++ b/src/plugins/gs-plugin-xdg-app.c
@@ -403,11 +403,11 @@ gs_plugin_xdg_app_create_installed (GsPlugin *plugin,
 
        switch (xdg_app_ref_get_kind (XDG_APP_REF(xref))) {
        case XDG_APP_REF_KIND_APP:
-               gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
+               gs_app_set_id_kind (app, AS_APP_KIND_DESKTOP);
                break;
        case XDG_APP_REF_KIND_RUNTIME:
                gs_app_set_xdgapp_kind (app, XDG_APP_REF_KIND_RUNTIME);
-               gs_app_set_id_kind (app, AS_ID_KIND_RUNTIME);
+               gs_app_set_id_kind (app, AS_APP_KIND_RUNTIME);
                gs_app_set_name (app, GS_APP_QUALITY_NORMAL,
                                 xdg_app_ref_get_name (XDG_APP_REF (xref)));
                gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
@@ -1011,7 +1011,7 @@ gs_plugin_refine_item_runtime (GsPlugin *plugin,
        app_runtime = gs_app_new (runtime);
        source = g_strdup_printf ("runtime/%s", runtime);
        gs_app_add_source (app_runtime, source);
-       gs_app_set_id_kind (app_runtime, AS_ID_KIND_RUNTIME);
+       gs_app_set_id_kind (app_runtime, AS_APP_KIND_RUNTIME);
        gs_app_set_runtime (app, app_runtime);
        return TRUE;
 }
@@ -1277,7 +1277,7 @@ gs_plugin_app_install (GsPlugin *plugin,
        gs_app_set_state (app, AS_APP_STATE_INSTALLING);
 
        /* install required runtime if not already installed */
-       if (gs_app_get_id_kind (app) == AS_ID_KIND_DESKTOP) {
+       if (gs_app_get_id_kind (app) == AS_APP_KIND_DESKTOP) {
                GsApp *runtime;
                runtime = gs_app_get_runtime (app);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]