[gnome-software/wip/mak/libas] Initial WIP




commit ee3f5f0ec531775d2889f94ff189dbfa7acf9c54
Author: Matthias Klumpp <matthias tenstral net>
Date:   Thu Jan 7 02:57:49 2021 +0100

    Initial WIP

 doc/api/gnome-software-docs.xml                    |   8 +-
 lib/gs-app-list-private.h                          |   2 +-
 lib/gs-app-list.c                                  |  30 +-
 lib/gs-app.c                                       | 305 ++++----
 lib/gs-app.h                                       |  52 +-
 lib/gs-cmd.c                                       |   2 +-
 lib/gs-plugin-event.c                              |  11 +-
 lib/gs-plugin-loader.c                             |  73 +-
 lib/gs-plugin-private.h                            |   2 +-
 lib/gs-plugin-vfuncs.h                             |  20 +-
 lib/gs-plugin.c                                    |   6 +-
 lib/gs-plugin.h                                    |   2 +-
 lib/gs-self-test.c                                 |  46 +-
 plugins/core/gs-appstream.c                        | 109 +--
 plugins/core/gs-plugin-appstream.c                 |  22 +-
 plugins/core/gs-plugin-generic-updates.c           |  10 +-
 plugins/core/gs-plugin-key-colors-metadata.c       |   2 +-
 plugins/core/gs-plugin-os-release.c                |   4 +-
 plugins/core/gs-self-test.c                        |  26 +-
 plugins/dpkg/gs-plugin-dpkg.c                      |   4 +-
 plugins/dummy/gs-plugin-dummy.c                    |  90 +--
 plugins/dummy/gs-self-test.c                       |  60 +-
 plugins/eos-updater/gs-plugin-eos-updater.c        |  54 +-
 .../fedora-langpacks/gs-plugin-fedora-langpacks.c  |   4 +-
 plugins/fedora-langpacks/gs-self-test.c            |   2 +-
 .../gs-plugin-fedora-pkgdb-collections.c           |  12 +-
 plugins/flatpak/gs-flatpak-transaction.c           |  38 +-
 plugins/flatpak/gs-flatpak-utils.c                 |   8 +-
 plugins/flatpak/gs-flatpak.c                       | 130 ++--
 plugins/flatpak/gs-flatpak.h                       |   2 +-
 plugins/flatpak/gs-plugin-flatpak.c                |  36 +-
 plugins/flatpak/gs-self-test.c                     | 196 +++---
 plugins/fwupd/gs-fwupd-app.c                       |   2 +-
 plugins/fwupd/gs-plugin-fwupd.c                    |  47 +-
 plugins/fwupd/gs-self-test.c                       |   4 +-
 plugins/malcontent/gs-plugin-malcontent.c          |  36 +-
 plugins/modalias/gs-plugin-modalias.c              |   8 +-
 plugins/modalias/gs-self-test.c                    |   2 +-
 plugins/odrs/gs-plugin-odrs.c                      |  26 +-
 plugins/packagekit/gs-plugin-packagekit-history.c  |  14 +-
 plugins/packagekit/gs-plugin-packagekit-local.c    |  10 +-
 plugins/packagekit/gs-plugin-packagekit-offline.c  |   8 +-
 .../packagekit/gs-plugin-packagekit-refine-repos.c |   2 +-
 plugins/packagekit/gs-plugin-packagekit-refine.c   |  22 +-
 plugins/packagekit/gs-plugin-packagekit-upgrade.c  |   8 +-
 .../packagekit/gs-plugin-packagekit-url-to-app.c   |   2 +-
 plugins/packagekit/gs-plugin-packagekit.c          |  54 +-
 plugins/packagekit/gs-plugin-systemd-updates.c     |   2 +-
 plugins/packagekit/packagekit-common.c             |  28 +-
 plugins/repos/gs-plugin-repos.c                    |   4 +-
 plugins/rpm-ostree/gs-plugin-rpm-ostree.c          |  92 +--
 plugins/snap/gs-plugin-snap.c                      |  34 +-
 plugins/snap/gs-self-test.c                        |   4 +-
 src/gs-app-addon-row.c                             |  30 +-
 src/gs-app-row.c                                   |  72 +-
 src/gs-application.c                               |   4 +-
 src/gs-common.c                                    |  28 +-
 src/gs-common.h                                    |   4 +-
 src/gs-content-rating.c                            | 784 ---------------------
 src/gs-content-rating.h                            |  76 --
 src/gs-css.c                                       |   4 +-
 src/gs-details-page.c                              | 185 +++--
 src/gs-extras-page.c                               |  18 +-
 src/gs-feature-tile.c                              |  12 +-
 src/gs-history-dialog.c                            |  12 +-
 src/gs-installed-page.c                            |  36 +-
 src/gs-origin-popover-row.c                        |  10 +-
 src/gs-overview-page.c                             |   4 +-
 src/gs-page.c                                      |  10 +-
 src/gs-popular-tile.c                              |  12 +-
 src/gs-removal-dialog.c                            |   2 +-
 src/gs-repo-row.c                                  |  16 +-
 src/gs-repos-dialog.c                              |  48 +-
 src/gs-search-page.c                               |  14 +-
 src/gs-shell-search-provider.c                     |  12 +-
 src/gs-summary-tile.c                              |  14 +-
 src/gs-third-party-repo-row.c                      |  26 +-
 src/gs-update-dialog.c                             |  32 +-
 src/gs-update-list.c                               |   2 +-
 src/gs-update-monitor.c                            |  10 +-
 src/gs-updates-page.c                              |  22 +-
 src/gs-updates-section.c                           |  30 +-
 src/gs-upgrade-banner.c                            |  24 +-
 src/meson.build                                    |   2 -
 84 files changed, 1244 insertions(+), 2088 deletions(-)
---
diff --git a/doc/api/gnome-software-docs.xml b/doc/api/gnome-software-docs.xml
index fb43ff23..61c0f164 100644
--- a/doc/api/gnome-software-docs.xml
+++ b/doc/api/gnome-software-docs.xml
@@ -203,8 +203,8 @@ gs_plugin_add_installed (GsPlugin *plugin,
   /* the trigger exists, so create a fake app */
   app = gs_app_new ("chiron.desktop");
   gs_app_set_management_plugin (app, "example");
-  gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-  gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+  gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+  gs_app_set_state (app, GS_APP_STATE_INSTALLED);
   gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Chiron");
   gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A teaching application");
   gs_app_set_description (app, GS_APP_QUALITY_NORMAL,
@@ -246,7 +246,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
           </listitem>
           <listitem>
             <para>
-              Most applications want a kind of <code>AS_APP_KIND_DESKTOP</code>
+              Most applications want a kind of <code>AS_COMPONENT_KIND_DESKTOP</code>
               to be visible as an application.
             </para>
           </listitem>
@@ -531,7 +531,7 @@ gs_plugin_refine (GsPlugin *plugin,
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-  if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
+  if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE)
     gs_app_set_management_plugin (app, "fwupd");
 }
           </programlisting>
diff --git a/lib/gs-app-list-private.h b/lib/gs-app-list-private.h
index ea92b131..ab357f41 100644
--- a/lib/gs-app-list-private.h
+++ b/lib/gs-app-list-private.h
@@ -73,7 +73,7 @@ gboolean       gs_app_list_has_flag           (GsAppList      *list,
                                                 GsAppListFlags  flag);
 void            gs_app_list_add_flag           (GsAppList      *list,
                                                 GsAppListFlags  flag);
-AsAppState      gs_app_list_get_state          (GsAppList      *list);
+GsAppState      gs_app_list_get_state          (GsAppList      *list);
 guint           gs_app_list_get_progress       (GsAppList      *list);
 
 G_END_DECLS
diff --git a/lib/gs-app-list.c b/lib/gs-app-list.c
index b459492e..d7fb4f72 100644
--- a/lib/gs-app-list.c
+++ b/lib/gs-app-list.c
@@ -32,7 +32,7 @@ struct _GsAppList
        GMutex                   mutex;
        guint                    size_peak;
        GsAppListFlags           flags;
-       AsAppState               state;
+       GsAppState               state;
        guint                    progress;  /* 0–100 inclusive, or %GS_APP_PROGRESS_UNKNOWN */
 };
 
@@ -60,14 +60,14 @@ static guint signals [SIGNAL_LAST] = { 0 };
  * This method will only return a valid result if gs_app_list_add_flag() has
  * been called with %GS_APP_LIST_FLAG_WATCH_APPS.
  *
- * Returns: the #AsAppState, e.g. %AS_APP_STATE_INSTALLED
+ * Returns: the #GsAppState, e.g. %GS_APP_STATE_INSTALLED
  *
  * Since: 3.30
  **/
-AsAppState
+GsAppState
 gs_app_list_get_state (GsAppList *list)
 {
-       g_return_val_if_fail (GS_IS_APP_LIST (list), AS_APP_STATE_UNKNOWN);
+       g_return_val_if_fail (GS_IS_APP_LIST (list), GS_APP_STATE_UNKNOWN);
        return list->state;
 }
 
@@ -169,15 +169,15 @@ gs_app_list_invalidate_progress (GsAppList *self)
 static void
 gs_app_list_invalidate_state (GsAppList *self)
 {
-       AsAppState state = AS_APP_STATE_UNKNOWN;
+       GsAppState state = GS_APP_STATE_UNKNOWN;
        g_autoptr(GPtrArray) apps = gs_app_list_get_watched (self);
 
        /* find any action state of the list */
        for (guint i = 0; i < apps->len; i++) {
                GsApp *app_tmp = g_ptr_array_index (apps, i);
-               AsAppState state_tmp = gs_app_get_state (app_tmp);
-               if (state_tmp == AS_APP_STATE_INSTALLING ||
-                   state_tmp == AS_APP_STATE_REMOVING) {
+               GsAppState state_tmp = gs_app_get_state (app_tmp);
+               if (state_tmp == GS_APP_STATE_INSTALLING ||
+                   state_tmp == GS_APP_STATE_REMOVING) {
                        state = state_tmp;
                        break;
                }
@@ -248,7 +248,7 @@ gs_app_list_lookup_safe (GsAppList *list, const gchar *unique_id)
 {
        for (guint i = 0; i < list->array->len; i++) {
                GsApp *app = g_ptr_array_index (list->array, i);
-               if (as_utils_unique_id_equal (gs_app_get_unique_id (app), unique_id))
+               if (as_utils_data_id_equal (gs_app_get_unique_id (app), unique_id))
                        return app;
        }
        return NULL;
@@ -743,10 +743,10 @@ gs_app_list_filter_app_get_keys (GsApp *app, GsAppListFilterFlags flags)
                GPtrArray *provides = gs_app_get_provides (app);
                g_ptr_array_add (keys, g_strdup (gs_app_get_id (app)));
                for (guint i = 0; i < provides->len; i++) {
-                       AsProvide *prov = g_ptr_array_index (provides, i);
-                       if (as_provide_get_kind (prov) != AS_PROVIDE_KIND_ID)
+                       AsProvided *prov = g_ptr_array_index (provides, i);
+                       if (as_provided_get_kind (prov) != AS_PROVIDED_KIND_ID)
                                continue;
-                       g_ptr_array_add (keys, g_strdup (as_provide_get_value (prov)));
+                       g_ptr_array_add (keys, g_strdup (as_provided_get_value (prov)));
                }
                return keys;
        }
@@ -927,9 +927,9 @@ gs_app_list_class_init (GsAppListClass *klass)
         * GsAppList:state:
         */
        pspec = g_param_spec_uint ("state", NULL, NULL,
-                                  AS_APP_STATE_UNKNOWN,
-                                  AS_APP_STATE_LAST,
-                                  AS_APP_STATE_UNKNOWN,
+                                  GS_APP_STATE_UNKNOWN,
+                                  GS_APP_STATE_LAST,
+                                  GS_APP_STATE_UNKNOWN,
                                   G_PARAM_READABLE);
        g_object_class_install_property (object_class, PROP_STATE, pspec);
 
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 95a59229..24fbd5fd 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -17,9 +17,9 @@
  *
  * This object represents a 1:1 mapping to a .desktop file. The design is such
  * so you can't have different GsApp's for different versions or architectures
- * of a package. This rule really only applies to GsApps of kind %AS_APP_KIND_DESKTOP
- * and %AS_APP_KIND_GENERIC. We allow GsApps of kind %AS_APP_KIND_OS_UPDATE or
- * %AS_APP_KIND_GENERIC, which don't correspond to desktop files, but instead
+ * of a package. This rule really only applies to GsApps of kind %AS_COMPONENT_KIND_DESKTOP
+ * and %AS_COMPONENT_KIND_GENERIC. We allow GsApps of kind %AS_COMPONENT_KIND_OS_UPDATE or
+ * %AS_COMPONENT_KIND_GENERIC, which don't correspond to desktop files, but instead
  * represent a system update and its individual components.
  *
  * The #GsPluginLoader de-duplicates the GsApp instances that are produced by
@@ -91,13 +91,13 @@ typedef struct
        gint                     rating;
        GArray                  *review_ratings;
        GPtrArray               *reviews; /* of AsReview */
-       GPtrArray               *provides; /* of AsProvide */
+       GPtrArray               *provides; /* of AsProvided */
        guint64                  size_installed;
        guint64                  size_download;
-       AsAppKind                kind;
-       AsAppState               state;
-       AsAppState               state_recover;
-       AsAppScope               scope;
+       AsComponentKind          kind;
+       GsAppState               state;
+       GsAppState               state_recover;
+       AsComponentScope                 scope;
        AsBundleKind             bundle_kind;
        guint                    progress;  /* integer 0–100 (inclusive), or %GS_APP_PROGRESS_UNKNOWN */
        gboolean                 allow_cancel;
@@ -220,7 +220,7 @@ gs_app_kv_printf (GString *str, const gchar *key, const gchar *fmt, ...)
 }
 
 static const gchar *
-_as_app_quirk_flag_to_string (GsAppQuirk quirk)
+_as_component_quirk_flag_to_string (GsAppQuirk quirk)
 {
        switch (quirk) {
        case GS_APP_QUIRK_PROVENANCE:
@@ -264,6 +264,44 @@ _as_app_quirk_flag_to_string (GsAppQuirk quirk)
        }
 }
 
+/**
+ * gs_app_state_to_string:
+ * @state: the #GsAppState.
+ *
+ * Converts the enumerated value to an text representation.
+ *
+ * Returns: string version of @state, or %NULL for unknown
+ **/
+const gchar *
+gs_app_state_to_string (GsAppState state)
+{
+       if (state == GS_APP_STATE_UNKNOWN)
+               return "unknown";
+       if (state == GS_APP_STATE_INSTALLED)
+               return "installed";
+       if (state == GS_APP_STATE_AVAILABLE)
+               return "available";
+       if (state == GS_APP_STATE_PURCHASABLE)
+               return "purchasable";
+       if (state == GS_APP_STATE_PURCHASING)
+               return "purchasing";
+       if (state == GS_APP_STATE_AVAILABLE_LOCAL)
+               return "local";
+       if (state == GS_APP_STATE_QUEUED_FOR_INSTALL)
+               return "queued";
+       if (state == GS_APP_STATE_INSTALLING)
+               return "installing";
+       if (state == GS_APP_STATE_REMOVING)
+               return "removing";
+       if (state == GS_APP_STATE_UPDATABLE)
+               return "updatable";
+       if (state == GS_APP_STATE_UPDATABLE_LIVE)
+               return "updatable-live";
+       if (state == GS_APP_STATE_UNAVAILABLE)
+               return "unavailable";
+       return NULL;
+}
+
 /* mutex must be held */
 static const gchar *
 gs_app_get_unique_id_unlocked (GsApp *app)
@@ -277,12 +315,11 @@ gs_app_get_unique_id_unlocked (GsApp *app)
        /* hmm, do what we can */
        if (priv->unique_id == NULL || !priv->unique_id_valid) {
                g_free (priv->unique_id);
-               priv->unique_id = as_utils_unique_id_build (priv->scope,
-                                                           priv->bundle_kind,
-                                                           priv->origin,
-                                                           priv->kind,
-                                                           priv->id,
-                                                           priv->branch);
+               priv->unique_id = as_utils_build_data_id (priv->scope,
+                                                         priv->bundle_kind,
+                                                         priv->origin,
+                                                         priv->id,
+                                                         priv->branch);
                priv->unique_id_valid = TRUE;
        }
        return priv->unique_id;
@@ -349,7 +386,7 @@ gs_app_quirk_to_string (GsAppQuirk quirk)
                if ((quirk & i) == 0)
                        continue;
                g_string_append_printf (str, "%s,",
-                                       _as_app_quirk_flag_to_string (i));
+                                       _as_component_quirk_flag_to_string (i));
        }
 
        /* nothing recognised */
@@ -449,8 +486,8 @@ gs_app_to_string_append (GsApp *app, GString *str)
        klass = GS_APP_GET_CLASS (app);
 
        g_string_append_printf (str, " [%p]\n", app);
-       gs_app_kv_lpad (str, "kind", as_app_kind_to_string (priv->kind));
-       gs_app_kv_lpad (str, "state", as_app_state_to_string (priv->state));
+       gs_app_kv_lpad (str, "kind", as_component_kind_to_string (priv->kind));
+       gs_app_kv_lpad (str, "state", gs_app_state_to_string (priv->state));
        if (priv->quirk > 0) {
                g_autofree gchar *qstr = gs_app_quirk_to_string (priv->quirk);
                gs_app_kv_lpad (str, "quirk", qstr);
@@ -463,8 +500,8 @@ gs_app_to_string_append (GsApp *app, GString *str)
                gs_app_kv_lpad (str, "id", priv->id);
        if (priv->unique_id != NULL)
                gs_app_kv_lpad (str, "unique-id", gs_app_get_unique_id (app));
-       if (priv->scope != AS_APP_SCOPE_UNKNOWN)
-               gs_app_kv_lpad (str, "scope", as_app_scope_to_string (priv->scope));
+       if (priv->scope != AS_COMPONENT_SCOPE_UNKNOWN)
+               gs_app_kv_lpad (str, "scope", as_component_scope_to_string (priv->scope));
        if (priv->bundle_kind != AS_BUNDLE_KIND_UNKNOWN) {
                gs_app_kv_lpad (str, "bundle-kind",
                                as_bundle_kind_to_string (priv->bundle_kind));
@@ -753,29 +790,29 @@ gs_app_set_id (GsApp *app, const gchar *id)
  *
  * Gets the scope of the application.
  *
- * Returns: the #AsAppScope, e.g. %AS_APP_SCOPE_USER
+ * Returns: the #AsComponentScope, e.g. %AS_COMPONENT_SCOPE_USER
  *
  * Since: 3.22
  **/
-AsAppScope
+AsComponentScope
 gs_app_get_scope (GsApp *app)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
-       g_return_val_if_fail (GS_IS_APP (app), AS_APP_SCOPE_UNKNOWN);
+       g_return_val_if_fail (GS_IS_APP (app), AS_COMPONENT_SCOPE_UNKNOWN);
        return priv->scope;
 }
 
 /**
  * gs_app_set_scope:
  * @app: a #GsApp
- * @scope: a #AsAppScope, e.g. AS_APP_SCOPE_SYSTEM
+ * @scope: a #AsComponentScope, e.g. AS_COMPONENT_SCOPE_SYSTEM
  *
  * This sets the scope of the application.
  *
  * Since: 3.22
  **/
 void
-gs_app_set_scope (GsApp *app, AsAppScope scope)
+gs_app_set_scope (GsApp *app, AsComponentScope scope)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
 
@@ -797,7 +834,7 @@ gs_app_set_scope (GsApp *app, AsAppScope scope)
  *
  * Gets the bundle kind of the application.
  *
- * Returns: the #AsAppScope, e.g. %AS_BUNDLE_KIND_FLATPAK
+ * Returns: the #AsComponentScope, e.g. %AS_BUNDLE_KIND_FLATPAK
  *
  * Since: 3.22
  **/
@@ -812,7 +849,7 @@ gs_app_get_bundle_kind (GsApp *app)
 /**
  * gs_app_set_bundle_kind:
  * @app: a #GsApp
- * @bundle_kind: a #AsAppScope, e.g. AS_BUNDLE_KIND_FLATPAK
+ * @bundle_kind: a #AsComponentScope, e.g. AS_BUNDLE_KIND_FLATPAK
  *
  * This sets the bundle kind of the application.
  *
@@ -841,15 +878,15 @@ gs_app_set_bundle_kind (GsApp *app, AsBundleKind bundle_kind)
  *
  * Gets the state of the application.
  *
- * Returns: the #AsAppState, e.g. %AS_APP_STATE_INSTALLED
+ * Returns: the #GsAppState, e.g. %GS_APP_STATE_INSTALLED
  *
  * Since: 3.22
  **/
-AsAppState
+GsAppState
 gs_app_get_state (GsApp *app)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
-       g_return_val_if_fail (GS_IS_APP (app), AS_APP_STATE_UNKNOWN);
+       g_return_val_if_fail (GS_IS_APP (app), GS_APP_STATE_UNKNOWN);
        return priv->state;
 }
 
@@ -905,15 +942,15 @@ gs_app_set_state_recover (GsApp *app)
 
        g_return_if_fail (GS_IS_APP (app));
 
-       if (priv->state_recover == AS_APP_STATE_UNKNOWN)
+       if (priv->state_recover == GS_APP_STATE_UNKNOWN)
                return;
        if (priv->state_recover == priv->state)
                return;
 
        g_debug ("recovering state on %s from %s to %s",
                 priv->id,
-                as_app_state_to_string (priv->state),
-                as_app_state_to_string (priv->state_recover));
+                gs_app_state_to_string (priv->state),
+                gs_app_state_to_string (priv->state_recover));
 
        /* make sure progress gets reset when recovering state, to prevent
         * confusing initial states when going through more than one attempt */
@@ -925,7 +962,7 @@ gs_app_set_state_recover (GsApp *app)
 
 /* mutex must be held */
 static gboolean
-gs_app_set_state_internal (GsApp *app, AsAppState state)
+gs_app_set_state_internal (GsApp *app, GsAppState state)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        gboolean state_change_ok = FALSE;
@@ -936,84 +973,84 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
 
        /* check the state change is allowed */
        switch (priv->state) {
-       case AS_APP_STATE_UNKNOWN:
+       case GS_APP_STATE_UNKNOWN:
                /* unknown has to go into one of the stable states */
-               if (state == AS_APP_STATE_INSTALLED ||
-                   state == AS_APP_STATE_QUEUED_FOR_INSTALL ||
-                   state == AS_APP_STATE_AVAILABLE ||
-                   state == AS_APP_STATE_AVAILABLE_LOCAL ||
-                   state == AS_APP_STATE_UPDATABLE ||
-                   state == AS_APP_STATE_UPDATABLE_LIVE ||
-                   state == AS_APP_STATE_UNAVAILABLE)
+               if (state == GS_APP_STATE_INSTALLED ||
+                   state == GS_APP_STATE_QUEUED_FOR_INSTALL ||
+                   state == GS_APP_STATE_AVAILABLE ||
+                   state == GS_APP_STATE_AVAILABLE_LOCAL ||
+                   state == GS_APP_STATE_UPDATABLE ||
+                   state == GS_APP_STATE_UPDATABLE_LIVE ||
+                   state == GS_APP_STATE_UNAVAILABLE)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_INSTALLED:
                /* installed has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_REMOVING ||
-                   state == AS_APP_STATE_UNAVAILABLE ||
-                   state == AS_APP_STATE_UPDATABLE ||
-                   state == AS_APP_STATE_UPDATABLE_LIVE)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_REMOVING ||
+                   state == GS_APP_STATE_UNAVAILABLE ||
+                   state == GS_APP_STATE_UPDATABLE ||
+                   state == GS_APP_STATE_UPDATABLE_LIVE)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_INSTALLING ||
-                   state == AS_APP_STATE_AVAILABLE)
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_INSTALLING ||
+                   state == GS_APP_STATE_AVAILABLE)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                /* available has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_QUEUED_FOR_INSTALL ||
-                   state == AS_APP_STATE_INSTALLING)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_QUEUED_FOR_INSTALL ||
+                   state == GS_APP_STATE_INSTALLING)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                /* installing has to go into an stable state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_INSTALLED ||
-                   state == AS_APP_STATE_UPDATABLE ||
-                   state == AS_APP_STATE_UPDATABLE_LIVE ||
-                   state == AS_APP_STATE_AVAILABLE)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_INSTALLED ||
+                   state == GS_APP_STATE_UPDATABLE ||
+                   state == GS_APP_STATE_UPDATABLE_LIVE ||
+                   state == GS_APP_STATE_AVAILABLE)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                /* removing has to go into an stable state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_AVAILABLE ||
-                   state == AS_APP_STATE_INSTALLED)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_AVAILABLE ||
+                   state == GS_APP_STATE_INSTALLED)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE:
                /* updatable has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_REMOVING ||
-                   state == AS_APP_STATE_INSTALLING)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_REMOVING ||
+                   state == GS_APP_STATE_INSTALLING)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                /* updatable-live has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_REMOVING ||
-                   state == AS_APP_STATE_INSTALLING)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_REMOVING ||
+                   state == GS_APP_STATE_INSTALLING)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                /* updatable has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_AVAILABLE)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_AVAILABLE)
                        state_change_ok = TRUE;
                break;
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                /* local has to go into an action state */
-               if (state == AS_APP_STATE_UNKNOWN ||
-                   state == AS_APP_STATE_INSTALLING)
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_INSTALLING)
                        state_change_ok = TRUE;
                break;
        default:
                g_warning ("state %s unhandled",
-                          as_app_state_to_string (priv->state));
+                          gs_app_state_to_string (priv->state));
                g_assert_not_reached ();
        }
 
@@ -1021,22 +1058,22 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
        if (!state_change_ok) {
                g_warning ("State change on %s from %s to %s is not OK",
                           gs_app_get_unique_id_unlocked (app),
-                          as_app_state_to_string (priv->state),
-                          as_app_state_to_string (state));
+                          gs_app_state_to_string (priv->state),
+                          gs_app_state_to_string (state));
        }
 
        priv->state = state;
 
-       if (state == AS_APP_STATE_UNKNOWN ||
-           state == AS_APP_STATE_AVAILABLE_LOCAL ||
-           state == AS_APP_STATE_AVAILABLE)
+       if (state == GS_APP_STATE_UNKNOWN ||
+           state == GS_APP_STATE_AVAILABLE_LOCAL ||
+           state == GS_APP_STATE_AVAILABLE)
                priv->install_date = 0;
 
        /* save this to simplify error handling in the plugins */
        switch (state) {
-       case AS_APP_STATE_INSTALLING:
-       case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_REMOVING:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                /* transient, so ignore */
                break;
        default:
@@ -1119,11 +1156,11 @@ gs_app_set_pending_action_internal (GsApp *app,
 /**
  * gs_app_set_state:
  * @app: a #GsApp
- * @state: a #AsAppState, e.g. AS_APP_STATE_UPDATABLE_LIVE
+ * @state: a #GsAppState, e.g. GS_APP_STATE_UPDATABLE_LIVE
  *
  * This sets the state of the application.
  * The following state diagram explains the typical states.
- * All applications start in state %AS_APP_STATE_UNKNOWN,
+ * All applications start in state %GS_APP_STATE_UNKNOWN,
  * but the frontend is not supposed to see GsApps with this state.
  *
  * Plugins are responsible for changing the state to one of the other
@@ -1141,7 +1178,7 @@ gs_app_set_pending_action_internal (GsApp *app,
  * Since: 3.22
  **/
 void
-gs_app_set_state (GsApp *app, AsAppState state)
+gs_app_set_state (GsApp *app, GsAppState state)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        g_autoptr(GMutexLocker) locker = NULL;
@@ -1154,7 +1191,7 @@ gs_app_set_state (GsApp *app, AsAppState state)
                 * actions that usually change the state, we assign it to the
                 * appropriate action here */
                GsPluginAction action = GS_PLUGIN_ACTION_UNKNOWN;
-               if (priv->state == AS_APP_STATE_QUEUED_FOR_INSTALL)
+               if (priv->state == GS_APP_STATE_QUEUED_FOR_INSTALL)
                        action = GS_PLUGIN_ACTION_INSTALL;
                gs_app_set_pending_action_internal (app, action);
 
@@ -1168,26 +1205,26 @@ gs_app_set_state (GsApp *app, AsAppState state)
  *
  * Gets the kind of the application.
  *
- * Returns: the #AsAppKind, e.g. %AS_APP_KIND_UNKNOWN
+ * Returns: the #AsComponentKind, e.g. %AS_COMPONENT_KIND_UNKNOWN
  *
  * Since: 3.22
  **/
-AsAppKind
+AsComponentKind
 gs_app_get_kind (GsApp *app)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
-       g_return_val_if_fail (GS_IS_APP (app), AS_APP_KIND_UNKNOWN);
+       g_return_val_if_fail (GS_IS_APP (app), AS_COMPONENT_KIND_UNKNOWN);
        return priv->kind;
 }
 
 /**
  * gs_app_set_kind:
  * @app: a #GsApp
- * @kind: a #AsAppKind, e.g. #AS_APP_KIND_DESKTOP
+ * @kind: a #AsComponentKind, e.g. #AS_COMPONENT_KIND_DESKTOP_APP
  *
  * This sets the kind of the application.
  * The following state diagram explains the typical states.
- * All applications start with kind %AS_APP_KIND_UNKNOWN.
+ * All applications start with kind %AS_COMPONENT_KIND_UNKNOWN.
  *
  * |[
  * PACKAGE --> NORMAL
@@ -1198,7 +1235,7 @@ gs_app_get_kind (GsApp *app)
  * Since: 3.22
  **/
 void
-gs_app_set_kind (GsApp *app, AsAppKind kind)
+gs_app_set_kind (GsApp *app, AsComponentKind kind)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        gboolean state_change_ok = FALSE;
@@ -1213,26 +1250,26 @@ gs_app_set_kind (GsApp *app, AsAppKind kind)
                return;
 
        /* trying to change */
-       if (priv->kind != AS_APP_KIND_UNKNOWN &&
-           kind == AS_APP_KIND_UNKNOWN) {
+       if (priv->kind != AS_COMPONENT_KIND_UNKNOWN &&
+           kind == AS_COMPONENT_KIND_UNKNOWN) {
                g_warning ("automatically prevented from changing "
                           "kind on %s from %s to %s!",
                           gs_app_get_unique_id_unlocked (app),
-                          as_app_kind_to_string (priv->kind),
-                          as_app_kind_to_string (kind));
+                          as_component_kind_to_string (priv->kind),
+                          as_component_kind_to_string (kind));
                return;
        }
 
        /* check the state change is allowed */
        switch (priv->kind) {
-       case AS_APP_KIND_UNKNOWN:
-       case AS_APP_KIND_GENERIC:
+       case AS_COMPONENT_KIND_UNKNOWN:
+       case AS_COMPONENT_KIND_GENERIC:
                /* all others derive from generic */
                state_change_ok = TRUE;
                break;
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP_APP:
                /* desktop has to be reset to override */
-               if (kind == AS_APP_KIND_UNKNOWN)
+               if (kind == AS_COMPONENT_KIND_UNKNOWN)
                        state_change_ok = TRUE;
                break;
        default:
@@ -1244,8 +1281,8 @@ gs_app_set_kind (GsApp *app, AsAppKind kind)
        if (!state_change_ok) {
                g_warning ("Kind change on %s from %s to %s is not OK",
                           priv->id,
-                          as_app_kind_to_string (priv->kind),
-                          as_app_kind_to_string (kind));
+                          as_component_kind_to_string (priv->kind),
+                          as_component_kind_to_string (kind));
                return;
        }
 
@@ -1296,7 +1333,7 @@ gs_app_set_unique_id (GsApp *app, const gchar *unique_id)
        locker = g_mutex_locker_new (&priv->mutex);
 
        /* check for sanity */
-       if (!as_utils_unique_id_valid (unique_id))
+       if (!as_utils_data_id_valid (unique_id))
                g_warning ("unique_id %s not valid", unique_id);
 
        g_free (priv->unique_id);
@@ -2422,7 +2459,7 @@ gs_app_set_license (GsApp *app, GsAppQuality quality, const gchar *license)
 
        /* assume free software until we find a nonfree SPDX token */
        priv->license_is_free = TRUE;
-       tokens = as_utils_spdx_license_tokenize (license);
+       tokens = as_spdx_license_tokenize (license);
        for (i = 0; tokens[i] != NULL; i++) {
                if (g_strcmp0 (tokens[i], "&") == 0 ||
                    g_strcmp0 (tokens[i], "+") == 0 ||
@@ -3081,7 +3118,7 @@ gs_app_remove_review (GsApp *app, AsReview *review)
  *
  * Gets all the provides for the application.
  *
- * Returns: (element-type AsProvide) (transfer none): the list of provides
+ * Returns: (element-type AsProvided) (transfer none): the list of provides
  *
  * Since: 3.22
  **/
@@ -3096,19 +3133,19 @@ gs_app_get_provides (GsApp *app)
 /**
  * gs_app_add_provide:
  * @app: a #GsApp
- * @provide: a #AsProvide
+ * @provide: a #AsProvided
  *
  * Adds a provide to the application.
  *
  * Since: 3.22
  **/
 void
-gs_app_add_provide (GsApp *app, AsProvide *provide)
+gs_app_add_provide (GsApp *app, AsProvided *provide)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        g_autoptr(GMutexLocker) locker = NULL;
        g_return_if_fail (GS_IS_APP (app));
-       g_return_if_fail (AS_IS_PROVIDE (provide));
+       g_return_if_fail (AS_IS_PROVIDED (provide));
        locker = g_mutex_locker_new (&priv->mutex);
        g_ptr_array_add (priv->provides, g_object_ref (provide));
 }
@@ -3139,7 +3176,7 @@ gs_app_get_size_download (GsApp *app)
 
        /* add the runtime if this is not installed */
        if (priv->runtime != NULL) {
-               if (gs_app_get_state (priv->runtime) == AS_APP_STATE_AVAILABLE)
+               if (gs_app_get_state (priv->runtime) == GS_APP_STATE_AVAILABLE)
                        sz += gs_app_get_size_installed (priv->runtime);
        }
 
@@ -3442,8 +3479,8 @@ gs_app_add_related (GsApp *app, GsApp *app2)
 
        /* if the app is updatable-live and any related app is not then
         * degrade to the offline state */
-       if (priv->state == AS_APP_STATE_UPDATABLE_LIVE &&
-           priv2->state == AS_APP_STATE_UPDATABLE)
+       if (priv->state == GS_APP_STATE_UPDATABLE_LIVE &&
+           priv2->state == GS_APP_STATE_UPDATABLE)
                priv->state = priv2->state;
 
        gs_app_list_add (priv->related, app2);
@@ -3578,10 +3615,10 @@ gs_app_is_installed (GsApp *app)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        g_return_val_if_fail (GS_IS_APP (app), FALSE);
-       return (priv->state == AS_APP_STATE_INSTALLED) ||
-              (priv->state == AS_APP_STATE_UPDATABLE) ||
-              (priv->state == AS_APP_STATE_UPDATABLE_LIVE) ||
-              (priv->state == AS_APP_STATE_REMOVING);
+       return (priv->state == GS_APP_STATE_INSTALLED) ||
+              (priv->state == GS_APP_STATE_UPDATABLE) ||
+              (priv->state == GS_APP_STATE_UPDATABLE_LIVE) ||
+              (priv->state == GS_APP_STATE_REMOVING);
 }
 
 /**
@@ -3599,10 +3636,10 @@ gs_app_is_updatable (GsApp *app)
 {
        GsAppPrivate *priv = gs_app_get_instance_private (app);
        g_return_val_if_fail (GS_IS_APP (app), FALSE);
-       if (priv->kind == AS_APP_KIND_OS_UPGRADE)
+       if (priv->kind == AS_COMPONENT_KIND_OPERATING_SYSTEM)
                return TRUE;
-       return (priv->state == AS_APP_STATE_UPDATABLE) ||
-              (priv->state == AS_APP_STATE_UPDATABLE_LIVE);
+       return (priv->state == GS_APP_STATE_UPDATABLE) ||
+              (priv->state == GS_APP_STATE_UPDATABLE_LIVE);
 }
 
 /**
@@ -4451,18 +4488,18 @@ gs_app_class_init (GsAppClass *klass)
         * GsApp:kind:
         */
        obj_props[PROP_KIND] = g_param_spec_uint ("kind", NULL, NULL,
-                                  AS_APP_KIND_UNKNOWN,
-                                  AS_APP_KIND_LAST,
-                                  AS_APP_KIND_UNKNOWN,
+                                  AS_COMPONENT_KIND_UNKNOWN,
+                                  AS_COMPONENT_KIND_LAST,
+                                  AS_COMPONENT_KIND_UNKNOWN,
                                   G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
 
        /**
         * GsApp:state:
         */
        obj_props[PROP_STATE] = g_param_spec_uint ("state", NULL, NULL,
-                                  AS_APP_STATE_UNKNOWN,
-                                  AS_APP_STATE_LAST,
-                                  AS_APP_STATE_UNKNOWN,
+                                  GS_APP_STATE_UNKNOWN,
+                                  GS_APP_STATE_LAST,
+                                  GS_APP_STATE_UNKNOWN,
                                   G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
 
        /**
@@ -4621,13 +4658,13 @@ gs_app_set_from_unique_id (GsApp *app, const gchar *unique_id)
        if (g_strv_length (split) != 6)
                return;
        if (g_strcmp0 (split[0], "*") != 0)
-               gs_app_set_scope (app, as_app_scope_from_string (split[0]));
+               gs_app_set_scope (app, as_component_scope_from_string (split[0]));
        if (g_strcmp0 (split[1], "*") != 0)
                gs_app_set_bundle_kind (app, as_bundle_kind_from_string (split[1]));
        if (g_strcmp0 (split[2], "*") != 0)
                gs_app_set_origin (app, split[2]);
        if (g_strcmp0 (split[3], "*") != 0)
-               gs_app_set_kind (app, as_app_kind_from_string (split[3]));
+               gs_app_set_kind (app, as_component_kind_from_string (split[3]));
        if (g_strcmp0 (split[4], "*") != 0)
                gs_app_set_id (app, split[4]);
        if (g_strcmp0 (split[5], "*") != 0)
@@ -4682,7 +4719,7 @@ gs_app_get_origin_ui (GsApp *app)
        }
 
        /* use "Local file" rather than the filename for local files */
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL) {
+       if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL) {
                /* TRANSLATORS: this is a locally downloaded package */
                return g_strdup (_("Local file"));
        }
diff --git a/lib/gs-app.h b/lib/gs-app.h
index d099b772..675d1bd1 100644
--- a/lib/gs-app.h
+++ b/lib/gs-app.h
@@ -12,7 +12,7 @@
 #include <glib-object.h>
 #include <gdk/gdk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
-#include <appstream-glib.h>
+#include <appstream.h>
 
 G_BEGIN_DECLS
 
@@ -28,6 +28,40 @@ struct _GsAppClass
        gpointer                 padding[30];
 };
 
+/**
+ * GsAppState:
+ * @GS_APP_STATE_UNKNOWN:                      Unknown state
+ * @GS_APP_STATE_INSTALLED:                    Application is installed
+ * @GS_APP_STATE_AVAILABLE:                    Application is available
+ * @GS_APP_STATE_AVAILABLE_LOCAL:              Application is locally available as a file
+ * @GS_APP_STATE_UPDATABLE:                    Application is installed and updatable
+ * @GS_APP_STATE_UNAVAILABLE:                  Application is referenced, but not available
+ * @GS_APP_STATE_QUEUED_FOR_INSTALL:           Application is queued for install
+ * @GS_APP_STATE_INSTALLING:                   Application is being installed
+ * @GS_APP_STATE_REMOVING:                     Application is being removed
+ * @GS_APP_STATE_UPDATABLE_LIVE:               Application is installed and updatable live
+ * @GS_APP_STATE_PURCHASABLE:                  Application is available for purchasing
+ * @GS_APP_STATE_PURCHASING:                   Application is being purchased
+ *
+ * The application state.
+ **/
+typedef enum {
+       GS_APP_STATE_UNKNOWN,                           /* Since: 0.2.2 */
+       GS_APP_STATE_INSTALLED,                         /* Since: 0.2.2 */
+       GS_APP_STATE_AVAILABLE,                         /* Since: 0.2.2 */
+       GS_APP_STATE_AVAILABLE_LOCAL,                   /* Since: 0.2.2 */
+       GS_APP_STATE_UPDATABLE,                         /* Since: 0.2.2 */
+       GS_APP_STATE_UNAVAILABLE,                       /* Since: 0.2.2 */
+       GS_APP_STATE_QUEUED_FOR_INSTALL,                /* Since: 0.2.2 */
+       GS_APP_STATE_INSTALLING,                        /* Since: 0.2.2 */
+       GS_APP_STATE_REMOVING,                          /* Since: 0.2.2 */
+       GS_APP_STATE_UPDATABLE_LIVE,                    /* Since: 0.5.4 */
+       GS_APP_STATE_PURCHASABLE,                       /* Since: 0.5.17 */
+       GS_APP_STATE_PURCHASING,                        /* Since: 0.5.17 */
+       /*< private >*/
+       GS_APP_STATE_LAST
+} GsAppState;
+
 /**
  * GsAppKudo:
  * @GS_APP_KUDO_MY_LANGUAGE:           Localised in my language
@@ -174,6 +208,8 @@ typedef enum {
  */
 #define GS_APP_PROGRESS_UNKNOWN G_MAXUINT
 
+const gchar    *gs_app_state_to_string (GsAppState state);
+
 GsApp          *gs_app_new                     (const gchar    *id);
 G_DEPRECATED_FOR(gs_app_set_from_unique_id)
 GsApp          *gs_app_new_from_unique_id      (const gchar    *unique_id);
@@ -186,15 +222,15 @@ void               gs_app_to_string_append        (GsApp          *app,
 const gchar    *gs_app_get_id                  (GsApp          *app);
 void            gs_app_set_id                  (GsApp          *app,
                                                 const gchar    *id);
-AsAppKind       gs_app_get_kind                (GsApp          *app);
+AsComponentKind         gs_app_get_kind                (GsApp          *app);
 void            gs_app_set_kind                (GsApp          *app,
-                                                AsAppKind       kind);
-AsAppState      gs_app_get_state               (GsApp          *app);
+                                                AsComponentKind kind);
+GsAppState      gs_app_get_state               (GsApp          *app);
 void            gs_app_set_state               (GsApp          *app,
-                                                AsAppState      state);
-AsAppScope      gs_app_get_scope               (GsApp          *app);
+                                                GsAppState      state);
+AsComponentScope        gs_app_get_scope               (GsApp          *app);
 void            gs_app_set_scope               (GsApp          *app,
-                                                AsAppScope      scope);
+                                                AsComponentScope        scope);
 AsBundleKind    gs_app_get_bundle_kind         (GsApp          *app);
 void            gs_app_set_bundle_kind         (GsApp          *app,
                                                 AsBundleKind    bundle_kind);
@@ -338,7 +374,7 @@ void                 gs_app_remove_review           (GsApp          *app,
                                                 AsReview       *review);
 GPtrArray      *gs_app_get_provides            (GsApp          *app);
 void            gs_app_add_provide             (GsApp          *app,
-                                                AsProvide      *provide);
+                                                AsProvided     *provide);
 guint64                 gs_app_get_size_installed      (GsApp          *app);
 void            gs_app_set_size_installed      (GsApp          *app,
                                                 guint64         size_installed);
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index bc01c953..0c83f6e9 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -454,7 +454,7 @@ main (int argc, char **argv)
        } else if (argc == 3 && g_strcmp0 (argv[1], "action-upgrade-download") == 0) {
                g_autoptr(GsPluginJob) plugin_job = NULL;
                app = gs_app_new (argv[2]);
-               gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM);
                plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD,
                                                 "app", app,
                                                 NULL);
diff --git a/lib/gs-plugin-event.c b/lib/gs-plugin-event.c
index 8d1fc83e..89787626 100644
--- a/lib/gs-plugin-event.c
+++ b/lib/gs-plugin-event.c
@@ -173,12 +173,11 @@ gs_plugin_event_get_unique_id (GsPluginEvent *event)
                        g_autofree gchar *id = NULL;
                        id = g_strdup_printf ("%s.error",
                                              gs_plugin_error_to_string (event->error->code));
-                       event->unique_id = as_utils_unique_id_build (AS_APP_SCOPE_UNKNOWN,
-                                                                    AS_BUNDLE_KIND_UNKNOWN,
-                                                                    NULL,
-                                                                    AS_APP_KIND_UNKNOWN,
-                                                                    id,
-                                                                    NULL);
+                       event->unique_id = as_utils_build_data_id (AS_COMPONENT_SCOPE_UNKNOWN,
+                                                                  AS_BUNDLE_KIND_UNKNOWN,
+                                                                  NULL,
+                                                                  id,
+                                                                  NULL);
                }
                return event->unique_id;
        }
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 354c297e..5eff02c5 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -11,7 +11,7 @@
 
 #include <locale.h>
 #include <glib/gi18n.h>
-#include <appstream-glib.h>
+#include <appstream.h>
 #include <math.h>
 
 #ifdef HAVE_SYSPROF
@@ -427,7 +427,7 @@ gs_plugin_error_handle_failure (GsPluginLoaderHelper *helper,
        event = gs_plugin_job_to_failed_event (helper->plugin_job, error_local_copy);
 
        /* set the app and origin IDs if we managed to scrape them from the error above */
-       if (as_utils_unique_id_valid (app_id)) {
+       if (as_utils_data_id_valid (app_id)) {
                g_autoptr(GsApp) app = gs_plugin_cache_lookup (plugin, app_id);
                if (app != NULL) {
                        g_debug ("found app %s in error", origin_id);
@@ -436,7 +436,7 @@ gs_plugin_error_handle_failure (GsPluginLoaderHelper *helper,
                        g_debug ("no unique ID found for app %s", app_id);
                }
        }
-       if (as_utils_unique_id_valid (origin_id)) {
+       if (as_utils_data_id_valid (origin_id)) {
                g_autoptr(GsApp) origin = gs_plugin_cache_lookup (plugin, origin_id);
                if (origin != NULL) {
                        g_debug ("found origin %s in error", origin_id);
@@ -754,7 +754,7 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
 
        /* add app to the pending installation queue if necessary */
        if (action == GS_PLUGIN_ACTION_INSTALL &&
-           app != NULL && gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+           app != NULL && gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
                add_app_to_install_queue (helper->plugin_loader, app);
        }
 
@@ -1200,8 +1200,8 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
 {
        /* even without AppData, show things in progress */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLING:
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_REMOVING:
                return TRUE;
                break;
        default:
@@ -1209,11 +1209,11 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
        }
 
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_OS_UPGRADE:
-       case AS_APP_KIND_CODEC:
-       case AS_APP_KIND_FONT:
+       case AS_COMPONENT_KIND_OPERATING_SYSTEM:
+       case AS_COMPONENT_KIND_CODEC:
+       case AS_COMPONENT_KIND_FONT:
                g_debug ("app invalid as %s: %s",
-                        as_app_kind_to_string (gs_app_get_kind (app)),
+                        as_component_kind_to_string (gs_app_get_kind (app)),
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
                break;
@@ -1237,29 +1237,29 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
        GsPluginLoaderHelper *helper = (GsPluginLoaderHelper *) user_data;
 
        /* never show addons */
-       if (gs_app_get_kind (app) == AS_APP_KIND_ADDON) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
                g_debug ("app invalid as addon %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
 
        /* never show CLI apps */
-       if (gs_app_get_kind (app) == AS_APP_KIND_CONSOLE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_CONSOLE_APP) {
                g_debug ("app invalid as console %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
 
        /* don't show unknown state */
-       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
                g_debug ("app invalid as state unknown %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
 
        /* don't show unconverted unavailables */
-       if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN &&
-               gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_UNKNOWN &&
+               gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
                g_debug ("app invalid as unconverted unavailable %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
@@ -1290,14 +1290,14 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
        }
 
        /* don't show sources */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY) {
                g_debug ("app invalid as source %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
 
        /* don't show unknown kind */
-       if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_UNKNOWN) {
                g_debug ("app invalid as kind unknown %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
@@ -1306,9 +1306,9 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
        /* don't show unconverted packages in the application view */
        if (!gs_plugin_job_has_refine_flags (helper->plugin_job,
                                                 GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES) &&
-           (gs_app_get_kind (app) == AS_APP_KIND_GENERIC)) {
+           (gs_app_get_kind (app) == AS_COMPONENT_KIND_GENERIC)) {
                g_debug ("app invalid as only a %s: %s",
-                        as_app_kind_to_string (gs_app_get_kind (app)),
+                        as_component_kind_to_string (gs_app_get_kind (app)),
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
@@ -1413,9 +1413,9 @@ gs_plugin_loader_featured_debug (GsApp *app, gpointer user_data)
 static gint
 gs_plugin_loader_app_sort_kind_cb (GsApp *app1, GsApp *app2, gpointer user_data)
 {
-       if (gs_app_get_kind (app1) == AS_APP_KIND_DESKTOP)
+       if (gs_app_get_kind (app1) == AS_COMPONENT_KIND_DESKTOP_APP)
                return -1;
-       if (gs_app_get_kind (app2) == AS_APP_KIND_DESKTOP)
+       if (gs_app_get_kind (app2) == AS_COMPONENT_KIND_DESKTOP_APP)
                return 1;
        return 0;
 }
@@ -1439,14 +1439,9 @@ gs_plugin_loader_app_sort_prio_cb (GsApp *app1, GsApp *app2, gpointer user_data)
 static gint
 gs_plugin_loader_app_sort_version_cb (GsApp *app1, GsApp *app2, gpointer user_data)
 {
-#if AS_CHECK_VERSION(0,7,15)
        return as_utils_vercmp_full (gs_app_get_version (app1),
                                     gs_app_get_version (app2),
                                     AS_VERSION_COMPARE_FLAG_NONE);
-#else
-       return as_utils_vercmp (gs_app_get_version (app1),
-                               gs_app_get_version (app2));
-#endif
 }
 
 /******************************************************************************/
@@ -1733,12 +1728,12 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader,
 
                /* check the app is not still in an action helper */
                switch (gs_app_get_state (app)) {
-               case AS_APP_STATE_INSTALLING:
-               case AS_APP_STATE_REMOVING:
+               case GS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_REMOVING:
                        g_warning ("application %s left in %s helper",
                                   gs_app_get_unique_id (app),
-                                  as_app_state_to_string (gs_app_get_state (app)));
-                       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+                                  gs_app_state_to_string (gs_app_get_state (app)));
+                       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
                        break;
                default:
                        break;
@@ -1776,7 +1771,7 @@ load_install_queue (GsPluginLoader *plugin_loader, GError **error)
                if (strlen (names[i]) == 0)
                        continue;
                app = gs_app_new (names[i]);
-               gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+               gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
                gs_app_list_add (list, app);
        }
 
@@ -1818,7 +1813,7 @@ save_install_queue (GsPluginLoader *plugin_loader)
        for (i = (gint) pending_apps->len - 1; i >= 0; i--) {
                GsApp *app;
                app = g_ptr_array_index (pending_apps, i);
-               if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+               if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
                        g_string_append (s, gs_app_get_id (app));
                        g_string_append_c (s, '\n');
                }
@@ -1854,7 +1849,7 @@ add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app)
        g_ptr_array_add (priv->pending_apps, g_object_ref (app));
        g_mutex_unlock (&priv->pending_apps_mutex);
 
-       gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+       gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
        id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader));
        g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle");
        save_install_queue (plugin_loader);
@@ -1882,7 +1877,7 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app)
        g_mutex_unlock (&priv->pending_apps_mutex);
 
        if (ret) {
-               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
                id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader));
                g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle");
                save_install_queue (plugin_loader);
@@ -2917,8 +2912,8 @@ gs_plugin_loader_init (GsPluginLoader *plugin_loader)
        priv->settings = g_settings_new ("org.gnome.software");
        g_signal_connect (priv->settings, "changed",
                          G_CALLBACK (gs_plugin_loader_settings_changed_cb), plugin_loader);
-       priv->events_by_id = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
-                                                   (GEqualFunc) as_utils_unique_id_equal,
+       priv->events_by_id = g_hash_table_new_full ((GHashFunc) as_utils_data_id_hash,
+                                                   (GEqualFunc) as_utils_data_id_equal,
                                                    g_free,
                                                    (GDestroyNotify) g_object_unref);
 
@@ -3044,8 +3039,8 @@ gs_plugin_loader_network_changed_cb (GNetworkMonitor *monitor,
                queue = gs_app_list_new ();
                for (guint i = 0; i < priv->pending_apps->len; i++) {
                        GsApp *app = g_ptr_array_index (priv->pending_apps, i);
-                       if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
-                               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+                       if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
+                               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
                                gs_app_list_add (queue, app);
                        }
                }
@@ -3169,7 +3164,7 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader,
                                return FALSE;
 
                        /* already installed? */
-                       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
+                       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED)
                                continue;
 
                        /* make sure that the app update is cancelled when the whole op is cancelled */
diff --git a/lib/gs-plugin-private.h b/lib/gs-plugin-private.h
index 1defc98a..a703bea0 100644
--- a/lib/gs-plugin-private.h
+++ b/lib/gs-plugin-private.h
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include <appstream-glib.h>
+#include <appstream.h>
 #include <glib-object.h>
 #include <gmodule.h>
 #include <libsoup/soup.h>
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 05772f2a..2190028a 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -16,7 +16,7 @@
  * @short_description: Vfuncs that plugins can implement
  */
 
-#include <appstream-glib.h>
+#include <appstream.h>
 #include <glib-object.h>
 #include <gmodule.h>
 #include <gio/gio.h>
@@ -222,7 +222,7 @@ gboolean     gs_plugin_add_updates                  (GsPlugin       *plugin,
  * should not be downloaded until the user has explicitly opted-in.
  *
  * Plugins are expected to add new apps using gs_app_list_add() of type
- * %AS_APP_KIND_OS_UPGRADE.
+ * %AS_COMPONENT_KIND_OPERATING_SYSTEM.
  *
  * Returns: %TRUE for success or if not relevant
  **/
@@ -242,7 +242,7 @@ gboolean     gs_plugin_add_distro_upgrades          (GsPlugin       *plugin,
  * or the remotes configured in flatpak.
  *
  * Plugins are expected to add new apps using gs_app_list_add() of type
- * %AS_APP_KIND_SOURCE.
+ * %AS_COMPONENT_KIND_REPOSITORY.
  *
  * Returns: %TRUE for success or if not relevant
  **/
@@ -537,7 +537,7 @@ gboolean     gs_plugin_update_cancel                (GsPlugin       *plugin,
  * console, but they can also be retrieved using gs_plugin_loader_get_events().
  *
  * NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_INSTALLED.
+ * to %GS_APP_STATE_INSTALLED.
  *
  * Returns: %TRUE for success or if not relevant
  **/
@@ -566,7 +566,7 @@ gboolean     gs_plugin_app_install                  (GsPlugin       *plugin,
  * console, but they can also be retrieved using gs_plugin_loader_get_events().
  *
  * NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_AVAILABLE or %AS_APP_STATE_UNKNOWN if not known.
+ * to %GS_APP_STATE_AVAILABLE or %GS_APP_STATE_UNKNOWN if not known.
  *
  * Returns: %TRUE for success or if not relevant
  **/
@@ -613,7 +613,7 @@ gboolean     gs_plugin_app_set_rating               (GsPlugin       *plugin,
  * console, but they can also be retrieved using gs_plugin_loader_get_events().
  *
  * NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_INSTALLED or %AS_APP_STATE_UNKNOWN if not known.
+ * to %GS_APP_STATE_INSTALLED or %GS_APP_STATE_UNKNOWN if not known.
  *
  * If %GS_APP_QUIRK_IS_PROXY is set on the application then the actual #GsApp
  * set in @app will be the related application of the parent. Plugins do not
@@ -684,7 +684,7 @@ gboolean     gs_plugin_download                     (GsPlugin       *plugin,
 /**
  * gs_plugin_app_upgrade_download:
  * @plugin: a #GsPlugin
- * @app: a #GsApp, with kind %AS_APP_KIND_OS_UPGRADE
+ * @app: a #GsApp, with kind %AS_COMPONENT_KIND_OPERATING_SYSTEM
  * @cancellable: a #GCancellable, or %NULL
  * @error: a #GError, or %NULL
  *
@@ -704,7 +704,7 @@ gboolean     gs_plugin_app_upgrade_download         (GsPlugin       *plugin,
 /**
  * gs_plugin_app_upgrade_trigger:
  * @plugin: a #GsPlugin
- * @app: a #GsApp, with kind %AS_APP_KIND_OS_UPGRADE
+ * @app: a #GsApp, with kind %AS_COMPONENT_KIND_OPERATING_SYSTEM
  * @cancellable: a #GCancellable, or %NULL
  * @error: a #GError, or %NULL
  *
@@ -867,8 +867,8 @@ gboolean     gs_plugin_refresh                      (GsPlugin       *plugin,
  * list. If no plugins can handle the file, the list will be empty.
  *
  * For example, the PackageKit plugin can turn a .rpm file into a application
- * of kind %AS_APP_KIND_UNKNOWN but that in some cases it will be further refined
- * into a %AS_APP_KIND_DESKTOP (with all the extra metadata) by the appstream
+ * of kind %AS_COMPONENT_KIND_UNKNOWN but that in some cases it will be further refined
+ * into a %AS_COMPONENT_KIND_DESKTOP (with all the extra metadata) by the appstream
  * plugin.
  *
  * Plugins are expected to add new apps using gs_app_list_add().
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index c517de0f..6af91cac 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1328,7 +1328,7 @@ gs_plugin_download_rewrite_resource (GsPlugin *plugin,
        g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
        /* replace datadir */
-       as_utils_string_replace (resource_str, "@datadir@", DATADIR);
+       as_gstring_replace (resource_str, "@datadir@", DATADIR);
        resource = resource_str->str;
 
        /* look in string for any url() links */
@@ -2039,8 +2039,8 @@ gs_plugin_init (GsPlugin *plugin)
 
        priv->enabled = TRUE;
        priv->scale = 1;
-       priv->cache = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
-                                            (GEqualFunc) as_utils_unique_id_equal,
+       priv->cache = g_hash_table_new_full ((GHashFunc) as_utils_data_id_hash,
+                                            (GEqualFunc) as_utils_data_id_equal,
                                             g_free,
                                             (GDestroyNotify) g_object_unref);
        priv->vfuncs = g_hash_table_new_full (g_str_hash, g_str_equal,
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index e2119317..0f60fc78 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -9,7 +9,7 @@
 
 #pragma once
 
-#include <appstream-glib.h>
+#include <appstream.h>
 #include <glib-object.h>
 #include <gmodule.h>
 #include <gio/gio.h>
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index c6c20eda..4f5de56e 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -274,7 +274,7 @@ gs_plugin_func (void)
        GsAppList *list_dup;
        GsAppList *list_remove;
        GsApp *app;
-       g_autoptr(AsProvide) prov = as_provide_new ();
+       g_autoptr(AsProvided) prov = as_provided_new ();
 
        /* check enums converted */
        for (guint i = 0; i < GS_PLUGIN_ACTION_LAST; i++) {
@@ -428,13 +428,13 @@ gs_plugin_func (void)
        /* prefer installed applications */
        list = gs_app_list_new ();
        app = gs_app_new ("e");
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        gs_app_set_unique_id (app, "user/foo/*/*/e/*");
        gs_app_set_priority (app, 0);
        gs_app_list_add (list, app);
        g_object_unref (app);
        app = gs_app_new ("e");
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_unique_id (app, "user/bar/*/*/e/*");
        gs_app_set_priority (app, 100);
        gs_app_list_add (list, app);
@@ -454,8 +454,8 @@ gs_plugin_func (void)
        gs_app_list_add (list, app);
        g_object_unref (app);
        app = gs_app_new ("org.gimp.GIMP");
-       as_provide_set_kind (prov, AS_PROVIDE_KIND_ID);
-       as_provide_set_value (prov, "gimp.desktop");
+       as_provided_set_kind (prov, AS_PROVIDED_KIND_ID);
+       as_provided_set_value (prov, "gimp.desktop");
        gs_app_add_provide (app, prov);
        gs_app_set_unique_id (app, "user/flathub/*/*/org.gimp.GIMP/*");
        gs_app_set_priority (app, 100);
@@ -608,10 +608,10 @@ gs_app_unique_id_func (void)
        unique_id = "system/flatpak/gnome/desktop/org.gnome.Software.desktop/master";
        gs_app_set_from_unique_id (app, unique_id);
        g_assert (GS_IS_APP (app));
-       g_assert_cmpint (gs_app_get_scope (app), ==, AS_APP_SCOPE_SYSTEM);
+       g_assert_cmpint (gs_app_get_scope (app), ==, AS_COMPONENT_SCOPE_SYSTEM);
        g_assert_cmpint (gs_app_get_bundle_kind (app), ==, AS_BUNDLE_KIND_FLATPAK);
        g_assert_cmpstr (gs_app_get_origin (app), ==, "gnome");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP_APP);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.gnome.Software.desktop");
        g_assert_cmpstr (gs_app_get_branch (app), ==, "master");
 }
@@ -657,18 +657,18 @@ gs_app_func (void)
        g_assert_cmpstr (gs_app_get_name (app), ==, "hugh");
 
        /* check non-transient state saving */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_REMOVING);
        gs_app_set_state_recover (app); // simulate an error
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
 
        /* try again */
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_REMOVING);
        gs_app_set_state_recover (app); // simulate an error
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
 
        /* correctly parse URL */
        gs_app_set_origin_hostname (app, "https://mirrors.fedoraproject.org/metalink";);
@@ -687,10 +687,10 @@ gs_app_func (void)
 
        /* check pending action */
        g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UNKNOWN);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_pending_action (app, GS_PLUGIN_ACTION_UPDATE);
        g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UPDATE);
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UNKNOWN);
        gs_app_set_state_recover (app);
 }
@@ -736,24 +736,24 @@ gs_app_list_func (void)
        gs_app_list_add_flag (list, GS_APP_LIST_FLAG_WATCH_APPS);
 
        g_assert_cmpint (gs_app_list_get_progress (list), ==, 0);
-       g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_UNKNOWN);
+       g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_UNKNOWN);
        gs_app_list_add (list, app1);
        gs_app_set_progress (app1, 75);
-       gs_app_set_state (app1, AS_APP_STATE_AVAILABLE);
-       gs_app_set_state (app1, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app1, GS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app1, GS_APP_STATE_INSTALLING);
        gs_test_flush_main_context ();
        g_assert_cmpint (gs_app_list_get_progress (list), ==, 75);
-       g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_INSTALLING);
+       g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_INSTALLING);
 
        gs_app_list_add (list, app2);
        gs_app_set_progress (app2, 25);
        gs_test_flush_main_context ();
        g_assert_cmpint (gs_app_list_get_progress (list), ==, 50);
-       g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_INSTALLING);
+       g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_INSTALLING);
 
        gs_app_list_remove (list, app1);
        g_assert_cmpint (gs_app_list_get_progress (list), ==, 25);
-       g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_UNKNOWN);
+       g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_UNKNOWN);
 }
 
 static void
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 866013d6..469bd13f 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -32,7 +32,7 @@ gs_appstream_create_app (GsPlugin *plugin, XbSilo *silo, XbNode *component, GErr
                return g_steal_pointer (&app_new);
 
        /* no longer supported */
-       if (gs_app_get_kind (app_new) == AS_APP_KIND_SHELL_EXTENSION) {
+       if (gs_app_get_kind (app_new) == AS_COMPONENT_KIND_SHELL_EXTENSION) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
                             GS_PLUGIN_ERROR_NOT_SUPPORTED,
@@ -373,9 +373,9 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
        }
        for (guint i = 0; i < provides->len; i++) {
                XbNode *provide = g_ptr_array_index (provides, i);
-               g_autoptr(AsProvide) pr = as_provide_new ();
-               as_provide_set_kind (pr, as_provide_kind_from_string (xb_node_get_element (provide)));
-               as_provide_set_value (pr, xb_node_get_text (provide));
+               g_autoptr(AsProvided) pr = as_provided_new ();
+               as_provided_set_kind (pr, as_provided_kind_from_string (xb_node_get_element (provide)));
+               as_provided_set_value (pr, xb_node_get_text (provide));
                gs_app_add_provide (app, pr);
        }
 
@@ -596,7 +596,7 @@ gs_appstream_is_valid_project_group (const gchar *project_group)
 {
        if (project_group == NULL)
                return FALSE;
-       return as_utils_is_environment_id (project_group);
+       return as_utils_is_desktop_environment (project_group);
 }
 
 static gboolean
@@ -694,14 +694,9 @@ gs_appstream_refine_app (GsPlugin *plugin,
                                   "requires/id[@type='id']"
                                   "[text()='org.gnome.Software.desktop']", NULL);
        if (req != NULL) {
-#if AS_CHECK_VERSION(0,7,15)
                gint rc = as_utils_vercmp_full (xb_node_get_attr (req, "version"),
                                                PACKAGE_VERSION,
                                                AS_VERSION_COMPARE_FLAG_NONE);
-#else
-               gint rc = as_utils_vercmp (xb_node_get_attr (req, "version"),
-                                          PACKAGE_VERSION);
-#endif
                if (rc > 0) {
                        g_set_error (error,
                                     GS_PLUGIN_ERROR,
@@ -713,18 +708,18 @@ gs_appstream_refine_app (GsPlugin *plugin,
 
        /* types we can never launch */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_ADDON:
-       case AS_APP_KIND_CODEC:
-       case AS_APP_KIND_DRIVER:
-       case AS_APP_KIND_FIRMWARE:
-       case AS_APP_KIND_FONT:
-       case AS_APP_KIND_GENERIC:
-       case AS_APP_KIND_INPUT_METHOD:
-       case AS_APP_KIND_LOCALIZATION:
-       case AS_APP_KIND_OS_UPDATE:
-       case AS_APP_KIND_OS_UPGRADE:
-       case AS_APP_KIND_RUNTIME:
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_ADDON:
+       case AS_COMPONENT_KIND_CODEC:
+       case AS_COMPONENT_KIND_DRIVER:
+       case AS_COMPONENT_KIND_FIRMWARE:
+       case AS_COMPONENT_KIND_FONT:
+       case AS_COMPONENT_KIND_GENERIC:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_LOCALIZATION:
+       case AS_COMPONENT_KIND_OS_UPDATE:
+       case AS_COMPONENT_KIND_OPERATING_SYSTEM:
+       case AS_COMPONENT_KIND_RUNTIME:
+       case AS_COMPONENT_KIND_REPOSITORY:
                gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
                break;
        default:
@@ -769,7 +764,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
        /* set scope */
        tmp = xb_node_query_text (component, "../info/scope", NULL);
        if (tmp != NULL)
-               gs_app_set_scope (app, as_app_scope_from_string (tmp));
+               gs_app_set_scope (app, as_component_scope_from_string (tmp));
 
        /* set content rating */
        if (TRUE) {
@@ -885,10 +880,10 @@ gs_appstream_refine_app (GsPlugin *plugin,
        }
 
        /* set id kind */
-       if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN ||
-           gs_app_get_kind (app) == AS_APP_KIND_GENERIC) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_UNKNOWN ||
+           gs_app_get_kind (app) == AS_COMPONENT_KIND_GENERIC) {
                tmp = xb_node_get_attr (component, "type");
-               gs_app_set_kind (app, as_app_kind_from_string (tmp));
+               gs_app_set_kind (app, as_component_kind_from_string (tmp));
        }
 
        /* set the release date */
@@ -1010,34 +1005,6 @@ gs_appstream_refine_app (GsPlugin *plugin,
                        gs_app_add_kudo (app, GS_APP_KUDO_FEATURED_RECOMMENDED);
                if (xb_node_query_text (component, "categories/category[text()='Featured']", NULL) != NULL)
                        gs_app_add_kudo (app, GS_APP_KUDO_FEATURED_RECOMMENDED);
-
-               /* add new-style kudos */
-               kudos = xb_node_query (component, "kudos/kudo", 0, NULL);
-               for (guint i = 0; kudos != NULL && i < kudos->len; i++) {
-                       XbNode *kudo = g_ptr_array_index (kudos, i);
-                       switch (as_kudo_kind_from_string (xb_node_get_text (kudo))) {
-                       case AS_KUDO_KIND_SEARCH_PROVIDER:
-                               gs_app_add_kudo (app, GS_APP_KUDO_SEARCH_PROVIDER);
-                               break;
-                       case AS_KUDO_KIND_USER_DOCS:
-                               gs_app_add_kudo (app, GS_APP_KUDO_INSTALLS_USER_DOCS);
-                               break;
-                       case AS_KUDO_KIND_MODERN_TOOLKIT:
-                               gs_app_add_kudo (app, GS_APP_KUDO_MODERN_TOOLKIT);
-                               break;
-                       case AS_KUDO_KIND_NOTIFICATIONS:
-                               gs_app_add_kudo (app, GS_APP_KUDO_USES_NOTIFICATIONS);
-                               break;
-                       case AS_KUDO_KIND_HIGH_CONTRAST:
-                               gs_app_add_kudo (app, GS_APP_KUDO_HIGH_CONTRAST);
-                               break;
-                       case AS_KUDO_KIND_HI_DPI_ICON:
-                               gs_app_add_kudo (app, GS_APP_KUDO_HI_DPI_ICON);
-                               break;
-                       default:
-                               break;
-                       }
-               }
        }
 
        /* we have an origin in the XML */
@@ -1130,15 +1097,15 @@ gs_appstream_search (GsPlugin *plugin,
                AsAppSearchMatch         match_value;
                const gchar             *xpath;
        } queries[] = {
-               { AS_APP_SEARCH_MATCH_MIMETYPE, "mimetypes/mimetype[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_PKGNAME,  "pkgname[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_COMMENT,  "summary[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_NAME,     "name[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_KEYWORD,  "keywords/keyword[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_ID,       "id[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_ID,       "launchable[text()~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_ORIGIN,   "../components[@origin~=stem(?)]" },
-               { AS_APP_SEARCH_MATCH_NONE,     NULL }
+               { AS_TOKEN_MATCH_MIMETYPE,      "mimetypes/mimetype[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_PKGNAME,       "pkgname[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_COMMENT,       "summary[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_NAME,  "name[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_KEYWORD,       "keywords/keyword[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_ID,    "id[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_ID,    "launchable[text()~=stem(?)]" },
+               { AS_TOKEN_MATCH_ORIGIN,        "../components[@origin~=stem(?)]" },
+               { AS_TOKEN_MATCH_NONE,  NULL }
        };
 
        /* add some weighted queries */
@@ -1560,36 +1527,36 @@ gs_appstream_component_add_extra_info (GsPlugin *plugin, XbBuilderNode *componen
 
        /* add the gnome-software-specific 'Addon' group and ensure they
         * all have an icon set */
-       switch (as_app_kind_from_string (kind)) {
-       case AS_APP_KIND_WEB_APP:
+       switch (as_component_kind_from_string (kind)) {
+       case AS_COMPONENT_KIND_WEB_APP:
                gs_appstream_component_add_keyword (component, kind);
                break;
-       case AS_APP_KIND_FONT:
+       case AS_COMPONENT_KIND_FONT:
                gs_appstream_component_add_category (component, "Addon");
                gs_appstream_component_add_category (component, "Font");
                break;
-       case AS_APP_KIND_DRIVER:
+       case AS_COMPONENT_KIND_DRIVER:
                gs_appstream_component_add_category (component, "Addon");
                gs_appstream_component_add_category (component, "Driver");
                gs_appstream_component_add_icon (component, "application-x-firmware-symbolic");
                break;
-       case AS_APP_KIND_LOCALIZATION:
+       case AS_COMPONENT_KIND_LOCALIZATION:
                gs_appstream_component_add_category (component, "Addon");
                gs_appstream_component_add_category (component, "Localization");
                gs_appstream_component_add_icon (component, "accessories-dictionary-symbolic");
                break;
-       case AS_APP_KIND_CODEC:
+       case AS_COMPONENT_KIND_CODEC:
                gs_appstream_component_add_category (component, "Addon");
                gs_appstream_component_add_category (component, "Codec");
                gs_appstream_component_add_icon (component, "application-x-addon");
                break;
-       case AS_APP_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
                gs_appstream_component_add_keyword (component, kind);
                gs_appstream_component_add_category (component, "Addon");
                gs_appstream_component_add_category (component, "InputSource");
                gs_appstream_component_add_icon (component, "system-run-symbolic");
                break;
-       case AS_APP_KIND_FIRMWARE:
+       case AS_COMPONENT_KIND_FIRMWARE:
                gs_appstream_component_add_icon (component, "system-run-symbolic");
                break;
        default:
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index de420bb7..ff2770c0 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -215,15 +215,15 @@ gs_plugin_appstream_load_desktop_cb (XbBuilderSource *self,
                                     GError **error)
 {
        GString *xml;
-       g_autoptr(AsApp) app = as_app_new ();
+       g_autoptr(AsComponent) cpt = as_component_new ();
        g_autoptr(GBytes) bytes = NULL;
        bytes = xb_builder_source_ctx_get_bytes (ctx, cancellable, error);
        if (bytes == NULL)
                return NULL;
-       as_app_set_id (app, xb_builder_source_ctx_get_filename (ctx));
-       if (!as_app_parse_data (app, bytes, AS_APP_PARSE_FLAG_USE_FALLBACKS, error))
+       as_component_set_id (cpt, xb_builder_source_ctx_get_filename (ctx));
+       if (!as_component_parse_data (cpt, bytes, AS_APP_PARSE_FLAG_USE_FALLBACKS, error))
                return NULL;
-       xml = as_app_to_xml (app, error);
+       xml = as_component_to_xml (cpt, error);
        if (xml == NULL)
                return NULL;
        g_string_prepend (xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
@@ -313,7 +313,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
                                   GError **error)
 {
        GString *xml;
-       g_autoptr(AsStore) store = as_store_new ();
+       g_autoptr(AsPool) pool = as_pool_new ();
        g_autoptr(GBytes) bytes = NULL;
        bytes = xb_builder_source_ctx_get_bytes (ctx, cancellable, error);
        if (bytes == NULL)
@@ -655,7 +655,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
        app = gs_appstream_create_app (plugin, priv->silo, component, error);
        if (app == NULL)
                return FALSE;
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
        gs_app_list_add (list, app);
        return TRUE;
 }
@@ -726,7 +726,7 @@ gs_plugin_appstream_refine_state (GsPlugin *plugin, GsApp *app, GError **error)
                g_propagate_error (error, g_steal_pointer (&error_local));
                return FALSE;
        }
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        return TRUE;
 }
 
@@ -773,7 +773,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin,
        }
 
        /* if an installed desktop or appdata file exists set to installed */
-       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
                if (!gs_plugin_appstream_refine_state (plugin, app, error))
                        return FALSE;
        }
@@ -908,7 +908,7 @@ gs_plugin_refine_wildcard (GsPlugin *plugin,
                new = gs_appstream_create_app (plugin, priv->silo, component, error);
                if (new == NULL)
                        return FALSE;
-               gs_app_set_scope (new, AS_APP_SCOPE_SYSTEM);
+               gs_app_set_scope (new, AS_COMPONENT_SCOPE_SYSTEM);
                gs_app_subsume_metadata (new, app);
                if (!gs_appstream_refine_app (plugin, new, priv->silo, component,
                                              refine_flags, error))
@@ -989,8 +989,8 @@ gs_plugin_add_installed (GsPlugin *plugin,
                g_autoptr(GsApp) app = gs_appstream_create_app (plugin, priv->silo, component, error);
                if (app == NULL)
                        return FALSE;
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
-               gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
+               gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
                gs_app_list_add (list, app);
        }
        return TRUE;
diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c
index 8ca56e15..2a45a458 100644
--- a/plugins/core/gs-plugin-generic-updates.c
+++ b/plugins/core/gs-plugin-generic-updates.c
@@ -25,12 +25,12 @@ gs_plugin_generic_updates_merge_os_update (GsApp *app)
 {
        /* this is only for grouping system-installed packages */
        if (gs_app_get_bundle_kind (app) != AS_BUNDLE_KIND_PACKAGE ||
-           gs_app_get_scope (app) != AS_APP_SCOPE_SYSTEM)
+           gs_app_get_scope (app) != AS_COMPONENT_SCOPE_SYSTEM)
                return FALSE;
 
-       if (gs_app_get_kind (app) == AS_APP_KIND_GENERIC)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_GENERIC)
                return TRUE;
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return TRUE;
 
        return FALSE;
@@ -47,8 +47,8 @@ gs_plugin_generic_updates_get_os_update (GsPlugin *plugin)
        app = gs_app_new (id);
        gs_app_add_quirk (app, GS_APP_QUIRK_IS_PROXY);
        gs_app_set_management_plugin (app, "");
-       gs_app_set_kind (app, AS_APP_KIND_OS_UPDATE);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_OS_UPDATE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_name (app,
                         GS_APP_QUALITY_NORMAL,
                         /* TRANSLATORS: this is a group of updates that are not
diff --git a/plugins/core/gs-plugin-key-colors-metadata.c b/plugins/core/gs-plugin-key-colors-metadata.c
index 2b8fa213..7e31e5ae 100644
--- a/plugins/core/gs-plugin-key-colors-metadata.c
+++ b/plugins/core/gs-plugin-key-colors-metadata.c
@@ -58,7 +58,7 @@ refine_app (GsPlugin             *plugin,
                                                 color->red * 255.f,
                                                 color->green * 255.f,
                                                 color->blue * 255.f);
-                       as_utils_string_replace (css_new, key, value);
+                       as_gstring_replace (css_new, key, value);
                }
 
                /* only replace if it's different */
diff --git a/plugins/core/gs-plugin-os-release.c b/plugins/core/gs-plugin-os-release.c
index 3ae902fa..03aee6fc 100644
--- a/plugins/core/gs-plugin-os-release.c
+++ b/plugins/core/gs-plugin-os-release.c
@@ -19,8 +19,8 @@ gs_plugin_initialize (GsPlugin *plugin)
 {
        GsPluginData *priv = gs_plugin_alloc_data (plugin, sizeof(GsPluginData));
        priv->app_system = gs_app_new ("system");
-       gs_app_set_kind (priv->app_system, AS_APP_KIND_OS_UPGRADE);
-       gs_app_set_state (priv->app_system, AS_APP_STATE_INSTALLED);
+       gs_app_set_kind (priv->app_system, AS_COMPONENT_KIND_OPERATING_SYSTEM);
+       gs_app_set_state (priv->app_system, GS_APP_STATE_INSTALLED);
 }
 
 void
diff --git a/plugins/core/gs-self-test.c b/plugins/core/gs-self-test.c
index 5aabbdfd..432af63d 100644
--- a/plugins/core/gs-self-test.c
+++ b/plugins/core/gs-self-test.c
@@ -30,7 +30,7 @@ gs_plugins_core_search_repo_name_func (GsPluginLoader *plugin_loader)
 
        /* force this app to be installed */
        app_tmp = gs_plugin_loader_app_create (plugin_loader, "*/*/yellow/desktop/arachne.desktop/*");
-       gs_app_set_state (app_tmp, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app_tmp, GS_APP_STATE_INSTALLED);
 
        /* get search result based on addon keyword */
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
@@ -46,7 +46,7 @@ gs_plugins_core_search_repo_name_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "arachne.desktop");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
 }
 
 static void
@@ -76,8 +76,8 @@ gs_plugins_core_os_release_func (GsPluginLoader *plugin_loader)
 
        /* make sure there is valid content */
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.fedoraproject.Fedora-25");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPGRADE);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_OPERATING_SYSTEM);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_name (app), ==, "Fedora");
        g_assert_cmpstr (gs_app_get_version (app), ==, "25");
        g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==,
@@ -117,14 +117,14 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader)
        list = gs_app_list_new ();
        app1 = gs_app_new ("package1");
        app2 = gs_app_new ("package2");
-       gs_app_set_kind (app1, AS_APP_KIND_GENERIC);
-       gs_app_set_kind (app2, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app1, AS_COMPONENT_KIND_GENERIC);
+       gs_app_set_kind (app2, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app1, AS_BUNDLE_KIND_PACKAGE);
        gs_app_set_bundle_kind (app2, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app1, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_scope (app2, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_state (app1, AS_APP_STATE_UPDATABLE);
-       gs_app_set_state (app2, AS_APP_STATE_UPDATABLE);
+       gs_app_set_scope (app1, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_scope (app2, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_state (app1, GS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app2, GS_APP_STATE_UPDATABLE);
        gs_app_add_source (app1, "package1");
        gs_app_add_source (app2, "package2");
        gs_app_list_add (list, app1);
@@ -146,7 +146,7 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader)
 
        /* make sure the os update is valid */
        g_assert_cmpstr (gs_app_get_id (os_update), ==, "org.gnome.Software.OsUpdate");
-       g_assert_cmpint (gs_app_get_kind (os_update), ==, AS_APP_KIND_OS_UPDATE);
+       g_assert_cmpint (gs_app_get_kind (os_update), ==, AS_COMPONENT_KIND_OS_UPDATE);
        g_assert (gs_app_has_quirk (os_update, GS_APP_QUIRK_IS_PROXY));
 
        /* must have two related apps, the ones we added earlier */
@@ -157,7 +157,7 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader)
        list_wildcard = gs_app_list_new ();
        app_wildcard = gs_app_new ("nosuchapp.desktop");
        gs_app_add_quirk (app_wildcard, GS_APP_QUIRK_IS_WILDCARD);
-       gs_app_set_kind (app_wildcard, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app_wildcard, AS_COMPONENT_KIND_GENERIC);
        gs_app_list_add (list_wildcard, app_wildcard);
        plugin_job2 = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFINE,
                                          "list", list_wildcard,
@@ -171,7 +171,7 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader)
        /* no OsUpdate item created */
        for (guint i = 0; i < gs_app_list_length (list_wildcard); i++) {
                GsApp *app_tmp = gs_app_list_index (list_wildcard, i);
-               g_assert_cmpint (gs_app_get_kind (app_tmp), !=, AS_APP_KIND_OS_UPDATE);
+               g_assert_cmpint (gs_app_get_kind (app_tmp), !=, AS_COMPONENT_KIND_OS_UPDATE);
                g_assert (!gs_app_has_quirk (app_tmp, GS_APP_QUIRK_IS_PROXY));
        }
 }
diff --git a/plugins/dpkg/gs-plugin-dpkg.c b/plugins/dpkg/gs-plugin-dpkg.c
index 48fb72a2..eb386a12 100644
--- a/plugins/dpkg/gs-plugin-dpkg.c
+++ b/plugins/dpkg/gs-plugin-dpkg.c
@@ -77,14 +77,14 @@ gs_plugin_file_to_app (GsPlugin *plugin,
 
        /* create app */
        app = gs_app_new (NULL);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
        gs_app_add_source (app, tokens[0]);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, tokens[0]);
        gs_app_set_version (app, tokens[1]);
        gs_app_set_size_installed (app, 1024 * g_ascii_strtoull (tokens[2], NULL, 10));
        gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, tokens[3]);
        gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, tokens[4]);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
        gs_app_set_metadata (app, "GnomeSoftware::Creator",
                             gs_plugin_get_name (plugin));
diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c
index 824baaeb..baf2e864 100644
--- a/plugins/dummy/gs-plugin-dummy.c
+++ b/plugins/dummy/gs-plugin-dummy.c
@@ -55,7 +55,7 @@ gs_plugin_initialize (GsPlugin *plugin)
 
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
-       gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (priv->cached_origin, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_origin_hostname (priv->cached_origin, "http://www.bbc.co.uk/";);
 
        /* add the source to the plugin cache which allows us to match the
@@ -316,8 +316,8 @@ gs_plugin_add_search (GsPlugin *plugin,
        gs_app_add_icon (app, ic);
        gs_app_set_size_installed (app, 42 * 1024 * 1024);
        gs_app_set_size_download (app, 50 * 1024 * 1024);
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_set_metadata (app, "GnomeSoftware::Creator",
                             gs_plugin_get_name (plugin));
@@ -358,8 +358,8 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_update_details (app, "Do not crash when using libvirt.");
        gs_app_set_update_urgency (app, AS_URGENCY_KIND_HIGH);
        gs_app_add_icon (app, ic);
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_list_add (list, app);
        g_object_unref (app);
@@ -370,10 +370,10 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Development files for libvirt");
        gs_app_set_update_details (app, "Fix several memory leaks.");
        gs_app_set_update_urgency (app, AS_URGENCY_KIND_LOW);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        gs_app_add_source (app, "libvirt-glib-devel");
        gs_app_add_source_id (app, "libvirt-glib-devel;0.0.1;noarch;fedora");
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -386,10 +386,10 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "library for chiron");
        gs_app_set_update_details (app, "Do not crash when using libvirt.");
        gs_app_set_update_urgency (app, AS_URGENCY_KIND_HIGH);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_add_source (app, "chiron-libs");
        gs_app_add_source_id (app, "chiron-libs;0.0.1;i386;updates-testing");
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -403,9 +403,9 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_update_details (proxy, "Update all related apps.");
        gs_app_set_update_urgency (proxy, AS_URGENCY_KIND_HIGH);
        gs_app_add_icon (proxy, ic);
-       gs_app_set_kind (proxy, AS_APP_KIND_DESKTOP);
+       gs_app_set_kind (proxy, AS_COMPONENT_KIND_DESKTOP);
        gs_app_add_quirk (proxy, GS_APP_QUIRK_IS_PROXY);
-       gs_app_set_state (proxy, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_state (proxy, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_management_plugin (proxy, gs_plugin_get_name (plugin));
        gs_app_list_add (list, proxy);
        g_object_unref (proxy);
@@ -414,8 +414,8 @@ gs_plugin_add_updates (GsPlugin *plugin,
        app = gs_app_new ("proxy-related-app.desktop");
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Related app");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A related app");
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_add_related (proxy, app);
        g_object_unref (app);
@@ -424,8 +424,8 @@ gs_plugin_add_updates (GsPlugin *plugin,
        app = gs_app_new ("proxy-another-related-app.desktop");
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Another Related app");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A related app");
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_add_related (proxy, app);
        g_object_unref (app);
@@ -447,8 +447,8 @@ gs_plugin_add_installed (GsPlugin *plugin,
        for (i = 0; packages[i] != NULL; i++) {
                g_autoptr(GsApp) app = gs_app_new (NULL);
                gs_app_add_source (app, packages[i]);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
-               gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
                gs_app_set_origin (app, "london-west");
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                gs_app_list_add (list, app);
@@ -457,8 +457,8 @@ gs_plugin_add_installed (GsPlugin *plugin,
        /* add all app-ids */
        for (i = 0; app_ids[i] != NULL; i++) {
                g_autoptr(GsApp) app = gs_app_new (app_ids[i]);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
-               gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                gs_app_list_add (list, app);
        }
@@ -484,7 +484,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
 
        /* add again, this time with a prefix so it gets deduplicated */
        app2 = gs_app_new ("zeus.desktop");
-       gs_app_set_scope (app2, AS_APP_SCOPE_USER);
+       gs_app_set_scope (app2, AS_COMPONENT_SCOPE_USER);
        gs_app_set_bundle_kind (app2, AS_BUNDLE_KIND_SNAP);
        gs_app_set_metadata (app2, "GnomeSoftware::Creator",
                             gs_plugin_get_name (plugin));
@@ -507,12 +507,12 @@ gs_plugin_app_remove (GsPlugin *plugin,
 
        /* remove app */
        if (g_strcmp0 (gs_app_get_id (app), "chiron.desktop") == 0) {
-               gs_app_set_state (app, AS_APP_STATE_REMOVING);
+               gs_app_set_state (app, GS_APP_STATE_REMOVING);
                if (!gs_plugin_dummy_delay (plugin, app, 500, cancellable, error)) {
                        gs_app_set_state_recover (app);
                        return FALSE;
                }
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
        }
 
        /* keep track */
@@ -539,12 +539,12 @@ gs_plugin_app_install (GsPlugin *plugin,
        /* install app */
        if (g_strcmp0 (gs_app_get_id (app), "chiron.desktop") == 0 ||
            g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0) {
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                if (!gs_plugin_dummy_delay (plugin, app, 500, cancellable, error)) {
                        gs_app_set_state_recover (app);
                        return FALSE;
                }
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        }
 
        /* keep track */
@@ -580,12 +580,12 @@ gs_plugin_update_app (GsPlugin *plugin,
        }
 
        /* simulate an update for 4 seconds */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        for (guint i = 1; i <= 4; ++i) {
                gs_app_set_progress (app, 25 * i);
                sleep (1);
        }
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
        return TRUE;
 }
@@ -601,16 +601,16 @@ refine_app (GsPlugin *plugin,
 
        /* make the local system EOL */
        if (gs_app_get_metadata_item (app, "GnomeSoftware::CpeName") != NULL)
-               gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
 
        /* state */
-       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
                if (g_hash_table_lookup (priv->installed_apps,
                                         gs_app_get_id (app)) != NULL)
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
                if (g_hash_table_lookup (priv->available_apps,
                                         gs_app_get_id (app)) != NULL)
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        }
 
        /* kind */
@@ -618,8 +618,8 @@ refine_app (GsPlugin *plugin,
            g_strcmp0 (gs_app_get_id (app), "mate-spell.desktop") == 0 ||
            g_strcmp0 (gs_app_get_id (app), "com.hughski.ColorHug2.driver") == 0 ||
            g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0) {
-               if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN)
-                       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+               if (gs_app_get_kind (app) == AS_COMPONENT_KIND_UNKNOWN)
+                       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
        }
 
        /* license */
@@ -741,10 +741,10 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Chiron");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "View and use virtual machines");
        gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, "http://www.box.org";);
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_pixbuf (app, gdk_pixbuf_new_from_file 
("/usr/share/icons/hicolor/48x48/apps/chiron.desktop.png", NULL));
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_list_add (list, app);
        return TRUE;
@@ -761,10 +761,10 @@ gs_plugin_add_recent (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Chiron");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "View and use virtual machines");
        gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, "http://www.box.org";);
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_pixbuf (app, gdk_pixbuf_new_from_file 
("/usr/share/icons/hicolor/48x48/apps/chiron.desktop.png", NULL));
-       gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_list_add (list, app);
        return TRUE;
@@ -792,10 +792,10 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
        }
 
        app = gs_app_new ("org.fedoraproject.release-rawhide.upgrade");
-       gs_app_set_scope (app, AS_APP_SCOPE_USER);
-       gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_USER);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, "Fedora");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
                            "A major upgrade, with new features and added polish.");
@@ -849,12 +849,12 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app,
                return TRUE;
 
        g_debug ("starting download");
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        if (!gs_plugin_dummy_delay (plugin, app, 5000, cancellable, error)) {
                gs_app_set_state_recover (app);
                return FALSE;
        }
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        return TRUE;
 }
 
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 30360ccd..ba0c7455 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -59,7 +59,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
        /* install */
        app = gs_app_new ("chiron.desktop");
        gs_app_set_management_plugin (app, "dummy");
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", app,
                                         NULL);
@@ -67,7 +67,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
 
        /* remove */
        g_object_unref (plugin_job);
@@ -78,7 +78,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
 }
 
 static void
@@ -99,7 +99,7 @@ gs_plugins_dummy_error_func (GsPluginLoader *plugin_loader)
        /* update, which should cause an error to be emitted */
        app = gs_app_new ("chiron.desktop");
        gs_app_set_management_plugin (app, "dummy");
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_UPDATE,
                                         "app", app,
                                         NULL);
@@ -267,8 +267,8 @@ gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 3);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "chiron.desktop");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
        g_assert_cmpstr (gs_app_get_update_details (app), ==, "Do not crash when using libvirt.");
        g_assert_cmpint (gs_app_get_update_urgency (app), ==, AS_URGENCY_KIND_HIGH);
 
@@ -277,15 +277,15 @@ gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.gnome.Software.OsUpdate");
        g_assert_cmpstr (gs_app_get_name (app), ==, "OS Updates");
        g_assert_cmpstr (gs_app_get_summary (app), ==, "Includes performance, stability and security 
improvements.");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPDATE);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_OS_UPDATE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
        g_assert_cmpint (gs_app_list_length (gs_app_get_related (app)), ==, 2);
 
        /* get the virtual non-apps OS update */
        app = gs_app_list_index (list, 1);
        g_assert_cmpstr (gs_app_get_id (app), ==, "proxy.desktop");
        g_assert (gs_app_has_quirk (app, GS_APP_QUIRK_IS_PROXY));
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
        g_assert_cmpint (gs_app_list_length (gs_app_get_related (app)), ==, 2);
 }
 
@@ -309,8 +309,8 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.fedoraproject.release-rawhide.upgrade");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPGRADE);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_OPERATING_SYSTEM);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
 
        /* this should be set with a higher priority by AppStream */
        g_assert_cmpstr (gs_app_get_summary (app), ==, "Release specific tagline");
@@ -324,7 +324,7 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
 
        /* trigger the update */
        g_object_unref (plugin_job);
@@ -335,7 +335,7 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
 }
 
 static void
@@ -369,8 +369,8 @@ gs_plugins_dummy_installed_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "zeus.desktop");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_name (app), ==, "Zeus");
        g_assert_cmpstr (gs_app_get_source_default (app), ==, "zeus");
        g_assert (gs_app_get_pixbuf (app) != NULL);
@@ -396,8 +396,8 @@ gs_plugins_dummy_installed_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (addons), ==, 1);
        addon = gs_app_list_index (addons, 0);
        g_assert_cmpstr (gs_app_get_id (addon), ==, "zeus-spell.addon");
-       g_assert_cmpint (gs_app_get_kind (addon), ==, AS_APP_KIND_ADDON);
-       g_assert_cmpint (gs_app_get_state (addon), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_kind (addon), ==, AS_COMPONENT_KIND_ADDON);
+       g_assert_cmpint (gs_app_get_state (addon), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpstr (gs_app_get_name (addon), ==, "Spell Check");
        g_assert_cmpstr (gs_app_get_source_default (addon), ==, "zeus-spell");
        g_assert_cmpstr (gs_app_get_license (addon), ==,
@@ -427,7 +427,7 @@ gs_plugins_dummy_search_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "zeus.desktop");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
 }
 
 static void
@@ -454,10 +454,10 @@ gs_plugins_dummy_search_alternate_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 2);
        app_tmp = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app_tmp), ==, "chiron.desktop");
-       g_assert_cmpint (gs_app_get_kind (app_tmp), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app_tmp), ==, AS_COMPONENT_KIND_DESKTOP);
        app_tmp = gs_app_list_index (list, 1);
        g_assert_cmpstr (gs_app_get_id (app_tmp), ==, "zeus.desktop");
-       g_assert_cmpint (gs_app_get_kind (app_tmp), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app_tmp), ==, AS_COMPONENT_KIND_DESKTOP);
 }
 
 static void
@@ -516,7 +516,7 @@ gs_plugins_dummy_url_to_app_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (error);
        g_assert (app != NULL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "chiron.desktop");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
 }
 
 static void
@@ -633,20 +633,20 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app1 = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app1), ==, "org.fedoraproject.release-rawhide.upgrade");
-       g_assert_cmpint (gs_app_get_kind (app1), ==, AS_APP_KIND_OS_UPGRADE);
-       g_assert_cmpint (gs_app_get_state (app1), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_kind (app1), ==, AS_COMPONENT_KIND_OPERATING_SYSTEM);
+       g_assert_cmpint (gs_app_get_state (app1), ==, GS_APP_STATE_AVAILABLE);
 
        /* allow only one operation at a time */
        gs_plugin_loader_set_max_parallel_ops (plugin_loader, 1);
 
        app2 = gs_app_new ("chiron.desktop");
        gs_app_set_management_plugin (app2, "dummy");
-       gs_app_set_state (app2, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app2, GS_APP_STATE_AVAILABLE);
 
        /* use "proxy" prefix so the update function succeeds... */
        app3 = gs_app_new ("proxy-zeus.desktop");
        gs_app_set_management_plugin (app3, "dummy");
-       gs_app_set_state (app3, AS_APP_STATE_UPDATABLE_LIVE);
+       gs_app_set_state (app3, GS_APP_STATE_UPDATABLE_LIVE);
 
        context = g_main_context_new ();
        helper3->loop = g_main_loop_new (context, FALSE);
@@ -687,9 +687,9 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
 
        /* since we have only 1 parallel installation op possible,
         * verify the last operations are pending */
-       g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpint (gs_app_get_pending_action (app2), ==, GS_PLUGIN_ACTION_INSTALL);
-       g_assert_cmpint (gs_app_get_state (app3), ==, AS_APP_STATE_UPDATABLE_LIVE);
+       g_assert_cmpint (gs_app_get_state (app3), ==, GS_APP_STATE_UPDATABLE_LIVE);
        g_assert_cmpint (gs_app_get_pending_action (app3), ==, GS_PLUGIN_ACTION_UPDATE);
 
        /* wait for the 2nd installation to finish, it means the 1st should have been
@@ -702,9 +702,9 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
        g_assert_no_error (helper2->error);
        g_assert_no_error (helper3->error);
 
-       g_assert_cmpint (gs_app_get_state (app1), ==, AS_APP_STATE_UPDATABLE);
-       g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
-       g_assert_cmpint (gs_app_get_state (app3), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app1), ==, GS_APP_STATE_UPDATABLE);
+       g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app3), ==, GS_APP_STATE_INSTALLED);
 
        /* set the default max parallel ops */
        gs_plugin_loader_set_max_parallel_ops (plugin_loader, 0);
diff --git a/plugins/eos-updater/gs-plugin-eos-updater.c b/plugins/eos-updater/gs-plugin-eos-updater.c
index a8aba16f..a8d7127a 100644
--- a/plugins/eos-updater/gs-plugin-eos-updater.c
+++ b/plugins/eos-updater/gs-plugin-eos-updater.c
@@ -221,20 +221,20 @@ os_upgrade_cancelled_cb (GCancellable *cancellable,
 }
 
 static gboolean
-should_add_os_upgrade (AsAppState state)
+should_add_os_upgrade (GsAppState state)
 {
        switch (state) {
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
-       case AS_APP_STATE_INSTALLING:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                return TRUE;
-       case AS_APP_STATE_UNKNOWN:
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UNAVAILABLE:
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_UNKNOWN:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_REMOVING:
        default:
                return FALSE;
        }
@@ -246,9 +246,9 @@ should_add_os_upgrade (AsAppState state)
 static void
 app_set_state (GsPlugin   *plugin,
                GsApp      *app,
-               AsAppState  new_state)
+               GsAppState  new_state)
 {
-       AsAppState old_state = gs_app_get_state (app);
+       GsAppState old_state = gs_app_get_state (app);
 
        if (new_state == old_state)
                return;
@@ -355,8 +355,8 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
        GsPluginData *priv = gs_plugin_get_data (plugin);
        GsApp *app = priv->os_upgrade;
        EosUpdaterState state;
-       AsAppState previous_app_state = gs_app_get_state (app);
-       AsAppState current_app_state;
+       GsAppState previous_app_state = gs_app_get_state (app);
+       GsAppState current_app_state;
 
        /* in case the OS upgrade has been disabled */
        if (priv->updater_proxy == NULL) {
@@ -370,7 +370,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
        switch (state) {
        case EOS_UPDATER_STATE_NONE:
        case EOS_UPDATER_STATE_READY: {
-               app_set_state (plugin, app, AS_APP_STATE_UNKNOWN);
+               app_set_state (plugin, app, GS_APP_STATE_UNKNOWN);
                break;
        } case EOS_UPDATER_STATE_POLLING: {
                /* Nothing to do here. */
@@ -378,7 +378,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
        } case EOS_UPDATER_STATE_UPDATE_AVAILABLE: {
                guint64 total_size;
 
-               app_set_state (plugin, app, AS_APP_STATE_AVAILABLE);
+               app_set_state (plugin, app, GS_APP_STATE_AVAILABLE);
 
                total_size = gs_eos_updater_get_download_size (priv->updater_proxy);
                gs_app_set_size_download (app, total_size);
@@ -392,7 +392,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
 
                /* FIXME: Set to QUEUED_FOR_INSTALL if we’re waiting for metered
                 * data permission. */
-               app_set_state (plugin, app, AS_APP_STATE_INSTALLING);
+               app_set_state (plugin, app, GS_APP_STATE_INSTALLING);
 
                downloaded = gs_eos_updater_get_downloaded_bytes (priv->updater_proxy);
                total_size = gs_eos_updater_get_download_size (priv->updater_proxy);
@@ -411,13 +411,13 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
                break;
        }
        case EOS_UPDATER_STATE_UPDATE_READY: {
-               app_set_state (plugin, app, AS_APP_STATE_UPDATABLE);
+               app_set_state (plugin, app, GS_APP_STATE_UPDATABLE);
                break;
        }
        case EOS_UPDATER_STATE_APPLYING_UPDATE: {
                /* set as 'installing' because if it is applying the update, we
                 * want to show the progress bar */
-               app_set_state (plugin, app, AS_APP_STATE_INSTALLING);
+               app_set_state (plugin, app, GS_APP_STATE_INSTALLING);
 
                /* set up the fake progress to inform the user that something
                 * is still being done (we don't get progress reports from
@@ -433,7 +433,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
                break;
        }
        case EOS_UPDATER_STATE_UPDATE_APPLIED: {
-               app_set_state (plugin, app, AS_APP_STATE_UPDATABLE);
+               app_set_state (plugin, app, GS_APP_STATE_UPDATABLE);
 
                break;
        }
@@ -453,7 +453,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
                /* We can’t recover the app state since eos-updater needs to
                 * go through the ready → poll → fetch → apply loop again in
                 * order to recover its state. So go back to ‘unknown’. */
-               app_set_state (plugin, app, AS_APP_STATE_UNKNOWN);
+               app_set_state (plugin, app, GS_APP_STATE_UNKNOWN);
 
                /* Cancelling anything in the updater will result in a
                 * transition to the Error state. Use that as a cue to reset
@@ -470,8 +470,8 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
        current_app_state = gs_app_get_state (app);
 
        g_debug ("%s: Old app state: %s; new app state: %s",
-                G_STRFUNC, as_app_state_to_string (previous_app_state),
-                as_app_state_to_string (current_app_state));
+                G_STRFUNC, gs_app_state_to_string (previous_app_state),
+                gs_app_state_to_string (current_app_state));
 
        /* if the state changed from or to 'unknown', we need to notify that a
         * new update should be shown */
@@ -556,8 +556,8 @@ gs_plugin_setup (GsPlugin *plugin,
        /* create the OS upgrade */
        app = gs_app_new ("com.endlessm.EOS.upgrade");
        gs_app_add_icon (app, ic);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM);
        /* TRANSLATORS: ‘Endless OS’ is a brand name; https://endlessos.com/ */
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, _("Endless OS"));
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
@@ -683,7 +683,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
 
        /* if we are testing the plugin, then always add the OS upgrade */
        if (g_getenv ("GS_PLUGIN_EOS_TEST") != NULL) {
-               gs_app_set_state (priv->os_upgrade, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (priv->os_upgrade, GS_APP_STATE_AVAILABLE);
                gs_app_list_add (list, priv->os_upgrade);
                return TRUE;
        }
diff --git a/plugins/fedora-langpacks/gs-plugin-fedora-langpacks.c 
b/plugins/fedora-langpacks/gs-plugin-fedora-langpacks.c
index ea673b10..26534548 100644
--- a/plugins/fedora-langpacks/gs-plugin-fedora-langpacks.c
+++ b/plugins/fedora-langpacks/gs-plugin-fedora-langpacks.c
@@ -86,9 +86,9 @@ gs_plugin_add_langpacks (GsPlugin *plugin,
        if (!g_file_test (cachefn, G_FILE_TEST_EXISTS)) {
                g_autoptr(GsApp) app = gs_app_new (NULL);
                gs_app_set_metadata (app, "GnomeSoftware::Creator", gs_plugin_get_name (plugin));
-               gs_app_set_kind (app, AS_APP_KIND_LOCALIZATION);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_LOCALIZATION);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-               gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+               gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
                gs_app_add_source (app, langpack_pkgname);
                gs_app_list_add (list, app);
 
diff --git a/plugins/fedora-langpacks/gs-self-test.c b/plugins/fedora-langpacks/gs-self-test.c
index ae2344ce..df15e33d 100644
--- a/plugins/fedora-langpacks/gs-self-test.c
+++ b/plugins/fedora-langpacks/gs-self-test.c
@@ -52,7 +52,7 @@ gs_plugins_fedora_langpacks_func (GsPluginLoader *plugin_loader)
        /* check app's source and kind */
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_source_default (app), ==, "langpacks-ja");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_LOCALIZATION);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_LOCALIZATION);
 }
 
 int
diff --git a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c 
b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
index a103f7fb..c26f846c 100644
--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
+++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
@@ -153,7 +153,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
 
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
-       gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (priv->cached_origin, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_origin_hostname (priv->cached_origin,
                                    FEDORA_PKGDB_COLLECTIONS_API_URI);
 
@@ -274,8 +274,8 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item)
 
        /* create */
        app = gs_app_new (app_id);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
-       gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, item->name);
        gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
@@ -514,7 +514,7 @@ refine_app_locked (GsPlugin             *plugin,
        const gchar *cpe_name;
 
        /* not for us */
-       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM)
                return TRUE;
 
        /* not enough metadata */
@@ -533,10 +533,10 @@ refine_app_locked (GsPlugin             *plugin,
        switch (item->status) {
        case PKGDB_ITEM_STATUS_ACTIVE:
        case PKGDB_ITEM_STATUS_DEVEL:
-               gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+               gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
                break;
        case PKGDB_ITEM_STATUS_EOL:
-               gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
                break;
        default:
                break;
diff --git a/plugins/flatpak/gs-flatpak-transaction.c b/plugins/flatpak/gs-flatpak-transaction.c
index e1c74725..28dd912b 100644
--- a/plugins/flatpak/gs-flatpak-transaction.c
+++ b/plugins/flatpak/gs-flatpak-transaction.c
@@ -177,7 +177,7 @@ _transaction_ready (FlatpakTransaction *transaction)
                         * involved to ensure updating the button state */
                        if (flatpak_transaction_operation_get_operation_type (op) ==
                                        FLATPAK_TRANSACTION_OPERATION_UPDATE)
-                               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+                               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                }
 
 #if FLATPAK_CHECK_VERSION(1, 7, 3)
@@ -297,8 +297,8 @@ update_progress_for_op (GsFlatpakTransaction        *self,
                                   flatpak_transaction_operation_get_ref (root_op));
                        return;
                }
-               if (gs_app_get_state (root_app) != AS_APP_STATE_INSTALLING &&
-                   gs_app_get_state (root_app) != AS_APP_STATE_REMOVING)
+               if (gs_app_get_state (root_app) != GS_APP_STATE_INSTALLING &&
+                   gs_app_get_state (root_app) != GS_APP_STATE_REMOVING)
                        return;
        } else {
                GsApp *unskipped_root_app = _transaction_operation_get_app (root_op);
@@ -506,22 +506,22 @@ _transaction_new_operation (FlatpakTransaction *transaction,
        /* set app status */
        switch (flatpak_transaction_operation_get_operation_type (operation)) {
        case FLATPAK_TRANSACTION_OPERATION_INSTALL:
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                break;
        case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                break;
        case FLATPAK_TRANSACTION_OPERATION_UPDATE:
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                break;
        case FLATPAK_TRANSACTION_OPERATION_UNINSTALL:
-               gs_app_set_state (app, AS_APP_STATE_REMOVING);
+               gs_app_set_state (app, GS_APP_STATE_REMOVING);
                break;
        default:
                break;
@@ -592,7 +592,7 @@ set_skipped_related_apps_to_installed (GsFlatpakTransaction        *self,
                        ref = flatpak_transaction_operation_get_ref (related_to_op);
                        related_to_app = _ref_to_app (self, ref);
                        if (related_to_app != NULL)
-                               gs_app_set_state (related_to_app, AS_APP_STATE_INSTALLED);
+                               gs_app_set_state (related_to_app, GS_APP_STATE_INSTALLED);
                }
        }
 }
@@ -617,7 +617,7 @@ _transaction_operation_done (FlatpakTransaction *transaction,
        switch (flatpak_transaction_operation_get_operation_type (operation)) {
        case FLATPAK_TRANSACTION_OPERATION_INSTALL:
        case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
 #if FLATPAK_CHECK_VERSION(1,7,3)
                set_skipped_related_apps_to_installed (self, transaction, operation);
@@ -636,9 +636,9 @@ _transaction_operation_done (FlatpakTransaction *transaction,
 #else
                if (flatpak_transaction_get_no_deploy (transaction))
 #endif
-                       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+                       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
                else
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
 #if FLATPAK_CHECK_VERSION(1,7,3)
                set_skipped_related_apps_to_installed (self, transaction, operation);
@@ -647,10 +647,10 @@ _transaction_operation_done (FlatpakTransaction *transaction,
        case FLATPAK_TRANSACTION_OPERATION_UNINSTALL:
                /* we don't actually know if this app is re-installable */
                gs_flatpak_app_set_commit (app, NULL);
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
                break;
        default:
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
                break;
        }
 }
diff --git a/plugins/flatpak/gs-flatpak-utils.c b/plugins/flatpak/gs-flatpak-utils.c
index 4dee1041..2a475c7d 100644
--- a/plugins/flatpak/gs-flatpak-utils.c
+++ b/plugins/flatpak/gs-flatpak-utils.c
@@ -66,9 +66,9 @@ gs_flatpak_app_new_from_remote (FlatpakRemote *xremote)
        g_autoptr(GsApp) app = NULL;
 
        app = gs_flatpak_app_new (flatpak_remote_get_name (xremote));
-       gs_app_set_kind (app, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_state (app, flatpak_remote_get_disabled (xremote) ?
-                         AS_APP_STATE_AVAILABLE : AS_APP_STATE_INSTALLED);
+                         GS_APP_STATE_AVAILABLE : GS_APP_STATE_INSTALLED);
        gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
                         flatpak_remote_get_name (xremote));
@@ -164,8 +164,8 @@ gs_flatpak_app_new_from_repo_file (GFile *file,
        /* create source */
        app = gs_flatpak_app_new (repo_id);
        gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_REPO);
-       gs_app_set_kind (app, AS_APP_KIND_SOURCE);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_REPOSITORY);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
        gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, repo_title);
        gs_app_set_size_download (app, GS_APP_SIZE_UNKNOWABLE);
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 507ad305..73a8f3ee 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -33,7 +33,7 @@ struct _GsFlatpak {
        GHashTable              *broken_remotes;
        GMutex                   broken_remotes_mutex;
        GFileMonitor            *monitor;
-       AsAppScope               scope;
+       AsComponentScope                 scope;
        GsPlugin                *plugin;
        XbSilo                  *silo;
        GRWLock                  silo_lock;
@@ -52,9 +52,9 @@ gs_flatpak_refresh_appstream (GsFlatpak *self, guint cache_age,
 static void
 gs_plugin_refine_item_scope (GsFlatpak *self, GsApp *app)
 {
-       if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN) {
+       if (gs_app_get_scope (app) == AS_COMPONENT_SCOPE_UNKNOWN) {
                gboolean is_user = flatpak_installation_get_is_user (self->installation);
-               gs_app_set_scope (app, is_user ? AS_APP_SCOPE_USER : AS_APP_SCOPE_SYSTEM);
+               gs_app_set_scope (app, is_user ? AS_COMPONENT_SCOPE_USER : AS_COMPONENT_SCOPE_SYSTEM);
        }
 }
 
@@ -86,20 +86,20 @@ static void
 gs_flatpak_set_kind_from_flatpak (GsApp *app, FlatpakRef *xref)
 {
        if (flatpak_ref_get_kind (xref) == FLATPAK_REF_KIND_APP) {
-               gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
        } else if (flatpak_ref_get_kind (xref) == FLATPAK_REF_KIND_RUNTIME) {
                const gchar *id = gs_app_get_id (app);
                /* this is anything that's not an app, including locales
                 * sources and debuginfo */
                if (g_str_has_suffix (id, ".Locale")) {
-                       gs_app_set_kind (app, AS_APP_KIND_LOCALIZATION);
+                       gs_app_set_kind (app, AS_COMPONENT_KIND_LOCALIZATION);
                } else if (g_str_has_suffix (id, ".Debug") ||
                           g_str_has_suffix (id, ".Sources") ||
                           g_str_has_prefix (id, "org.freedesktop.Platform.Icontheme.") ||
                           g_str_has_prefix (id, "org.gtk.Gtk3theme.")) {
-                       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+                       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
                } else {
-                       gs_app_set_kind (app, AS_APP_KIND_RUNTIME);
+                       gs_app_set_kind (app, AS_COMPONENT_KIND_RUNTIME);
                }
        }
 }
@@ -231,8 +231,8 @@ gs_flatpak_set_metadata (GsFlatpak *self, GsApp *app, FlatpakRef *xref)
        gs_flatpak_app_set_commit (app, flatpak_ref_get_commit (xref));
 
        /* map the flatpak kind to the gnome-software kind */
-       if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN ||
-           gs_app_get_kind (app) == AS_APP_KIND_GENERIC) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_UNKNOWN ||
+           gs_app_get_kind (app) == AS_COMPONENT_KIND_GENERIC) {
                gs_flatpak_set_kind_from_flatpak (app, xref);
        }
 }
@@ -270,8 +270,8 @@ gs_flatpak_create_app (GsFlatpak *self, const gchar *origin, FlatpakRef *xref)
 
        /* Don't add NULL origin apps to the cache. If the app is later set to
         * origin x the cache may return it as a match for origin y since the cache
-        * hash table uses as_utils_unique_id_equal() as the equal func and a NULL
-        * origin becomes a "*" in as_utils_unique_id_build().
+        * hash table uses as_utils_data_id_equal() as the equal func and a NULL
+        * origin becomes a "*" in as_utils_build_data_id().
         */
        if (origin != NULL)
                gs_plugin_cache_add (self->plugin, NULL, app);
@@ -573,7 +573,7 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
        /* add metadata */
        icon_prefix = g_build_filename (appstream_dir_fn, "icons", NULL);
        info = xb_builder_node_insert (NULL, "info", NULL);
-       xb_builder_node_insert_text (info, "scope", as_app_scope_to_string (self->scope), NULL);
+       xb_builder_node_insert_text (info, "scope", as_component_scope_to_string (self->scope), NULL);
        xb_builder_node_insert_text (info, "icon-prefix", icon_prefix, NULL);
        xb_builder_source_set_info (source, info);
 
@@ -628,15 +628,15 @@ gs_plugin_appstream_load_desktop_cb (XbBuilderSource *self,
                                     GError **error)
 {
        GString *xml;
-       g_autoptr(AsApp) app = as_app_new ();
+       g_autoptr(AsComponent) app = as_component_new ();
        g_autoptr(GBytes) bytes = NULL;
        bytes = xb_builder_source_ctx_get_bytes (ctx, cancellable, error);
        if (bytes == NULL)
                return NULL;
-       as_app_set_id (app, xb_builder_source_ctx_get_filename (ctx));
-       if (!as_app_parse_data (app, bytes, AS_APP_PARSE_FLAG_USE_FALLBACKS, error))
+       as_component_set_id (app, xb_builder_source_ctx_get_filename (ctx));
+       if (!as_component_parse_data (app, bytes, AS_APP_PARSE_FLAG_USE_FALLBACKS, error))
                return NULL;
-       xml = as_app_to_xml (app, error);
+       xml = as_component_to_xml (app, error);
        if (xml == NULL)
                return NULL;
        g_string_prepend (xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
@@ -669,7 +669,7 @@ gs_flatpak_load_desktop_fn (GsFlatpak *self,
 
        /* set the component metadata */
        info = xb_builder_node_insert (NULL, "info", NULL);
-       xb_builder_node_insert_text (info, "scope", as_app_scope_to_string (self->scope), NULL);
+       xb_builder_node_insert_text (info, "scope", as_component_scope_to_string (self->scope), NULL);
        xb_builder_node_insert_text (info, "icon-prefix", icon_prefix, NULL);
        xb_builder_source_set_info (source, info);
 
@@ -873,10 +873,10 @@ gs_flatpak_progress_cb (const gchar *status,
                        gs_app_set_progress (phelper->app, progress);
 
                switch (gs_app_get_state (phelper->app)) {
-               case AS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_INSTALLING:
                        plugin_status = GS_PLUGIN_STATUS_INSTALLING;
                        break;
-               case AS_APP_STATE_REMOVING:
+               case GS_APP_STATE_REMOVING:
                        plugin_status = GS_PLUGIN_STATUS_REMOVING;
                        break;
                default:
@@ -1059,8 +1059,8 @@ gs_flatpak_set_metadata_installed (GsFlatpak *self, GsApp *app,
        }
 
        /* If it's a runtime, check if the main-app info should be set. Note that
-        * checking the app for AS_APP_KIND_RUNTIME is not good enough because it
-        * could be e.g. AS_APP_KIND_LOCALIZATION and still be a runtime from
+        * checking the app for AS_COMPONENT_KIND_RUNTIME is not good enough because it
+        * could be e.g. AS_COMPONENT_KIND_LOCALIZATION and still be a runtime from
         * Flatpak's perspective.
         */
        if (gs_flatpak_app_get_ref_kind (app) == FLATPAK_REF_KIND_RUNTIME &&
@@ -1109,8 +1109,8 @@ gs_flatpak_create_installed (GsFlatpak *self,
        /* create new object */
        origin = flatpak_installed_ref_get_origin (xref);
        app = gs_flatpak_create_app (self, origin, FLATPAK_REF (xref));
-       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        gs_flatpak_set_metadata_installed (self, app, xref);
        return g_steal_pointer (&app);
 }
@@ -1351,7 +1351,7 @@ gs_flatpak_app_install_source (GsFlatpak *self, GsApp *app,
        }
 
        /* install it */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        if (!flatpak_installation_modify_remote (self->installation,
                                                 xremote,
                                                 cancellable,
@@ -1369,7 +1369,7 @@ gs_flatpak_app_install_source (GsFlatpak *self, GsApp *app,
        g_rw_lock_reader_unlock (&self->silo_lock);
 
        /* success */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        return TRUE;
 }
 
@@ -1447,7 +1447,7 @@ get_real_app_for_update (GsFlatpak *self,
                g_debug ("Related extension app %s of main app %s is updatable, so "
                         "setting the latter's state instead.", gs_app_get_unique_id (app),
                         gs_app_get_unique_id (main_app));
-               gs_app_set_state (main_app, AS_APP_STATE_UPDATABLE_LIVE);
+               gs_app_set_state (main_app, GS_APP_STATE_UPDATABLE_LIVE);
        }
 
        return main_app;
@@ -1503,13 +1503,13 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
 
                /* if for some reason the app is already getting updated, then
                 * don't change its state */
-               if (gs_app_get_state (main_app) != AS_APP_STATE_INSTALLING)
-                       gs_app_set_state (main_app, AS_APP_STATE_UPDATABLE_LIVE);
+               if (gs_app_get_state (main_app) != GS_APP_STATE_INSTALLING)
+                       gs_app_set_state (main_app, GS_APP_STATE_UPDATABLE_LIVE);
 
                /* set updatable state on the extension too, as it will have
                 * its state updated to installing then installed later on */
-               if (gs_app_get_state (app) != AS_APP_STATE_INSTALLING)
-                       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+               if (gs_app_get_state (app) != GS_APP_STATE_INSTALLING)
+                       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
 
                /* already downloaded */
                if (g_strcmp0 (commit, latest_commit) != 0) {
@@ -1657,7 +1657,7 @@ gs_refine_item_metadata (GsFlatpak *self, GsApp *app,
                return TRUE;
 
        /* not a valid type */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return TRUE;
 
        /* AppStream sets the source to appname/arch/branch, if this isn't set
@@ -1697,7 +1697,7 @@ gs_plugin_refine_item_origin (GsFlatpak *self,
                return TRUE;
 
        /* not applicable */
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL)
+       if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL)
                return TRUE;
 
        /* ensure metadata exists */
@@ -1784,7 +1784,7 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
        g_autoptr(GPtrArray) installed_refs = NULL;
 
        /* already found */
-       if (gs_app_get_state (app) != AS_APP_STATE_UNKNOWN)
+       if (gs_app_get_state (app) != GS_APP_STATE_UNKNOWN)
                return TRUE;
 
        /* need broken out metadata */
@@ -1826,8 +1826,8 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
                g_debug ("marking %s as installed with flatpak",
                         gs_app_get_unique_id (app));
                gs_flatpak_set_metadata_installed (self, app, ref);
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
                /* flatpak only allows one installed app to be launchable */
                if (flatpak_installed_ref_get_is_current (ref)) {
@@ -1845,7 +1845,7 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
                return FALSE;
 
        /* anything not installed just check the remote is still present */
-       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN &&
+       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN &&
            gs_app_get_origin (app) != NULL) {
                g_autoptr(FlatpakRemote) xremote = NULL;
                xremote = flatpak_installation_get_remote_by_name (self->installation,
@@ -1857,14 +1857,14 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
                                         "but %s is disabled",
                                         gs_app_get_unique_id (app),
                                         flatpak_remote_get_name (xremote));
-                               gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+                               gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
                        } else {
                                g_debug ("marking %s as available with flatpak",
                                         gs_app_get_unique_id (app));
-                               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+                               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
                        }
                } else {
-                       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+                       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
                        g_debug ("failed to find %s remote %s for %s",
                                 self->id,
                                 gs_app_get_origin (app),
@@ -1907,7 +1907,7 @@ gs_flatpak_create_runtime (GsFlatpak *self, GsApp *parent, const gchar *runtime)
        gs_flatpak_claim_app (self, app);
        source = g_strdup_printf ("runtime/%s", runtime);
        gs_app_add_source (app, source);
-       gs_app_set_kind (app, AS_APP_KIND_RUNTIME);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_RUNTIME);
        gs_app_set_branch (app, split[2]);
 
        /* search in the cache */
@@ -1922,8 +1922,8 @@ gs_flatpak_create_runtime (GsFlatpak *self, GsApp *parent, const gchar *runtime)
        }
 
        /* if the app is per-user we can also use the installed system runtime */
-       if (gs_app_get_scope (parent) == AS_APP_SCOPE_USER) {
-               gs_app_set_scope (app, AS_APP_SCOPE_UNKNOWN);
+       if (gs_app_get_scope (parent) == AS_COMPONENT_SCOPE_USER) {
+               gs_app_set_scope (app, AS_COMPONENT_SCOPE_UNKNOWN);
                app_cache = gs_plugin_cache_lookup (self->plugin, gs_app_get_unique_id (app));
                if (app_cache != NULL)
                        return g_steal_pointer (&app_cache);
@@ -2059,7 +2059,7 @@ gs_plugin_refine_item_metadata (GsFlatpak *self,
        g_autoptr(GFile) installation_path = NULL;
 
        /* not applicable */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return TRUE;
        if (gs_flatpak_app_get_ref_kind (app) != FLATPAK_REF_KIND_APP)
                return TRUE;
@@ -2127,9 +2127,9 @@ gs_plugin_refine_item_size (GsFlatpak *self,
        guint64 installed_size = GS_APP_SIZE_UNKNOWABLE;
 
        /* not applicable */
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL)
+       if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL)
                return TRUE;
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return TRUE;
 
        /* already set */
@@ -2148,7 +2148,7 @@ gs_plugin_refine_item_size (GsFlatpak *self,
                return FALSE;
 
        /* calculate the platform size too if the app is not installed */
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE &&
+       if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE &&
            gs_flatpak_app_get_ref_kind (app) == FLATPAK_REF_KIND_APP) {
                GsApp *app_runtime;
 
@@ -2159,7 +2159,7 @@ gs_plugin_refine_item_size (GsFlatpak *self,
                                                           cancellable,
                                                           error))
                        return FALSE;
-               if (gs_app_get_state (app_runtime) == AS_APP_STATE_INSTALLED) {
+               if (gs_app_get_state (app_runtime) == GS_APP_STATE_INSTALLED) {
                        g_debug ("runtime %s is already installed, so not adding size",
                                 gs_app_get_unique_id (app_runtime));
                } else {
@@ -2233,13 +2233,13 @@ gs_flatpak_refine_appstream_release (XbNode *component, GsApp *app)
        if (version == NULL)
                return;
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                gs_app_set_version (app, version);
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                gs_app_set_update_version (app, version);
                break;
        default:
@@ -2326,7 +2326,7 @@ gs_flatpak_refine_appstream_from_bytes (GsFlatpak *self,
                g_autofree char *icon_prefix = NULL;
 
                info = xb_builder_node_insert (NULL, "info", NULL);
-               xb_builder_node_insert_text (info, "scope", as_app_scope_to_string (self->scope), NULL);
+               xb_builder_node_insert_text (info, "scope", as_component_scope_to_string (self->scope), NULL);
                icon_prefix = g_build_filename (flatpak_installed_ref_get_deploy_dir (installed_ref),
                                                "files", "share", "app-info", "icons", "flatpak", NULL);
                xb_builder_node_insert_text (info, "icon-prefix", icon_prefix, NULL);
@@ -2524,7 +2524,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self,
                                 GCancellable *cancellable,
                                 GError **error)
 {
-       AsAppState old_state = gs_app_get_state (app);
+       GsAppState old_state = gs_app_get_state (app);
        g_autoptr(GRWLockReaderLocker) locker = NULL;
 
        /* not us */
@@ -2550,7 +2550,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self,
        }
 
        /* scope is fast, do unconditionally */
-       if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE_LOCAL)
+       if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE_LOCAL)
                gs_plugin_refine_item_scope (self, app);
 
        /* if the state was changed, perhaps set the version from the release */
@@ -2727,7 +2727,7 @@ gs_flatpak_app_remove_source (GsFlatpak *self,
        }
 
        /* remove */
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        if (!flatpak_installation_remove_remote (self->installation,
                                                 gs_app_get_id (app),
                                                 cancellable,
@@ -2743,7 +2743,7 @@ gs_flatpak_app_remove_source (GsFlatpak *self,
                xb_silo_invalidate (self->silo);
        g_rw_lock_reader_unlock (&self->silo_lock);
 
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        return TRUE;
 }
 
@@ -2782,13 +2782,13 @@ gs_flatpak_file_to_app_bundle (GsFlatpak *self,
 
        /* load metadata */
        app = gs_flatpak_create_app (self, origin, FLATPAK_REF (xref_bundle));
-       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                if (gs_flatpak_app_get_ref_name (app) == NULL)
                        gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref_bundle));
                return g_steal_pointer (&app);
        }
        gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_BUNDLE);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
        gs_app_set_size_installed (app, flatpak_bundle_ref_get_installed_size (xref_bundle));
        gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref_bundle));
        metadata = flatpak_bundle_ref_get_metadata (xref_bundle);
@@ -2927,14 +2927,14 @@ gs_flatpak_file_to_app_ref (GsFlatpak *self,
 
        /* load metadata */
        app = gs_flatpak_create_app (self, NULL /* origin */, FLATPAK_REF (xref));
-       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                if (gs_flatpak_app_get_ref_name (app) == NULL)
                        gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref));
                return g_steal_pointer (&app);
        }
        gs_app_add_quirk (app, GS_APP_QUIRK_HAS_SOURCE);
        gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_REF);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
        gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref));
 
        /* use the data from the flatpakref file as a fallback */
@@ -2999,7 +2999,7 @@ gs_flatpak_file_to_app_ref (GsFlatpak *self,
 
        /* the new runtime is available from the RuntimeRepo */
        runtime = gs_app_get_runtime (app);
-       if (runtime != NULL && gs_app_get_state (runtime) == AS_APP_STATE_UNKNOWN) {
+       if (runtime != NULL && gs_app_get_state (runtime) == GS_APP_STATE_UNKNOWN) {
                g_autofree gchar *uri = NULL;
                uri = g_key_file_get_string (kf, "Flatpak Ref", "RuntimeRepo", NULL);
                gs_flatpak_app_set_runtime_url (runtime, uri);
@@ -3234,7 +3234,7 @@ gs_flatpak_get_id (GsFlatpak *self)
        if (self->id == NULL) {
                GString *str = g_string_new ("flatpak");
                g_string_append_printf (str, "-%s",
-                                       as_app_scope_to_string (self->scope));
+                                       as_component_scope_to_string (self->scope));
                if (flatpak_installation_get_id (self->installation) != NULL) {
                        g_string_append_printf (str, "-%s",
                                                flatpak_installation_get_id (self->installation));
@@ -3246,7 +3246,7 @@ gs_flatpak_get_id (GsFlatpak *self)
        return self->id;
 }
 
-AsAppScope
+AsComponentScope
 gs_flatpak_get_scope (GsFlatpak *self)
 {
        return self->scope;
@@ -3316,7 +3316,7 @@ gs_flatpak_new (GsPlugin *plugin, FlatpakInstallation *installation, GsFlatpakFl
        self = g_object_new (GS_TYPE_FLATPAK, NULL);
        self->installation = g_object_ref (installation);
        self->scope = flatpak_installation_get_is_user (installation)
-                               ? AS_APP_SCOPE_USER : AS_APP_SCOPE_SYSTEM;
+                               ? AS_COMPONENT_SCOPE_USER : AS_COMPONENT_SCOPE_SYSTEM;
        self->plugin = g_object_ref (plugin);
        self->flags = flags;
        return GS_FLATPAK (self);
diff --git a/plugins/flatpak/gs-flatpak.h b/plugins/flatpak/gs-flatpak.h
index e5af289e..40ab24f7 100644
--- a/plugins/flatpak/gs-flatpak.h
+++ b/plugins/flatpak/gs-flatpak.h
@@ -32,7 +32,7 @@ FlatpakInstallation *gs_flatpak_get_installation (GsFlatpak           *self);
 
 GsApp  *gs_flatpak_ref_to_app (GsFlatpak *self, const gchar *ref, GCancellable *cancellable, GError **error);
 
-AsAppScope     gs_flatpak_get_scope            (GsFlatpak              *self);
+AsComponentScope       gs_flatpak_get_scope            (GsFlatpak              *self);
 const gchar    *gs_flatpak_get_id              (GsFlatpak              *self);
 gboolean       gs_flatpak_setup                (GsFlatpak              *self,
                                                 GCancellable           *cancellable,
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 77552e00..0279b011 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -71,11 +71,11 @@ gs_plugin_initialize (GsPlugin *plugin)
 }
 
 static gboolean
-_as_app_scope_is_compatible (AsAppScope scope1, AsAppScope scope2)
+_as_component_scope_is_compatible (AsComponentScope scope1, AsComponentScope scope2)
 {
-       if (scope1 == AS_APP_SCOPE_UNKNOWN)
+       if (scope1 == AS_COMPONENT_SCOPE_UNKNOWN)
                return TRUE;
-       if (scope2 == AS_APP_SCOPE_UNKNOWN)
+       if (scope2 == AS_COMPONENT_SCOPE_UNKNOWN)
                return TRUE;
        return scope1 == scope2;
 }
@@ -262,7 +262,7 @@ gs_plugin_flatpak_get_handler (GsPlugin *plugin, GsApp *app)
        /* find a scope that matches */
        for (guint i = 0; i < priv->flatpaks->len; i++) {
                GsFlatpak *flatpak = g_ptr_array_index (priv->flatpaks, i);
-               if (_as_app_scope_is_compatible (gs_flatpak_get_scope (flatpak),
+               if (_as_component_scope_is_compatible (gs_flatpak_get_scope (flatpak),
                                                 gs_app_get_scope (app)))
                        return flatpak;
        }
@@ -286,7 +286,7 @@ gs_plugin_flatpak_refine_app (GsPlugin *plugin,
        }
 
        /* we have to look for the app in all GsFlatpak stores */
-       if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN) {
+       if (gs_app_get_scope (app) == AS_COMPONENT_SCOPE_UNKNOWN) {
                for (guint i = 0; i < priv->flatpaks->len; i++) {
                        GsFlatpak *flatpak_tmp = g_ptr_array_index (priv->flatpaks, i);
                        g_autoptr(GError) error_local = NULL;
@@ -733,7 +733,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
                return TRUE;
 
        /* is a source */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_flatpak_app_remove_source (flatpak, app, cancellable, error);
 
        /* build and run transaction */
@@ -754,7 +754,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
        }
 
        /* run transaction */
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
                gs_flatpak_error_convert (error);
                gs_app_set_state_recover (app);
@@ -804,24 +804,24 @@ gs_plugin_app_install (GsPlugin *plugin,
        /* queue for install if installation needs the network */
        if (!app_has_local_source (app) &&
            !gs_plugin_get_network_available (plugin)) {
-               gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+               gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
                return TRUE;
        }
 
        /* set the app scope */
-       if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN) {
+       if (gs_app_get_scope (app) == AS_COMPONENT_SCOPE_UNKNOWN) {
                g_autoptr(GSettings) settings = g_settings_new ("org.gnome.software");
 
                /* get the new GsFlatpak for handling of local files */
                gs_app_set_scope (app, g_settings_get_boolean (settings, "install-bundles-system-wide") ?
-                                       AS_APP_SCOPE_SYSTEM : AS_APP_SCOPE_USER);
+                                       AS_COMPONENT_SCOPE_SYSTEM : AS_COMPONENT_SCOPE_USER);
                if (!priv->has_system_helper) {
                        g_info ("no flatpak system helper is available, using user");
-                       gs_app_set_scope (app, AS_APP_SCOPE_USER);
+                       gs_app_set_scope (app, AS_COMPONENT_SCOPE_USER);
                }
                if (priv->destdir_for_tests != NULL) {
                        g_debug ("in self tests, using user");
-                       gs_app_set_scope (app, AS_APP_SCOPE_USER);
+                       gs_app_set_scope (app, AS_COMPONENT_SCOPE_USER);
                }
        }
 
@@ -831,7 +831,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                return TRUE;
 
        /* is a source */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_flatpak_app_install_source (flatpak, app, cancellable, error);
 
        if (!gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)) {
@@ -909,7 +909,7 @@ gs_plugin_app_install (GsPlugin *plugin,
        }
 
        /* run transaction */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
                gs_flatpak_error_convert (error);
                gs_app_set_state_recover (app);
@@ -985,7 +985,7 @@ gs_plugin_flatpak_update (GsPlugin *plugin,
        /* run transaction */
        for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
                GsApp *app = gs_app_list_index (list_tmp, i);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
 
                /* If all apps' update are previously downloaded and available locally,
                 * FlatpakTransaction should run with no-pull flag. This is the case
@@ -1148,7 +1148,7 @@ gs_plugin_flatpak_file_to_app_bundle (GsPlugin *plugin,
                return g_steal_pointer (&app_tmp);
 
        /* force this to be 'any' scope for installation */
-       gs_app_set_scope (app, AS_APP_SCOPE_UNKNOWN);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_UNKNOWN);
 
        /* this is new */
        return g_steal_pointer (&app);
@@ -1183,7 +1183,7 @@ gs_plugin_flatpak_file_to_app_ref (GsPlugin *plugin,
                return g_steal_pointer (&app_tmp);
 
        /* force this to be 'any' scope for installation */
-       gs_app_set_scope (app, AS_APP_SCOPE_UNKNOWN);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_UNKNOWN);
 
        /* do we have a system runtime available */
        runtime = gs_app_get_runtime (app);
@@ -1199,7 +1199,7 @@ gs_plugin_flatpak_file_to_app_ref (GsPlugin *plugin,
                } else {
                        /* the new runtime is available from the RuntimeRepo */
                        if (gs_flatpak_app_get_runtime_url (runtime) != NULL)
-                               gs_app_set_state (runtime, AS_APP_STATE_AVAILABLE_LOCAL);
+                               gs_app_set_state (runtime, GS_APP_STATE_AVAILABLE_LOCAL);
                }
        }
 
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 1f50e4ca..95601ef7 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -139,8 +139,8 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_SOURCE);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_REPOSITORY);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "example");
        g_assert_cmpstr (gs_app_get_management_plugin (app), ==, "flatpak");
        g_assert_cmpstr (gs_app_get_origin_hostname (app), ==, "localhost");
@@ -161,7 +161,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
 
        /* check config file was updated */
        root = g_getenv ("GS_SELF_TEST_FLATPAK_DATADIR");
@@ -189,7 +189,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (app2 != NULL);
-       g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
 
        /* remove it */
        g_object_unref (plugin_job);
@@ -200,7 +200,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpint (gs_app_get_progress (app), ==, GS_APP_PROGRESS_UNKNOWN);
 }
 
@@ -278,9 +278,9 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", app_source,
@@ -289,7 +289,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* check remote was set up */
        ret = g_key_file_load_from_file (kf2, config_fn, G_KEY_FILE_NONE, &error);
@@ -308,7 +308,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (sources), ==, 1);
        app = gs_app_list_index (sources, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "test");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_SOURCE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_REPOSITORY);
 
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
@@ -349,8 +349,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpint ((gint64) gs_app_get_kudos (app), ==,
                         GS_APP_KUDO_MY_LANGUAGE |
                         GS_APP_KUDO_HAS_KEYWORDS |
@@ -367,7 +367,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        runtime = gs_app_get_runtime (app);
        g_assert_true (runtime != NULL);
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/test/runtime/org.test.Runtime/master");
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* install, also installing runtime */
        g_object_unref (plugin_job);
@@ -378,11 +378,11 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
        g_assert_true (gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN ||
                       gs_app_get_progress (app) == 100);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
 
        /* check the application exists in the right places */
        metadata_fn = g_build_filename (root,
@@ -430,8 +430,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
        g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
        g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
 
@@ -454,7 +454,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_true (seen_unknown);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
        g_assert_true (gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN ||
                       gs_app_get_progress (app) == 100);
@@ -468,8 +468,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
        g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
        g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
 
@@ -482,7 +482,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_FAILED);
        g_assert_true (!ret);
        g_clear_error (&error);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* remove the runtime */
        g_object_unref (plugin_job);
@@ -493,7 +493,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* remove the remote */
        g_object_unref (plugin_job);
@@ -504,7 +504,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 }
 
 static void
@@ -542,9 +542,9 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", app_source,
@@ -553,7 +553,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
@@ -579,7 +579,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
 
        /* install, also installing runtime */
        g_object_unref (plugin_job);
@@ -590,7 +590,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_NOT_SUPPORTED);
        g_assert_true (!ret);
        g_clear_error (&error);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpint (gs_app_get_progress (app), ==, GS_APP_PROGRESS_UNKNOWN);
 
        /* remove the remote */
@@ -602,7 +602,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 }
 
 static void
@@ -618,9 +618,9 @@ update_app_progress_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data
 static void
 update_app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
 {
-       AsAppState state = gs_app_get_state (app);
-       g_debug ("state now %s", as_app_state_to_string (state));
-       if (state == AS_APP_STATE_INSTALLING) {
+       GsAppState state = gs_app_get_state (app);
+       g_debug ("state now %s", gs_app_state_to_string (state));
+       if (state == GS_APP_STATE_INSTALLING) {
                gboolean *tmp = (gboolean *) user_data;
                *tmp = TRUE;
        }
@@ -700,17 +700,17 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+       g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                        "user/flatpak/*/desktop/org.test.Chiron/master"));
        g_assert_true (gs_app_get_local_file (app) != NULL);
 
        /* get runtime */
        runtime = gs_app_get_runtime (app);
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/*/runtime/org.test.Runtime/master");
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE_LOCAL);
 
        /* check the number of sources */
        g_object_unref (plugin_job);
@@ -732,8 +732,8 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
                                            loop);
        g_main_loop_run (loop);
        gs_test_flush_main_context ();
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
 
        /* check the number of sources */
        g_object_unref (plugin_job);
@@ -752,7 +752,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
 
        /* remove the runtime */
        g_object_unref (plugin_job);
@@ -763,7 +763,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* remove the remote */
        app_source = gs_app_list_index (sources2, 0);
@@ -777,7 +777,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 }
 
 /* same as gs_plugins_flatpak_runtime_repo_func, but this time manually
@@ -825,8 +825,8 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (app_src != NULL);
-       g_assert_cmpint (gs_app_get_kind (app_src), ==, AS_APP_KIND_SOURCE);
-       g_assert_cmpint (gs_app_get_state (app_src), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app_src), ==, AS_COMPONENT_KIND_REPOSITORY);
+       g_assert_cmpint (gs_app_get_state (app_src), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app_src), ==, "test");
        g_assert_cmpstr (gs_app_get_unique_id (app_src), ==, "*/*/*/source/test/master");
        g_assert_true (gs_app_get_local_file (app_src) != NULL);
@@ -840,7 +840,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_src), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_src), ==, GS_APP_STATE_INSTALLED);
 
        /* write a flatpakref file */
        fn_repourl = g_file_get_uri (file_repo);
@@ -863,17 +863,17 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+       g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                        "user/flatpak/*/desktop/org.test.Chiron/master"));
        g_assert_true (gs_app_get_local_file (app) != NULL);
 
        /* get runtime */
        runtime = gs_app_get_runtime (app);
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/test/runtime/org.test.Runtime/master");
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* check the number of sources */
        g_object_unref (plugin_job);
@@ -894,8 +894,8 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
 
        /* check the number of sources */
        g_object_unref (plugin_job);
@@ -913,7 +913,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
 
        /* remove the runtime */
        g_object_unref (plugin_job);
@@ -924,7 +924,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* remove the remote */
        app_source = gs_app_list_index (sources2, 0);
@@ -938,7 +938,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 }
 
 static void
@@ -971,9 +971,9 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        testdir = gs_test_get_filename (TESTDATADIR, "only-runtime");
        if (testdir == NULL)
                return;
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, "file:///wont/work");
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", app_source,
@@ -981,7 +981,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* write a flatpakrepo file (the flatpakref below must have a RuntimeRepo=
         * to avoid a warning) */
@@ -1008,14 +1008,14 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        app = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
 #if FLATPAK_CHECK_VERSION(1,1,2)
-       g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+       g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                        "user/flatpak/chiron-origin/desktop/org.test.Chiron/master"));
 #else
-       g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+       g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                        "user/flatpak/org.test.Chiron-origin/desktop/org.test.Chiron/master"));
 #endif
        g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==, "http://127.0.0.1/";);
@@ -1071,9 +1071,9 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        if (testdir == NULL)
                return;
        testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
                                         "app", app_source,
@@ -1081,7 +1081,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
@@ -1107,7 +1107,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        runtime = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (runtime), ==, "org.test.Runtime");
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/test/runtime/org.test.Runtime/master");
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* install the runtime ahead of time */
        g_object_unref (plugin_job);
@@ -1117,7 +1117,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
 
        if (is_bundle) {
                /* find the flatpak bundle file */
@@ -1164,8 +1164,8 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        app = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DESKTOP);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
        g_assert_cmpstr (gs_app_get_name (app), ==, "Chiron");
        g_assert_cmpstr (gs_app_get_summary (app), ==, "Single line synopsis");
@@ -1175,15 +1175,15 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
                /* Note: The origin is set to "flatpak" here because an origin remote
                 * won't be created until the app is installed.
                 */
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                                "user/flatpak/flatpak/desktop/org.test.Chiron/master"));
                g_assert_true (gs_flatpak_app_get_file_kind (app) == GS_FLATPAK_APP_FILE_KIND_BUNDLE);
        } else {
 #if FLATPAK_CHECK_VERSION(1,1,2)
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                                "user/flatpak/chiron-origin/desktop/org.test.Chiron/master"));
 #else
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app),
                                "user/flatpak/org.test.Chiron-origin/desktop/org.test.Chiron/master"));
 #endif
                g_assert_true (gs_flatpak_app_get_file_kind (app) == GS_FLATPAK_APP_FILE_KIND_REF);
@@ -1194,7 +1194,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        /* get runtime */
        runtime = gs_app_get_runtime (app);
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/test/runtime/org.test.Runtime/master");
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
 
        /* install */
        g_object_unref (plugin_job);
@@ -1204,7 +1204,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
        g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
        g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1233,20 +1233,20 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        app2 = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (app2 != NULL);
-       g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
        if (is_bundle) {
 #if FLATPAK_CHECK_VERSION(1,1,2)
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app2),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app2),
                                "user/flatpak/chiron-origin/desktop/org.test.Chiron/master"));
 #else
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app2),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app2),
                                "user/flatpak/org.test.Chiron-origin/desktop/org.test.Chiron/master"));
 #endif
        } else {
                /* Note: the origin is now test-1 because that remote was created from the
                 * RuntimeRepo= setting
                 */
-               g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app2),
+               g_assert_true (as_utils_data_id_equal (gs_app_get_unique_id (app2),
                          "user/flatpak/test-1/desktop/org.test.Chiron/master"));
        }
 
@@ -1280,9 +1280,9 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        if (!is_bundle) {
                /* remove remote added by RuntimeRepo= in flatpakref */
                g_autoptr(GsApp) runtime_source = gs_flatpak_app_new ("test-1");
-               gs_app_set_kind (runtime_source, AS_APP_KIND_SOURCE);
+               gs_app_set_kind (runtime_source, AS_COMPONENT_KIND_REPOSITORY);
                gs_app_set_management_plugin (runtime_source, "flatpak");
-               gs_app_set_state (runtime_source, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (runtime_source, GS_APP_STATE_INSTALLED);
                g_object_unref (plugin_job);
                plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
                                                 "app", runtime_source,
@@ -1388,9 +1388,9 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
 
        /* add a remote */
        app_source = gs_flatpak_app_new ("test");
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        repo_url = g_strdup_printf ("file://%s", repo_path);
        gs_flatpak_app_set_repo_url (app_source, repo_url);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
@@ -1400,7 +1400,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
@@ -1428,7 +1428,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
 
        /* install, also installing runtime */
        g_object_unref (plugin_job);
@@ -1439,7 +1439,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
        g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
        g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1478,7 +1478,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        /* check they are the same GObject */
        app_tmp = gs_app_list_lookup (list_updates, "*/flatpak/test/*/org.test.Chiron/*");
        g_assert_true (app_tmp == app);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
        g_assert_cmpstr (gs_app_get_update_details (app), ==, "Version 1.2.4:\nThis is best.\n\nVersion 
1.2.3:\nThis is better.");
        g_assert_cmpstr (gs_app_get_update_version (app), ==, "1.2.4");
 
@@ -1516,7 +1516,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
                                            loop);
        g_main_loop_run (loop);
        gs_test_flush_main_context ();
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.4");
        g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
        g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1533,7 +1533,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_unique_id (runtime), ==, 
"user/flatpak/test/runtime/org.test.Runtime/new_master");
        g_assert_true (old_runtime != runtime);
        g_assert_cmpstr (gs_app_get_branch (runtime), ==, "new_master");
-       g_assert_true (gs_app_get_state (runtime) == AS_APP_STATE_INSTALLED);
+       g_assert_true (gs_app_get_state (runtime) == GS_APP_STATE_INSTALLED);
 
        /* no longer care */
        g_signal_handler_disconnect (plugin_loader, pending_apps_changed_id);
@@ -1581,7 +1581,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 }
 
 static void
@@ -1638,9 +1638,9 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
 
        /* add a remote */
        app_source = gs_flatpak_app_new ("test");
-       gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (app_source, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_management_plugin (app_source, "flatpak");
-       gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        repo_url = g_strdup_printf ("file://%s", repo_path);
        gs_flatpak_app_set_repo_url (app_source, repo_url);
        plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
@@ -1650,7 +1650,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
 
        /* refresh the appstream metadata */
        g_object_unref (plugin_job);
@@ -1677,7 +1677,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
 
        /* install, also installing runtime and suggested extensions */
        g_object_unref (plugin_job);
@@ -1688,14 +1688,14 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
 
        /* check if the extension was installed */
        extension = gs_plugin_loader_app_create (plugin_loader,
                        "user/flatpak/*/runtime/org.test.Chiron.Extension/master");
        g_assert_nonnull (extension);
-       g_assert_cmpint (gs_app_get_state (extension), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (extension), ==, GS_APP_STATE_INSTALLED);
 
        /* switch to the new repo (to get the update) */
        g_assert_cmpint (unlink (repo_path), ==, 0);
@@ -1734,7 +1734,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        /* check that the app has an update (it's affected by the extension's update) */
        app_tmp = gs_app_list_lookup (list_updates, "*/flatpak/test/*/org.test.Chiron/*");
        g_assert_true (app_tmp == app);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
 
        /* care about signals */
        pending_apps_changed_id =
@@ -1769,16 +1769,16 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        /* Older flatpak versions don't have the API we use to propagate state
         * between extension and app
         */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 #else
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
 #endif
        g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
        g_assert_true (got_progress_installing);
        g_assert_cmpint (pending_app_changed_cnt, ==, 0);
 
        /* check the extension's state after the update */
-       g_assert_cmpint (gs_app_get_state (extension), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (extension), ==, GS_APP_STATE_INSTALLED);
 
        /* no longer care */
        g_signal_handler_disconnect (plugin_loader, pending_apps_changed_id);
@@ -1807,7 +1807,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
 
        /* remove the remote */
        g_object_unref (plugin_job);
@@ -1818,7 +1818,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert_true (ret);
-       g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
 
        /* verify that the extension has been removed by the app's removal */
        g_assert_false (gs_app_is_installed (extension));
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index df6505b0..670f580b 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -60,7 +60,7 @@ gs_fwupd_app_set_from_device (GsApp *app, FwupdDevice *dev)
 
        /* something can be done */
        if (fwupd_device_has_flag (dev, FWUPD_DEVICE_FLAG_UPDATABLE))
-               gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+               gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
 
        /* only can be applied in systemd-offline */
        if (fwupd_device_has_flag (dev, FWUPD_DEVICE_FLAG_ONLY_OFFLINE))
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index fe3f689c..77013ce2 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -112,7 +112,7 @@ gs_plugin_destroy (GsPlugin *plugin)
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-       if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE)
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
 }
 
@@ -182,7 +182,7 @@ gs_plugin_fwupd_notify_status_cb (GObject *object,
        case FWUPD_STATUS_DEVICE_RESTART:
        case FWUPD_STATUS_DEVICE_WRITE:
        case FWUPD_STATUS_DEVICE_VERIFY:
-               gs_app_set_state (priv->app_current, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (priv->app_current, GS_APP_STATE_INSTALLING);
                break;
        case FWUPD_STATUS_IDLE:
                g_clear_object (&priv->app_current);
@@ -246,7 +246,7 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
 
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
-       gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (priv->cached_origin, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_bundle_kind (priv->cached_origin, AS_BUNDLE_KIND_CABINET);
 
        /* add the source to the plugin cache which allows us to match the
@@ -285,12 +285,11 @@ gs_plugin_fwupd_new_app_from_device (GsPlugin *plugin, FwupdDevice *dev)
                return NULL;
 
        /* get from cache */
-       id = as_utils_unique_id_build (AS_APP_SCOPE_SYSTEM,
-                                      AS_BUNDLE_KIND_UNKNOWN,
-                                      NULL, /* origin */
-                                      AS_APP_KIND_FIRMWARE,
-                                      fwupd_release_get_appstream_id (rel),
-                                      NULL);
+       id = as_utils_build_data_id (AS_COMPONENT_SCOPE_SYSTEM,
+                                    AS_BUNDLE_KIND_UNKNOWN,
+                                    NULL, /* origin */
+                                    fwupd_release_get_appstream_id (rel),
+                                    NULL);
        app = gs_plugin_cache_lookup (plugin, id);
        if (app == NULL) {
                app = gs_app_new (id);
@@ -298,7 +297,7 @@ gs_plugin_fwupd_new_app_from_device (GsPlugin *plugin, FwupdDevice *dev)
        }
 
        /* default stuff */
-       gs_app_set_kind (app, AS_APP_KIND_FIRMWARE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_FIRMWARE);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_CABINET);
        gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
        gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
@@ -344,9 +343,9 @@ gs_plugin_fwupd_new_app_from_device_raw (GsPlugin *plugin, FwupdDevice *device)
        /* create a GsApp based on the device, not the release */
        id = gs_plugin_fwupd_build_device_id (device);
        app = gs_app_new (id);
-       gs_app_set_kind (app, AS_APP_KIND_FIRMWARE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_FIRMWARE);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
        gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
        gs_app_set_version (app, fwupd_device_get_version (device));
@@ -387,7 +386,7 @@ gs_plugin_fwupd_new_app (GsPlugin *plugin, FwupdDevice *dev, GError **error)
 
        /* update unsupported */
        app = gs_plugin_fwupd_new_app_from_device (plugin, dev);
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE) {
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE) {
                g_set_error (error,
                             GS_PLUGIN_ERROR,
                             GS_PLUGIN_ERROR_NOT_SUPPORTED,
@@ -837,7 +836,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
                const gchar *uri = gs_fwupd_app_get_update_uri (app);
 #if FWUPD_CHECK_VERSION(1,5,2)
                g_autoptr(GFile) file = g_file_new_for_path (filename);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                if (!fwupd_client_download_file (priv->client,
                                                 uri, file,
                                                 FWUPD_CLIENT_DOWNLOAD_FLAG_NONE,
@@ -847,7 +846,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
                        return FALSE;
                }
 #else
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                if (!gs_plugin_download_file (plugin, app, uri, filename,
                                              cancellable, error))
                        return FALSE;
@@ -867,7 +866,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
        if (gs_app_get_metadata_item (app, "fwupd::OnlyOffline") != NULL)
                install_flags |= FWUPD_INSTALL_FLAG_OFFLINE;
 
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        if (!fwupd_client_install (priv->client, device_id,
                                   filename, install_flags,
                                   cancellable, error)) {
@@ -877,7 +876,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
        }
 
        /* delete the file from the cache */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        if (downloaded_to_cache) {
                if (!g_file_delete (local_file, cancellable, error))
                        return FALSE;
@@ -935,7 +934,7 @@ gs_plugin_fwupd_modify_source (GsPlugin *plugin, GsApp *app, gboolean enabled,
                return FALSE;
        }
        gs_app_set_state (app, enabled ?
-                         AS_APP_STATE_INSTALLING : AS_APP_STATE_REMOVING);
+                         GS_APP_STATE_INSTALLING : GS_APP_STATE_REMOVING);
        if (!fwupd_client_modify_remote (priv->client,
                                         remote_id,
                                         "Enabled",
@@ -946,7 +945,7 @@ gs_plugin_fwupd_modify_source (GsPlugin *plugin, GsApp *app, gboolean enabled,
                return FALSE;
        }
        gs_app_set_state (app, enabled ?
-                         AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+                         GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
        return TRUE;
 }
 
@@ -962,7 +961,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                return TRUE;
 
        /* source -> remote */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY) {
                return gs_plugin_fwupd_modify_source (plugin, app, TRUE,
                                                      cancellable, error);
        }
@@ -1161,10 +1160,10 @@ gs_plugin_add_sources (GsPlugin *plugin,
                /* create something that we can use to enable/disable */
                id = g_strdup_printf ("org.fwupd.%s.remote", fwupd_remote_get_id (remote));
                app = gs_app_new (id);
-               gs_app_set_kind (app, AS_APP_KIND_SOURCE);
-               gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_REPOSITORY);
+               gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
                gs_app_set_state (app, fwupd_remote_get_enabled (remote) ?
-                                 AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+                                 GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
                gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
                gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
                                 fwupd_remote_get_title (remote));
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index ca5fcb8a..2c0bf10b 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -38,7 +38,7 @@ gs_plugins_fwupd_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (app != NULL);
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_FIRMWARE);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_FIRMWARE);
        g_assert (gs_app_get_license (app) != NULL);
        g_assert (gs_app_has_category (app, "System"));
        g_assert_cmpstr (gs_app_get_id (app), ==, "com.test.chiron.firmware");
@@ -54,7 +54,7 @@ gs_plugins_fwupd_func (GsPluginLoader *plugin_loader)
                         "Latest firmware release.");
 
        /* seems wrong, but this is only set if the update is available */
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
 }
 
 int
diff --git a/plugins/malcontent/gs-plugin-malcontent.c b/plugins/malcontent/gs-plugin-malcontent.c
index d474168c..9972a691 100644
--- a/plugins/malcontent/gs-plugin-malcontent.c
+++ b/plugins/malcontent/gs-plugin-malcontent.c
@@ -62,24 +62,24 @@ app_is_expected_to_have_content_rating (GsApp *app)
                return FALSE;
 
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_ADDON:
-       case AS_APP_KIND_CODEC:
-       case AS_APP_KIND_DRIVER:
-       case AS_APP_KIND_FIRMWARE:
-       case AS_APP_KIND_FONT:
-       case AS_APP_KIND_GENERIC:
-       case AS_APP_KIND_INPUT_METHOD:
-       case AS_APP_KIND_LOCALIZATION:
-       case AS_APP_KIND_OS_UPDATE:
-       case AS_APP_KIND_OS_UPGRADE:
-       case AS_APP_KIND_RUNTIME:
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_ADDON:
+       case AS_COMPONENT_KIND_CODEC:
+       case AS_COMPONENT_KIND_DRIVER:
+       case AS_COMPONENT_KIND_FIRMWARE:
+       case AS_COMPONENT_KIND_FONT:
+       case AS_COMPONENT_KIND_GENERIC:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_LOCALIZATION:
+       case AS_COMPONENT_KIND_OS_UPDATE:
+       case AS_COMPONENT_KIND_OPERATING_SYSTEM:
+       case AS_COMPONENT_KIND_RUNTIME:
+       case AS_COMPONENT_KIND_REPOSITORY:
                return FALSE;
-       case AS_APP_KIND_UNKNOWN:
-       case AS_APP_KIND_DESKTOP:
-       case AS_APP_KIND_WEB_APP:
-       case AS_APP_KIND_SHELL_EXTENSION:
-       case AS_APP_KIND_CONSOLE:
+       case AS_COMPONENT_KIND_UNKNOWN:
+       case AS_COMPONENT_KIND_DESKTOP_APP:
+       case AS_COMPONENT_KIND_WEB_APP:
+       case AS_COMPONENT_KIND_SHELL_EXTENSION:
+       case AS_COMPONENT_KIND_CONSOLE_APP:
        default:
                break;
        }
@@ -340,4 +340,4 @@ gs_plugin_destroy (GsPlugin *plugin)
                priv->manager_app_filter_changed_id = 0;
        }
        g_clear_object (&priv->manager);
-}
\ No newline at end of file
+}
diff --git a/plugins/modalias/gs-plugin-modalias.c b/plugins/modalias/gs-plugin-modalias.c
index d4e27a24..2720ee2a 100644
--- a/plugins/modalias/gs-plugin-modalias.c
+++ b/plugins/modalias/gs-plugin-modalias.c
@@ -112,16 +112,16 @@ refine_app (GsPlugin             *plugin,
        /* not required */
        if (gs_app_get_icons(app)->len > 0)
                return TRUE;
-       if (gs_app_get_kind (app) != AS_APP_KIND_DRIVER)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_DRIVER)
                return TRUE;
 
        /* do any of the modaliases match any installed hardware */
        provides = gs_app_get_provides (app);
        for (i = 0 ; i < provides->len; i++) {
-               AsProvide *prov = g_ptr_array_index (provides, i);
-               if (as_provide_get_kind (prov) != AS_PROVIDE_KIND_MODALIAS)
+               AsProvided *prov = g_ptr_array_index (provides, i);
+               if (as_provided_get_kind (prov) != AS_PROVIDE_KIND_MODALIAS)
                        continue;
-               if (gs_plugin_modalias_matches (plugin, as_provide_get_value (prov))) {
+               if (gs_plugin_modalias_matches (plugin, as_provided_get_value (prov))) {
                        g_autoptr(AsIcon) ic = NULL;
                        ic = as_icon_new ();
                        as_icon_set_kind (ic, AS_ICON_KIND_STOCK);
diff --git a/plugins/modalias/gs-self-test.c b/plugins/modalias/gs-self-test.c
index 5cbb39c3..92bf88f0 100644
--- a/plugins/modalias/gs-self-test.c
+++ b/plugins/modalias/gs-self-test.c
@@ -34,7 +34,7 @@ gs_plugins_modalias_func (GsPluginLoader *plugin_loader)
        g_assert_cmpint (gs_app_list_length (list), ==, 1);
        app = gs_app_list_index (list, 0);
        g_assert_cmpstr (gs_app_get_id (app), ==, "com.hughski.ColorHug2.driver");
-       g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DRIVER);
+       g_assert_cmpint (gs_app_get_kind (app), ==, AS_COMPONENT_KIND_DRIVER);
        g_assert (gs_app_has_category (app, "Addon"));
        g_assert (gs_app_has_category (app, "Driver"));
 }
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index 65e25073..fced3355 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -159,7 +159,7 @@ gs_plugin_initialize (GsPlugin *plugin)
 
        /* add source */
        priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
-       gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
+       gs_app_set_kind (priv->cached_origin, AS_COMPONENT_KIND_REPOSITORY);
        gs_app_set_origin_hostname (priv->cached_origin, priv->review_server);
 
        /* add the source to the plugin cache which allows us to match the
@@ -602,10 +602,10 @@ _gs_app_get_reviewable_ids (GsApp *app)
 
        /* add any ID provides */
        for (guint i = 0; i < provides->len; i++) {
-               AsProvide *provide = g_ptr_array_index (provides, i);
-               if (as_provide_get_kind (provide) == AS_PROVIDE_KIND_ID &&
-                   as_provide_get_value (provide) != NULL) {
-                       g_ptr_array_add (ids, g_strdup (as_provide_get_value (provide)));
+               AsProvided *provide = g_ptr_array_index (provides, i);
+               if (as_provided_get_kind (provide) == AS_PROVIDED_KIND_ID &&
+                   as_provided_get_value (provide) != NULL) {
+                       g_ptr_array_add (ids, g_strdup (as_provided_get_value (provide)));
                }
        }
        return ids;
@@ -702,15 +702,15 @@ gs_plugin_odrs_get_compat_ids (GsApp *app)
 
        ids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
        for (guint i = 0; i < provides->len; i++) {
-               AsProvide *provide = g_ptr_array_index (provides, i);
-               if (as_provide_get_kind (provide) != AS_PROVIDE_KIND_ID)
+               AsProvided *provide = g_ptr_array_index (provides, i);
+               if (as_provided_get_kind (provide) != AS_PROVIDED_KIND_ID)
                        continue;
-               if (as_provide_get_value (provide) == NULL)
+               if (as_provided_get_value (provide) == NULL)
                        continue;
-               if (g_hash_table_lookup (ids, as_provide_get_value (provide)) != NULL)
+               if (g_hash_table_lookup (ids, as_provided_get_value (provide)) != NULL)
                        continue;
-               g_hash_table_add (ids, g_strdup (as_provide_get_value (provide)));
-               json_array_add_string_element (json_array, as_provide_get_value (provide));
+               g_hash_table_add (ids, g_strdup (as_provided_get_value (provide)));
+               json_array_add_string_element (json_array, as_provided_get_value (provide));
        }
        if (json_array_get_length (json_array) == 0)
                return NULL;
@@ -879,7 +879,7 @@ refine_app (GsPlugin             *plugin,
            GError              **error)
 {
        /* not valid */
-       if (gs_app_get_kind (app) == AS_APP_KIND_ADDON)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON)
                return TRUE;
        if (gs_app_get_id (app) == NULL)
                return TRUE;
@@ -1172,7 +1172,7 @@ gs_plugin_create_app_dummy (const gchar *id)
        GsApp *app = gs_app_new (id);
        g_autoptr(GString) str = NULL;
        str = g_string_new (id);
-       as_utils_string_replace (str, ".desktop", "");
+       as_gstring_replace (str, ".desktop", "");
        g_string_prepend (str, "No description is available for ");
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, "Unknown Application");
        gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, "Application not found");
diff --git a/plugins/packagekit/gs-plugin-packagekit-history.c 
b/plugins/packagekit/gs-plugin-packagekit-history.c
index 61753166..c244b196 100644
--- a/plugins/packagekit/gs-plugin-packagekit-history.c
+++ b/plugins/packagekit/gs-plugin-packagekit-history.c
@@ -55,7 +55,7 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
 
        /* create new history item with same ID as parent */
        history = gs_app_new (gs_app_get_id (app));
-       gs_app_set_kind (history, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (history, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
        gs_app_set_name (history, GS_APP_QUALITY_NORMAL, gs_app_get_name (app));
 
@@ -64,13 +64,13 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
        g_assert (ret);
        switch (info_enum) {
        case PK_INFO_ENUM_INSTALLING:
-               gs_app_set_state (history, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (history, GS_APP_STATE_INSTALLED);
                break;
        case PK_INFO_ENUM_REMOVING:
-               gs_app_set_state (history, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (history, GS_APP_STATE_AVAILABLE);
                break;
        case PK_INFO_ENUM_UPDATING:
-               gs_app_set_state (history, AS_APP_STATE_UPDATABLE);
+               gs_app_set_state (history, GS_APP_STATE_UPDATABLE);
                break;
        default:
                g_debug ("ignoring history kind: %s",
@@ -194,15 +194,15 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
                if (!ret) {
                        /* make up a fake entry as we know this package was at
                         * least installed at some point in time */
-                       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+                       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                                g_autoptr(GsApp) app_dummy = NULL;
                                app_dummy = gs_app_new (gs_app_get_id (app));
                                gs_plugin_packagekit_set_packaging_format (plugin, app);
                                gs_app_set_metadata (app_dummy, "GnomeSoftware::Creator",
                                                     gs_plugin_get_name (plugin));
                                gs_app_set_install_date (app_dummy, GS_APP_INSTALL_DATE_UNKNOWN);
-                               gs_app_set_kind (app_dummy, AS_APP_KIND_GENERIC);
-                               gs_app_set_state (app_dummy, AS_APP_STATE_INSTALLED);
+                               gs_app_set_kind (app_dummy, AS_COMPONENT_KIND_GENERIC);
+                               gs_app_set_state (app_dummy, GS_APP_STATE_INSTALLED);
                                gs_app_set_version (app_dummy, gs_app_get_version (app));
                                gs_app_add_history (app, app_dummy);
                        }
diff --git a/plugins/packagekit/gs-plugin-packagekit-local.c b/plugins/packagekit/gs-plugin-packagekit-local.c
index 53b51acf..5bcce895 100644
--- a/plugins/packagekit/gs-plugin-packagekit-local.c
+++ b/plugins/packagekit/gs-plugin-packagekit-local.c
@@ -97,7 +97,7 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin,
                }
        }
        if (basename_best->len > 0) {
-               gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
                gs_app_set_id (app, basename_best->str);
        }
 
@@ -141,8 +141,8 @@ gs_plugin_packagekit_local_check_installed (GsPlugin *plugin,
                return FALSE;
        packages = pk_results_get_package_array (results);
        if (packages->len > 0) {
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
                for (guint i = 0; i < packages->len; i++){
                        PkPackage *pkg = g_ptr_array_index (packages, i);
                        gs_app_add_source_id (app, pk_package_get_id (pkg));
@@ -233,9 +233,9 @@ gs_plugin_file_to_app (GsPlugin *plugin,
                return FALSE;
        }
        gs_app_set_management_plugin (app, "packagekit");
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
        gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
                            pk_details_get_summary (item));
diff --git a/plugins/packagekit/gs-plugin-packagekit-offline.c 
b/plugins/packagekit/gs-plugin-packagekit-offline.c
index 7e157203..7d70796a 100644
--- a/plugins/packagekit/gs-plugin-packagekit-offline.c
+++ b/plugins/packagekit/gs-plugin-packagekit-offline.c
@@ -142,8 +142,8 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
                gs_app_set_from_unique_id (app, "*/*/*/*/system/*");
                gs_app_set_management_plugin (app, "packagekit");
                gs_app_add_quirk (app, GS_APP_QUIRK_IS_WILDCARD);
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
-               gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_OPERATING_SYSTEM);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                gs_app_set_install_date (app, mtime);
                gs_app_set_metadata (app, "GnomeSoftware::Creator",
@@ -169,8 +169,8 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
                gs_app_set_update_version (app, split[1]);
                gs_app_set_management_plugin (app, "packagekit");
                gs_app_add_source_id (app, package_id);
-               gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
-               gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+               gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                gs_app_set_install_date (app, mtime);
                gs_app_set_metadata (app, "GnomeSoftware::Creator",
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c 
b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
index 4b41c446..39c262c8 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
@@ -102,7 +102,7 @@ gs_plugin_refine (GsPlugin *plugin,
                const gchar *fn;
                if (gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD))
                        continue;
-               if (gs_app_get_kind (app) != AS_APP_KIND_SOURCE)
+               if (gs_app_get_kind (app) != AS_COMPONENT_KIND_REPOSITORY)
                        continue;
                if (g_strcmp0 (gs_app_get_management_plugin (app), "packagekit") != 0)
                        continue;
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine.c 
b/plugins/packagekit/gs-plugin-packagekit-refine.c
index 68f7eb64..2f81ed58 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine.c
@@ -76,7 +76,7 @@ void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
        if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_PACKAGE &&
-           gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM) {
+           gs_app_get_scope (app) == AS_COMPONENT_SCOPE_SYSTEM) {
                gs_app_set_management_plugin (app, "packagekit");
                gs_plugin_packagekit_set_packaging_format (plugin, app);
                return;
@@ -179,7 +179,7 @@ gs_plugin_packagekit_resolve_packages (GsPlugin *plugin,
        resolve2_list = gs_app_list_new ();
        for (guint i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
                        gs_app_list_add (resolve2_list, app);
        }
        filter = pk_bitfield_from_enums (PK_FILTER_ENUM_NEWEST,
@@ -617,7 +617,7 @@ gs_plugin_packagekit_refine_distro_upgrade (GsPlugin *plugin,
        /* add each of these as related applications */
        for (i = 0; i < gs_app_list_length (list); i++) {
                app2 = gs_app_list_index (list, i);
-               if (gs_app_get_state (app2) != AS_APP_STATE_UNAVAILABLE)
+               if (gs_app_get_state (app2) != GS_APP_STATE_UNAVAILABLE)
                        continue;
                gs_app_add_related (app, app2);
        }
@@ -655,7 +655,7 @@ gs_plugin_packagekit_refine_name_to_id (GsPlugin *plugin,
                tmp = g_ptr_array_index (sources, 0);
                if (!gs_plugin_packagekit_refine_valid_package_name (tmp))
                        continue;
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN ||
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN ||
                    gs_plugin_refine_requires_package_id (app, flags) ||
                    gs_plugin_refine_requires_origin (app, flags) ||
                    gs_plugin_refine_requires_version (app, flags)) {
@@ -698,10 +698,10 @@ gs_plugin_packagekit_refine_filename_to_id (GsPlugin *plugin,
                if (tmp == NULL)
                        continue;
                switch (gs_app_get_kind (app)) {
-               case AS_APP_KIND_DESKTOP:
+               case AS_COMPONENT_KIND_DESKTOP:
                        fn = g_strdup_printf ("/usr/share/applications/%s", tmp);
                        break;
-               case AS_APP_KIND_ADDON:
+               case AS_COMPONENT_KIND_ADDON:
                        fn = g_strdup_printf ("/usr/share/metainfo/%s.metainfo.xml", tmp);
                        if (!g_file_test (fn, G_FILE_TEST_EXISTS)) {
                                g_free (fn);
@@ -740,7 +740,7 @@ gs_plugin_packagekit_refine_update_details (GsPlugin *plugin,
                const gchar *tmp;
                if (gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD))
                        continue;
-               if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+               if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
                        continue;
                if (gs_app_get_source_id_default (app) == NULL)
                        continue;
@@ -769,11 +769,11 @@ gs_plugin_refine (GsPlugin *plugin,
 {
        /* when we need the cannot-be-upgraded applications, we implement this
         * by doing a UpgradeSystem(SIMULATE) which adds the removed packages
-        * to the related-apps list with a state of %AS_APP_STATE_UNAVAILABLE */
+        * to the related-apps list with a state of %GS_APP_STATE_UNAVAILABLE */
        if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPGRADE_REMOVED) {
                for (guint i = 0; i < gs_app_list_length (list); i++) {
                        GsApp *app = gs_app_list_index (list, i);
-                       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+                       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM)
                                continue;
                        if (!gs_plugin_packagekit_refine_distro_upgrade (plugin,
                                                                         app,
@@ -811,8 +811,8 @@ gs_plugin_refine (GsPlugin *plugin,
                        continue;
 
                /* the scope is always system-wide */
-               if (gs_app_get_scope (app) == AS_APP_SCOPE_UNKNOWN)
-                       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+               if (gs_app_get_scope (app) == AS_COMPONENT_SCOPE_UNKNOWN)
+                       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
                if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_UNKNOWN)
                        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
        }
diff --git a/plugins/packagekit/gs-plugin-packagekit-upgrade.c 
b/plugins/packagekit/gs-plugin-packagekit-upgrade.c
index 6442dd71..c09af98c 100644
--- a/plugins/packagekit/gs-plugin-packagekit-upgrade.c
+++ b/plugins/packagekit/gs-plugin-packagekit-upgrade.c
@@ -44,7 +44,7 @@ gs_plugin_destroy (GsPlugin *plugin)
 void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
-       if (gs_app_get_kind (app) == AS_APP_KIND_OS_UPGRADE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_OPERATING_SYSTEM)
                gs_app_set_management_plugin (app, "packagekit");
 }
 
@@ -63,11 +63,11 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
                return TRUE;
 
        /* check is distro-upgrade */
-       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM)
                return TRUE;
 
        /* ask PK to download enough packages to upgrade the system */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        gs_packagekit_helper_set_progress_app (helper, app);
        g_mutex_lock (&priv->task_mutex);
        results = pk_task_upgrade_system_sync (priv->task,
@@ -83,6 +83,6 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
        }
 
        /* state is known */
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        return TRUE;
 }
diff --git a/plugins/packagekit/gs-plugin-packagekit-url-to-app.c 
b/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
index 04189204..e3d52d60 100644
--- a/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
+++ b/plugins/packagekit/gs-plugin-packagekit-url-to-app.c
@@ -81,7 +81,7 @@ gs_plugin_url_to_app (GsPlugin *plugin,
        app = gs_app_new (NULL);
        gs_plugin_packagekit_set_packaging_format (plugin, app);
        gs_app_add_source (app, path);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
 
        package_ids = g_new0 (gchar *, 2);
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 813e38b2..afe5da2e 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -151,11 +151,11 @@ gs_plugin_add_sources (GsPlugin *plugin,
                id = pk_repo_detail_get_id (rd);
                app = gs_app_new (id);
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
-               gs_app_set_kind (app, AS_APP_KIND_SOURCE);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_REPOSITORY);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
                gs_app_set_state (app, pk_repo_detail_get_enabled (rd) ?
-                                 AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+                                 GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
                gs_app_set_name (app,
                                 GS_APP_QUALITY_LOWEST,
                                 pk_repo_detail_get_description (rd));
@@ -217,7 +217,7 @@ gs_plugin_app_origin_repo_enable (GsPlugin *plugin,
 
        /* now that the repo is enabled, the app (not the repo!) moves from
         * UNAVAILABLE state to AVAILABLE */
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 
        return TRUE;
 }
@@ -235,7 +235,7 @@ gs_plugin_repo_enable (GsPlugin *plugin,
 
        /* do sync call */
        gs_plugin_status_update (plugin, app, GS_PLUGIN_STATUS_WAITING);
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        gs_packagekit_helper_add_app (helper, app);
        g_mutex_lock (&priv->task_mutex);
        results = pk_client_repo_enable (PK_CLIENT (priv->task),
@@ -258,7 +258,7 @@ gs_plugin_repo_enable (GsPlugin *plugin,
        }
 
        /* state is known */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
        return TRUE;
 }
@@ -286,16 +286,16 @@ gs_plugin_app_install (GsPlugin *plugin,
                return TRUE;
 
        /* enable repo */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_plugin_repo_enable (plugin, app, cancellable, error);
 
        /* queue for install if installation needs the network */
        if (!gs_plugin_get_network_available (plugin)) {
-               gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+               gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
                return TRUE;
        }
 
-       if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
                /* get everything up front we need */
                source_ids = gs_app_get_source_ids (app);
                if (source_ids->len == 0) {
@@ -312,7 +312,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                if (!gs_plugin_app_origin_repo_enable (plugin, app, cancellable, error))
                        return FALSE;
 
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
 
                /* FIXME: this is a hack, to allow PK time to re-initialize
                 * everything in order to match an actual result. The root cause
@@ -334,7 +334,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                }
 
                /* state is known */
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
                /* if we remove the app again later, we should be able to
                 * cancel the installation if we'd never installed it */
@@ -347,8 +347,8 @@ gs_plugin_app_install (GsPlugin *plugin,
 
        /* get the list of available package ids to install */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_UPDATABLE:
                source_ids = gs_app_get_source_ids (app);
                if (source_ids->len == 0) {
                        g_set_error_literal (error,
@@ -390,12 +390,12 @@ gs_plugin_app_install (GsPlugin *plugin,
                        return FALSE;
                }
 
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                addons = gs_app_get_addons (app);
                for (i = 0; i < gs_app_list_length (addons); i++) {
                        GsApp *addon = gs_app_list_index (addons, i);
                        if (gs_app_get_to_be_installed (addon))
-                               gs_app_set_state (addon, AS_APP_STATE_INSTALLING);
+                               gs_app_set_state (addon, GS_APP_STATE_INSTALLING);
                }
                gs_packagekit_helper_add_app (helper, app);
                g_mutex_lock (&priv->task_mutex);
@@ -411,10 +411,10 @@ gs_plugin_app_install (GsPlugin *plugin,
                }
 
                /* state is known */
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
                break;
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                if (gs_app_get_local_file (app) == NULL) {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
@@ -425,7 +425,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                local_filename = g_file_get_path (gs_app_get_local_file (app));
                package_ids = g_strsplit (local_filename, "\t", -1);
 
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
                gs_packagekit_helper_add_app (helper, app);
                g_mutex_lock (&priv->task_mutex);
                results = pk_task_install_files_sync (priv->task,
@@ -440,7 +440,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                }
 
                /* state is known */
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
                /* get the new icon from the package */
                gs_app_set_local_file (app, NULL);
@@ -452,7 +452,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                             GS_PLUGIN_ERROR,
                             GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "do not know how to install app in state %s",
-                            as_app_state_to_string (gs_app_get_state (app)));
+                            gs_app_state_to_string (gs_app_get_state (app)));
                return FALSE;
        }
 
@@ -475,7 +475,7 @@ gs_plugin_repo_disable (GsPlugin *plugin,
 
        /* do sync call */
        gs_plugin_status_update (plugin, app, GS_PLUGIN_STATUS_WAITING);
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        gs_packagekit_helper_add_app (helper, app);
        g_mutex_lock (&priv->task_mutex);
        results = pk_client_repo_enable (PK_CLIENT (priv->task),
@@ -498,7 +498,7 @@ gs_plugin_repo_disable (GsPlugin *plugin,
        }
 
        /* state is known */
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 
        return TRUE;
 }
@@ -524,7 +524,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
                return TRUE;
 
        /* disable repo */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_plugin_repo_disable (plugin, app, cancellable, error);
 
        /* get the list of available package ids to install */
@@ -552,7 +552,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
        }
 
        /* do the action */
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        gs_packagekit_helper_add_app (helper, app);
        g_mutex_lock (&priv->task_mutex);
        results = pk_task_remove_packages_sync (priv->task,
@@ -568,7 +568,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
        }
 
        /* state is not known: we don't know if we can re-install this app */
-       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
 
        /* no longer valid */
        gs_app_clear_source_ids (app);
@@ -594,10 +594,10 @@ gs_plugin_packagekit_build_update_app (GsPlugin *plugin, PkPackage *package)
                             gs_plugin_get_name (plugin));
        gs_app_set_management_plugin (app, "packagekit");
        gs_app_set_update_version (app, pk_package_get_version (package));
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        gs_plugin_cache_add (plugin, pk_package_get_id (package), app);
        return app;
 }
diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c
index ea8ff1a9..02dbdf23 100644
--- a/plugins/packagekit/gs-plugin-systemd-updates.c
+++ b/plugins/packagekit/gs-plugin-systemd-updates.c
@@ -235,7 +235,7 @@ _systemd_trigger_app (GsPlugin *plugin,
        GsPluginData *priv = gs_plugin_get_data (plugin);
 
        /* if we can process this online do not require a trigger */
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
                return TRUE;
 
        /* only process this app if was created by this plugin */
diff --git a/plugins/packagekit/packagekit-common.c b/plugins/packagekit/packagekit-common.c
index db86bd84..2ffb0189 100644
--- a/plugins/packagekit/packagekit-common.c
+++ b/plugins/packagekit/packagekit-common.c
@@ -260,10 +260,10 @@ gs_plugin_packagekit_add_results (GsPlugin *plugin,
                gs_app_set_version (app, pk_package_get_version (package));
                switch (pk_package_get_info (package)) {
                case PK_INFO_ENUM_INSTALLED:
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
                        break;
                case PK_INFO_ENUM_AVAILABLE:
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
                        break;
                case PK_INFO_ENUM_INSTALLING:
                case PK_INFO_ENUM_UPDATING:
@@ -273,14 +273,14 @@ gs_plugin_packagekit_add_results (GsPlugin *plugin,
                        break;
                case PK_INFO_ENUM_UNAVAILABLE:
                case PK_INFO_ENUM_REMOVING:
-                       gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+                       gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
                        break;
                default:
-                       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+                       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
                        g_warning ("unknown info state of %s",
                                   pk_info_enum_to_string (pk_package_get_info (package)));
                }
-               gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                gs_app_list_add (list, app);
        }
@@ -330,23 +330,23 @@ gs_plugin_packagekit_resolve_packages_app (GsPlugin *plugin,
        /* if *all* the source packages for the app are installed then the
         * application is considered completely installed */
        if (number_installed == sources->len && number_available == 0) {
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        } else if (number_installed + number_available == sources->len) {
                /* if all the source packages are installed and all the rest
                 * of the packages are available then the app is available */
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        } else if (number_installed + number_available > sources->len) {
                /* we have more packages returned than source packages */
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
-               gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        } else if (number_installed + number_available < sources->len) {
                g_autofree gchar *tmp = NULL;
                /* we have less packages returned than source packages */
                tmp = gs_app_to_string (app);
                g_debug ("Failed to find all packages for:\n%s", tmp);
-               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+               gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
        }
 }
 
@@ -372,7 +372,7 @@ gs_plugin_packagekit_set_metadata_from_package (GsPlugin *plugin,
 
        /* set unavailable state */
        if (pk_package_get_info (package) == PK_INFO_ENUM_UNAVAILABLE) {
-               gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
                if (gs_app_get_size_installed (app) == 0)
                        gs_app_set_size_installed (app, GS_APP_SIZE_UNKNOWABLE);
                if (gs_app_get_size_download (app) == 0)
@@ -512,7 +512,7 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
        }
 
        /* the size is the size of all sources */
-       if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE) {
                if (size > 0 && gs_app_get_size_installed (app) == 0)
                        gs_app_set_size_installed (app, size);
                if (size > 0 && gs_app_get_size_download (app) == 0)
diff --git a/plugins/repos/gs-plugin-repos.c b/plugins/repos/gs-plugin-repos.c
index a35fc800..0a5f7e8b 100644
--- a/plugins/repos/gs-plugin-repos.c
+++ b/plugins/repos/gs-plugin-repos.c
@@ -191,7 +191,7 @@ refine_app_locked (GsPlugin             *plugin,
 
        /* find hostname */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_REPOSITORY:
                if (gs_app_get_id (app) == NULL)
                        return TRUE;
                tmp = g_hash_table_lookup (priv->urls, gs_app_get_id (app));
@@ -209,7 +209,7 @@ refine_app_locked (GsPlugin             *plugin,
 
        /* find filename */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_REPOSITORY:
                if (gs_app_get_id (app) == NULL)
                        return TRUE;
                tmp = g_hash_table_lookup (priv->fns, gs_app_get_id (app));
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index e7bde90e..35b5fd2b 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -222,13 +222,13 @@ void
 gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
 {
        if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_PACKAGE &&
-           gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM) {
+           gs_app_get_scope (app) == AS_COMPONENT_SCOPE_SYSTEM) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
                app_set_rpm_ostree_packaging_format (app);
        }
 
-       if (gs_app_get_kind (app) == AS_APP_KIND_OS_UPGRADE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_OPERATING_SYSTEM) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        }
@@ -296,10 +296,10 @@ on_transaction_progress (GDBusProxy *proxy,
                        GsPluginStatus plugin_status;
 
                        switch (gs_app_get_state (tp->app)) {
-                       case AS_APP_STATE_INSTALLING:
+                       case GS_APP_STATE_INSTALLING:
                                plugin_status = GS_PLUGIN_STATUS_INSTALLING;
                                break;
-                       case AS_APP_STATE_REMOVING:
+                       case GS_APP_STATE_REMOVING:
                                plugin_status = GS_PLUGIN_STATUS_REMOVING;
                                break;
                        default:
@@ -454,15 +454,15 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant)
        gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
        gs_app_set_size_download (app, 0);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
 
        /* update or downgrade */
        gs_app_add_source (app, name);
        gs_app_set_version (app, old_evr);
        gs_app_set_update_version (app, new_evr);
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
 
        g_debug ("!%s\n", old_nevra);
        g_debug ("=%s\n", new_nevra);
@@ -493,22 +493,22 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit
        gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
        gs_app_set_size_download (app, 0);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
 
        if (addition) {
                /* addition */
                gs_app_add_source (app, name);
                gs_app_set_version (app, evr);
-               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 
                g_debug ("+%s\n", nevra);
        } else {
                /* removal */
                gs_app_add_source (app, name);
                gs_app_set_version (app, evr);
-               gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
 
                g_debug ("-%s\n", nevra);
        }
@@ -924,7 +924,7 @@ trigger_rpmostree_update (GsPlugin *plugin,
        g_autoptr(TransactionProgress) tp = transaction_progress_new ();
 
        /* if we can process this online do not require a trigger */
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
                return TRUE;
 
        /* only process this app if was created by this plugin */
@@ -1011,7 +1011,7 @@ gs_plugin_app_upgrade_trigger (GsPlugin *plugin,
                return TRUE;
 
        /* check is distro-upgrade */
-       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM)
                return TRUE;
 
        /* construct new refspec based on the distro version we're upgrading to */
@@ -1074,9 +1074,9 @@ gs_plugin_repo_enable (GsPlugin *plugin,
        g_autoptr(TransactionProgress) tp = NULL;
 
        if (enable)
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        else
-               gs_app_set_state (app, AS_APP_STATE_REMOVING);
+               gs_app_set_state (app, GS_APP_STATE_REMOVING);
 
        options_builder = g_variant_builder_new (G_VARIANT_TYPE ("a{ss}"));
        g_variant_builder_add (options_builder, "{ss}", "enabled", enable ? "1" : "0");
@@ -1108,9 +1108,9 @@ gs_plugin_repo_enable (GsPlugin *plugin,
 
        /* state is known */
        if (enable)
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        else
-               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 
        return TRUE;
 }
@@ -1133,11 +1133,11 @@ gs_plugin_app_install (GsPlugin *plugin,
                return TRUE;
 
        /* enable repo */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_plugin_repo_enable (plugin, app, TRUE, cancellable, error);
 
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                if (gs_app_get_source_default (app) == NULL) {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
@@ -1148,7 +1148,7 @@ gs_plugin_app_install (GsPlugin *plugin,
 
                install_package = gs_app_get_source_default (app);
                break;
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                if (gs_app_get_local_file (app) == NULL) {
                        g_set_error_literal (error,
                                             GS_PLUGIN_ERROR,
@@ -1164,11 +1164,11 @@ gs_plugin_app_install (GsPlugin *plugin,
                             GS_PLUGIN_ERROR,
                             GS_PLUGIN_ERROR_NOT_SUPPORTED,
                             "do not know how to install app in state %s",
-                            as_app_state_to_string (gs_app_get_state (app)));
+                            gs_app_state_to_string (gs_app_get_state (app)));
                return FALSE;
        }
 
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        tp->app = g_object_ref (app);
 
        options = make_rpmostree_options_variant (FALSE,  /* reboot */
@@ -1204,7 +1204,7 @@ gs_plugin_app_install (GsPlugin *plugin,
        }
 
        /* state is known */
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
        /* get the new icon from the package */
        gs_app_set_local_file (app, NULL);
@@ -1233,10 +1233,10 @@ gs_plugin_app_remove (GsPlugin *plugin,
                return TRUE;
 
        /* disable repo */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_REPOSITORY)
                return gs_plugin_repo_enable (plugin, app, FALSE, cancellable, error);
 
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        tp->app = g_object_ref (app);
 
        options = make_rpmostree_options_variant (FALSE,  /* reboot */
@@ -1272,7 +1272,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
        }
 
        /* state is not known: we don't know if we can re-install this app */
-       gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+       gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
 
        return TRUE;
 }
@@ -1320,8 +1320,8 @@ resolve_installed_packages_app (GsPlugin *plugin,
                RpmOstreePackage *pkg = g_ptr_array_index (pkglist, i);
                if (g_strcmp0 (rpm_ostree_package_get_name (pkg), gs_app_get_source_default (app)) == 0) {
                        gs_app_set_version (app, rpm_ostree_package_get_evr (pkg));
-                       if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+                       if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
                        if (g_strv_contains ((const gchar * const *) layered_packages,
                                             rpm_ostree_package_get_name (pkg)) ||
                            g_strv_contains ((const gchar * const *) layered_local_packages,
@@ -1351,8 +1351,8 @@ resolve_available_packages_app (GsPlugin *plugin,
        pkg = find_package_by_name (sack, gs_app_get_source_default (app));
        if (pkg != NULL) {
                gs_app_set_version (app, dnf_package_get_evr (pkg));
-               if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
-                       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+                       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
 
                /* anything not part of the base system can be removed */
                gs_app_remove_quirk (app, GS_APP_QUIRK_COMPULSORY);
@@ -1370,9 +1370,9 @@ resolve_available_packages_app (GsPlugin *plugin,
                /* set hide-from-search quirk for available apps we don't want to show */
                if (!gs_app_is_installed (app)) {
                        switch (gs_app_get_kind (app)) {
-                       case AS_APP_KIND_DESKTOP:
-                       case AS_APP_KIND_WEB_APP:
-                       case AS_APP_KIND_CONSOLE:
+                       case AS_COMPONENT_KIND_DESKTOP_APP:
+                       case AS_COMPONENT_KIND_WEB_APP:
+                       case AS_COMPONENT_KIND_CONSOLE_APP:
                                gs_app_add_quirk (app, GS_APP_QUIRK_HIDE_FROM_SEARCH);
                                break;
                        default:
@@ -1491,7 +1491,7 @@ gs_plugin_refine (GsPlugin *plugin,
                /* set management plugin for apps where appstream just added the source package name in 
refine() */
                if (gs_app_get_management_plugin (app) == NULL &&
                    gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_PACKAGE &&
-                   gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM &&
+                   gs_app_get_scope (app) == AS_COMPONENT_SCOPE_SYSTEM &&
                    gs_app_get_source_default (app) != NULL) {
                        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                        gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
@@ -1500,7 +1500,7 @@ gs_plugin_refine (GsPlugin *plugin,
                /* resolve the source package name based on installed appdata/desktop file name */
                if (gs_app_get_management_plugin (app) == NULL &&
                    gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_UNKNOWN &&
-                   gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM &&
+                   gs_app_get_scope (app) == AS_COMPONENT_SCOPE_SYSTEM &&
                    gs_app_get_source_default (app) == NULL) {
                        if (!resolve_appstream_source_file_to_package_name (plugin, app, flags, cancellable, 
error))
                                return FALSE;
@@ -1544,7 +1544,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
                return TRUE;
 
        /* check is distro-upgrade */
-       if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM)
                return TRUE;
 
        /* construct new refspec based on the distro version we're upgrading to */
@@ -1560,7 +1560,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
                                                  FALSE,  /* dry-run */
                                                  FALSE); /* no-overrides */
 
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
        tp->app = g_object_ref (app);
 
        if (!gs_rpmostree_os_call_rebase_sync (priv->os_proxy,
@@ -1595,7 +1595,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
        }
 
        /* state is known */
-       gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+       gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
        return TRUE;
 }
 
@@ -1611,7 +1611,7 @@ gs_plugin_launch (GsPlugin *plugin,
                return TRUE;
 
        /* these are handled by the shell extensions plugin */
-       if (gs_app_get_kind (app) == AS_APP_KIND_SHELL_EXTENSION)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_SHELL_EXTENSION)
                return TRUE;
 
        return gs_plugin_app_launch (plugin, app, error);
@@ -1694,10 +1694,10 @@ gs_plugin_file_to_app (GsPlugin *plugin,
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
        gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-       gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+       gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
 
        /* add default source */
        name = headerGetString (h, RPMTAG_NAME);
@@ -1797,9 +1797,9 @@ gs_plugin_add_search_what_provides (GsPlugin *plugin,
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
                gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
                app_set_rpm_ostree_packaging_format (app);
-               gs_app_set_kind (app, AS_APP_KIND_GENERIC);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
-               gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
+               gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM);
                gs_app_add_source (app, dnf_package_get_name (pkg));
 
                gs_plugin_cache_add (plugin, dnf_package_get_nevra (pkg), app);
@@ -1840,12 +1840,12 @@ gs_plugin_add_sources (GsPlugin *plugin,
 
                app = gs_app_new (dnf_repo_get_id (repo));
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
-               gs_app_set_kind (app, AS_APP_KIND_SOURCE);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_REPOSITORY);
                gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
 
                enabled = (dnf_repo_get_enabled (repo) & DNF_REPO_ENABLED_PACKAGES) > 0;
-               gs_app_set_state (app, enabled ? AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, enabled ? GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
 
                description = dnf_repo_get_description (repo);
                gs_app_set_name (app, GS_APP_QUALITY_LOWEST, description);
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index d4831e18..936252fa 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -344,7 +344,7 @@ snap_to_app (GsPlugin *plugin, SnapdSnap *snap)
 
        gs_app_set_management_plugin (app, "snap");
        gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
-       if (gs_app_get_kind (app) != AS_APP_KIND_DESKTOP)
+       if (gs_app_get_kind (app) != AS_COMPONENT_KIND_DESKTOP)
                gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
        if (gs_plugin_check_distro_id (plugin, "ubuntu"))
                gs_app_add_quirk (app, GS_APP_QUIRK_PROVENANCE);
@@ -870,8 +870,8 @@ static gchar *
 gs_plugin_snap_get_description_safe (SnapdSnap *snap)
 {
        GString *str = g_string_new (snapd_snap_get_description (snap));
-       as_utils_string_replace (str, "\r", "");
-       as_utils_string_replace (str, "  ", " ");
+       as_gstring_replace (str, "\r", "");
+       as_gstring_replace (str, "  ", " ");
        return g_string_free (str, FALSE);
 }
 
@@ -974,11 +974,11 @@ refine_app_with_client (GsPlugin             *plugin,
 
        if (local_snap != NULL && g_strcmp0 (tracking_channel, channel) == 0) {
                /* Do not set to installed state if app is updatable */
-               if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE) {
-                       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE) {
+                       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
                }
        } else
-               gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+               gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
 
        /* use store information for basic metadata over local information */
@@ -1040,16 +1040,16 @@ refine_app_with_client (GsPlugin             *plugin,
 
        switch (snapd_snap_get_snap_type (snap)) {
        case SNAPD_SNAP_TYPE_APP:
-               gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_DESKTOP);
                break;
        case SNAPD_SNAP_TYPE_KERNEL:
        case SNAPD_SNAP_TYPE_GADGET:
        case SNAPD_SNAP_TYPE_OS:
-               gs_app_set_kind (app, AS_APP_KIND_RUNTIME);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_RUNTIME);
                break;
        default:
        case SNAPD_SNAP_TYPE_UNKNOWN:
-               gs_app_set_kind (app, AS_APP_KIND_UNKNOWN);
+               gs_app_set_kind (app, AS_COMPONENT_KIND_UNKNOWN);
                break;
        }
 
@@ -1151,7 +1151,7 @@ gs_plugin_app_install (GsPlugin *plugin,
        name = gs_app_get_metadata_item (app, "snap::name");
        channel = gs_app_get_branch (app);
 
-       gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLING);
 
        if (g_strcmp0 (gs_app_get_metadata_item (app, "snap::confinement"), "classic") == 0)
                flags |= SNAPD_INSTALL_FLAGS_CLASSIC;
@@ -1170,7 +1170,7 @@ gs_plugin_app_install (GsPlugin *plugin,
                return FALSE;
        }
 
-       gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+       gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 
        return TRUE;
 }
@@ -1274,13 +1274,13 @@ gs_plugin_app_remove (GsPlugin *plugin,
        if (client == NULL)
                return FALSE;
 
-       gs_app_set_state (app, AS_APP_STATE_REMOVING);
+       gs_app_set_state (app, GS_APP_STATE_REMOVING);
        if (!snapd_client_remove2_sync (client, SNAPD_REMOVE_FLAGS_NONE, gs_app_get_metadata_item (app, 
"snap::name"), progress_cb, app, cancellable, error)) {
                gs_app_set_state_recover (app);
                snapd_error_convert (error);
                return FALSE;
        }
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        return TRUE;
 }
 
@@ -1314,8 +1314,8 @@ gs_plugin_add_updates (GsPlugin *plugin,
 
                /* If for some reason the app is already getting updated, then
                 * don't change its state */
-               if (gs_app_get_state (app) != AS_APP_STATE_INSTALLING)
-                       gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+               if (gs_app_get_state (app) != GS_APP_STATE_INSTALLING)
+                       gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
 
                /* Add GsApp to updatable GsAppList */
                gs_app_list_add (list, app);
@@ -1342,7 +1342,7 @@ gs_plugin_update (GsPlugin *plugin,
                gchar *name = gs_app_get_metadata_item (app, "snap::name");
 
                /* Refresh the snap */
-               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLING);
 
                if (!snapd_client_refresh_sync (client, name, NULL, progress_cb, app, cancellable, error)) {
                        gs_app_set_state_recover (app);
@@ -1350,7 +1350,7 @@ gs_plugin_update (GsPlugin *plugin,
                        return FALSE;
                }
 
-               gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               gs_app_set_state (app, GS_APP_STATE_INSTALLED);
        }
 
        return TRUE;
diff --git a/plugins/snap/gs-self-test.c b/plugins/snap/gs-self-test.c
index f10de87b..d3aa69e1 100644
--- a/plugins/snap/gs-self-test.c
+++ b/plugins/snap/gs-self-test.c
@@ -279,7 +279,7 @@ gs_plugins_snap_test_func (GsPluginLoader *plugin_loader)
        g_assert (apps != NULL);
        g_assert_cmpint (gs_app_list_length (apps), ==, 1);
        app = gs_app_list_index (apps, 0);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
        g_assert_cmpstr (gs_app_get_name (app), ==, "snap");
        g_assert_cmpstr (gs_app_get_version (app), ==, "VERSION");
        g_assert_cmpstr (gs_app_get_summary (app), ==, "SUMMARY");
@@ -315,7 +315,7 @@ gs_plugins_snap_test_func (GsPluginLoader *plugin_loader)
        gs_test_flush_main_context ();
        g_assert_no_error (error);
        g_assert (ret);
-       g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+       g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
        g_assert_cmpint (gs_app_get_size_installed (app), ==, 1000);
        g_assert_cmpint (gs_app_get_install_date (app), ==, g_date_time_to_unix (g_date_time_new_utc (2017, 
1, 2, 11, 23, 58)));
 
diff --git a/src/gs-app-addon-row.c b/src/gs-app-addon-row.c
index 30fb4d6f..1c31a1c0 100644
--- a/src/gs-app-addon-row.c
+++ b/src/gs-app-addon-row.c
@@ -50,7 +50,7 @@ gs_app_addon_row_get_summary (GsAppAddonRow *row)
        g_autofree gchar *escaped = NULL;
 
        /* try all these things in order */
-       if (gs_app_get_state (row->app) == AS_APP_STATE_UNAVAILABLE)
+       if (gs_app_get_state (row->app) == GS_APP_STATE_UNAVAILABLE)
                tmp = gs_app_get_summary_missing (row->app);
        if (tmp == NULL || (tmp != NULL && tmp[0] == '\0'))
                tmp = gs_app_get_summary (row->app);
@@ -71,28 +71,28 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
 
        /* join the lines */
        str = gs_app_addon_row_get_summary (row);
-       as_utils_string_replace (str, "\n", " ");
+       as_gstring_replace (str, "\n", " ");
        gtk_label_set_markup (GTK_LABEL (row->description_label), str->str);
        gtk_label_set_label (GTK_LABEL (row->name_label),
                             gs_app_get_name (row->app));
 
        /* update the state label */
        switch (gs_app_get_state (row->app)) {
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_visible (row->label, TRUE);
                gtk_label_set_label (GTK_LABEL (row->label), _("Pending"));
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
                gtk_widget_set_visible (row->label, TRUE);
                gtk_label_set_label (GTK_LABEL (row->label), _("Installed"));
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (row->label, TRUE);
                gtk_label_set_label (GTK_LABEL (row->label), _("Installing"));
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_visible (row->label, TRUE);
                gtk_label_set_label (GTK_LABEL (row->label), _("Removing"));
                break;
@@ -104,25 +104,25 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
        /* update the checkbox */
        g_signal_handlers_block_by_func (row->checkbox, checkbox_toggled, row);
        switch (gs_app_get_state (row->app)) {
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_sensitive (row->checkbox, TRUE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_sensitive (row->checkbox, TRUE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_INSTALLED:
                gtk_widget_set_sensitive (row->checkbox, TRUE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_sensitive (row->checkbox, FALSE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_sensitive (row->checkbox, FALSE);
                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
                break;
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 15cfe0bc..938f9827 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -87,7 +87,7 @@ gs_app_row_get_description (GsAppRow *app_row)
 
        /* if missing summary is set, return it without escaping in order to
         * correctly show hyperlinks */
-       if (gs_app_get_state (priv->app) == AS_APP_STATE_UNAVAILABLE) {
+       if (gs_app_get_state (priv->app) == GS_APP_STATE_UNAVAILABLE) {
                tmp = gs_app_get_summary_missing (priv->app);
                if (tmp != NULL && tmp[0] != '\0')
                        return g_string_new (tmp);
@@ -119,7 +119,7 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
 
        /* label */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                gtk_widget_set_visible (priv->button, TRUE);
                if (missing_search_result) {
                        /* TRANSLATORS: this is a button next to the search results that
@@ -132,20 +132,20 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                        gtk_button_set_label (GTK_BUTTON (priv->button), _("Install…"));
                }
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * allows to cancel a queued install of the application */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Cancel"));
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * allows the application to be easily installed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Install"));
                break;
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                gtk_widget_set_visible (priv->button, TRUE);
                if (priv->show_update) {
                        /* TRANSLATORS: this is a button in the updates panel
@@ -157,21 +157,21 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                        gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
                }
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_INSTALLED:
                if (!gs_app_has_quirk (priv->app, GS_APP_QUIRK_COMPULSORY))
                        gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * allows the application to be easily removed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * shows the status of an application being installed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_visible (priv->button, TRUE);
                /* TRANSLATORS: this is a button next to the search results that
                 * shows the status of an application being erased */
@@ -183,17 +183,17 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
 
        /* visible */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_UNAVAILABLE:
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
-       case AS_APP_STATE_UPDATABLE_LIVE:
-       case AS_APP_STATE_INSTALLING:
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_visible (priv->button, TRUE);
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_INSTALLED:
                gtk_widget_set_visible (priv->button,
                                        !gs_app_has_quirk (priv->app,
                                                           GS_APP_QUIRK_COMPULSORY));
@@ -209,11 +209,11 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
                gtk_style_context_remove_class (context, "destructive-action");
        } else {
                switch (gs_app_get_state (priv->app)) {
-               case AS_APP_STATE_UPDATABLE:
-               case AS_APP_STATE_INSTALLED:
+               case GS_APP_STATE_UPDATABLE:
+               case GS_APP_STATE_INSTALLED:
                        gtk_style_context_add_class (context, "destructive-action");
                        break;
-               case AS_APP_STATE_UPDATABLE_LIVE:
+               case GS_APP_STATE_UPDATABLE_LIVE:
                        if (priv->show_update)
                                gtk_style_context_remove_class (context, "destructive-action");
                        else
@@ -227,8 +227,8 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
 
        /* always insensitive when in selection mode */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_INSTALLING:
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_sensitive (priv->button, FALSE);
                break;
        default:
@@ -251,12 +251,12 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
                return;
 
        /* is this a missing search result from the extras page? */
-       missing_search_result = (gs_app_get_state (priv->app) == AS_APP_STATE_UNAVAILABLE &&
+       missing_search_result = (gs_app_get_state (priv->app) == GS_APP_STATE_UNAVAILABLE &&
                                 gs_app_get_url (priv->app, AS_URL_KIND_MISSING) != NULL);
 
        /* do a fill bar for the current progress */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gs_progress_button_set_progress (GS_PROGRESS_BUTTON (priv->button),
                                                 gs_app_get_progress (priv->app));
                gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (priv->button), TRUE);
@@ -269,7 +269,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
        /* join the description lines */
        str = gs_app_row_get_description (app_row);
        if (str != NULL) {
-               as_utils_string_replace (str, "\n", " ");
+               as_gstring_replace (str, "\n", " ");
                gtk_label_set_label (GTK_LABEL (priv->description_label), str->str);
                g_string_free (str, TRUE);
        } else {
@@ -302,9 +302,9 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
        /* installed tag */
        if (!priv->show_buttons) {
                switch (gs_app_get_state (priv->app)) {
-               case AS_APP_STATE_UPDATABLE:
-               case AS_APP_STATE_UPDATABLE_LIVE:
-               case AS_APP_STATE_INSTALLED:
+               case GS_APP_STATE_UPDATABLE:
+               case GS_APP_STATE_UPDATABLE_LIVE:
+               case GS_APP_STATE_INSTALLED:
                        gtk_widget_set_visible (priv->label_installed, TRUE);
                        break;
                default:
@@ -410,7 +410,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
 
        /* pending label */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_visible (priv->label, TRUE);
                gtk_label_set_label (GTK_LABEL (priv->label), _("Pending"));
                break;
@@ -421,7 +421,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
 
        /* spinner */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                gtk_spinner_start (GTK_SPINNER (priv->spinner));
                gtk_widget_set_visible (priv->spinner, TRUE);
                break;
@@ -435,8 +435,8 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
 
        /* hide buttons in the update list, unless the app is live updatable */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_UPDATABLE_LIVE:
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (priv->button_box, TRUE);
                break;
        default:
@@ -449,8 +449,8 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
                size = gs_app_get_size_installed (priv->app);
        } else if (priv->show_update) {
                switch (gs_app_get_state (priv->app)) {
-               case AS_APP_STATE_UPDATABLE_LIVE:
-               case AS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_UPDATABLE_LIVE:
+               case GS_APP_STATE_INSTALLING:
                        size = gs_app_get_size_download (priv->app);
                        break;
                default:
diff --git a/src/gs-application.c b/src/gs-application.c
index 95afc030..1c0b5dc3 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -594,7 +594,7 @@ details_activated (GSimpleAction *action,
                gs_shell_show_search_result (app->shell, id, search);
        } else {
                g_autoptr(GsPluginJob) plugin_job = NULL;
-               if (as_utils_unique_id_valid (id)) {
+               if (as_utils_data_id_valid (id)) {
                        g_autoptr(GsApp) a = gs_plugin_loader_app_create (app->plugin_loader, id);
                        gs_shell_reset_state (app->shell);
                        gs_shell_show_app (app->shell, a);
@@ -668,7 +668,7 @@ install_activated (GSimpleAction *action,
        g_autoptr (GsApp) a = NULL;
 
        g_variant_get (parameter, "(&su)", &id, &interaction);
-       if (!as_utils_unique_id_valid (id)) {
+       if (!as_utils_data_id_valid (id)) {
                g_warning ("Need to use a valid unique-id: %s", id);
                return;
        }
diff --git a/src/gs-common.c b/src/gs-common.c
index 1e5358bf..0e019cba 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -118,7 +118,7 @@ gs_app_notify_installed (GsApp *app)
        g_autoptr(GNotification) n = NULL;
 
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_OS_UPDATE:
+       case AS_COMPONENT_KIND_OS_UPDATE:
                /* TRANSLATORS: this is the summary of a notification that OS updates
                 * have been successfully installed */
                summary = g_strdup (_("OS updates are now installed"));
@@ -126,7 +126,7 @@ gs_app_notify_installed (GsApp *app)
                 * have been successfully installed */
                body = _("Recently installed updates are available to review");
                break;
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP_APP:
                /* TRANSLATORS: this is the summary of a notification that an application
                 * has been successfully installed */
                summary = g_strdup_printf (_("%s is now installed"), gs_app_get_name (app));
@@ -159,7 +159,7 @@ gs_app_notify_installed (GsApp *app)
                /* TRANSLATORS: button text */
                g_notification_add_button_with_target (n, _("Restart"),
                                                       "app.reboot", NULL);
-       } else if (gs_app_get_kind (app) == AS_APP_KIND_DESKTOP) {
+       } else if (gs_app_get_kind (app) == AS_COMPONENT_KIND_DESKTOP_APP) {
                /* TRANSLATORS: this is button that opens the newly installed application */
                g_notification_add_button_with_target (n, _("Launch"),
                                                       "app.launch", "(ss)",
@@ -266,7 +266,7 @@ gs_app_notify_unavailable (GsApp *app, GtkWindow *parent)
        /* be aware of patent clauses */
        if (hint & GS_APP_LICENSE_PATENT_CONCERN) {
                g_string_append (body, "\n\n");
-               if (gs_app_get_kind (app) != AS_APP_KIND_CODEC) {
+               if (gs_app_get_kind (app) != AS_COMPONENT_KIND_CODEC) {
                        g_string_append_printf (body,
                                                /* TRANSLATORS: Laws are geographical, urgh... */
                                                _("It may be illegal to install "
@@ -557,7 +557,7 @@ gs_utils_get_error_value (const GError *error)
 
 /**
  * gs_utils_build_unique_id_kind:
- * @kind: A #AsAppKind
+ * @kind: A #AsComponentKind
  * @id: An application ID
  *
  * Converts the ID valid into a wildcard unique ID of a specific kind.
@@ -566,20 +566,18 @@ gs_utils_get_error_value (const GError *error)
  * Returns: (transfer full): a unique ID, or %NULL
  */
 gchar *
-gs_utils_build_unique_id_kind (AsAppKind kind, const gchar *id)
+gs_utils_build_unique_id_kind (AsComponentKind kind, const gchar *id)
 {
-       if (as_utils_unique_id_valid (id))
+       if (as_utils_data_id_valid (id))
                return g_strdup (id);
-       return as_utils_unique_id_build (AS_APP_SCOPE_UNKNOWN,
-                                        AS_BUNDLE_KIND_UNKNOWN,
-                                        NULL,
-                                        kind,
-                                        id,
-                                        NULL);
+       return as_utils_build_data_id (AS_COMPONENT_SCOPE_UNKNOWN,
+                                      NULL,
+                                      AS_BUNDLE_KIND_UNKNOWN,
+                                      id);
 }
 
 /**
- * gs_utils_list_has_app_fuzzy:
+ * gs_utils_list_has_component_fuzzy:
  * @list: A #GsAppList
  * @app: A #GsApp
  *
@@ -593,7 +591,7 @@ gs_utils_build_unique_id_kind (AsAppKind kind, const gchar *id)
  * Returns: %TRUE if the app is visually the "same"
  */
 gboolean
-gs_utils_list_has_app_fuzzy (GsAppList *list, GsApp *app)
+gs_utils_list_has_component_fuzzy (GsAppList *list, GsApp *app)
 {
        guint i;
        GsApp *tmp;
diff --git a/src/gs-common.h b/src/gs-common.h
index 7540aef7..63c8e86b 100644
--- a/src/gs-common.h
+++ b/src/gs-common.h
@@ -42,9 +42,9 @@ void           gs_utils_show_error_dialog     (GtkWindow      *parent,
                                                 const gchar    *title,
                                                 const gchar    *msg,
                                                 const gchar    *details);
-gchar          *gs_utils_build_unique_id_kind  (AsAppKind       kind,
+gchar          *gs_utils_build_unique_id_kind  (AsComponentKind kind,
                                                 const gchar    *id);
-gboolean        gs_utils_list_has_app_fuzzy    (GsAppList      *list,
+gboolean        gs_utils_list_has_component_fuzzy      (GsAppList      *list,
                                                 GsApp          *app);
 void            gs_utils_reboot_notify         (GsAppList      *list);
 
diff --git a/src/gs-css.c b/src/gs-css.c
index 923ac1a8..0f956431 100644
--- a/src/gs-css.c
+++ b/src/gs-css.c
@@ -16,7 +16,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
-#include <appstream-glib.h>
+#include <appstream.h>
 
 #include "gs-css.h"
 
@@ -64,7 +64,7 @@ gs_css_parse (GsCss *self, const gchar *markup, GError **error)
 
        /* old style, no IDs */
        markup_str = g_string_new (markup);
-       as_utils_string_replace (markup_str, "@datadir@", DATADIR);
+       as_gstring_replace (markup_str, "@datadir@", DATADIR);
        if (!g_str_has_prefix (markup_str->str, "#")) {
                g_hash_table_insert (self->ids,
                                     g_strdup ("tile"),
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 7d5a1171..98a1027d 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -206,7 +206,7 @@ gs_details_page_update_shortcut_button (GsDetailsPage *self)
        gtk_widget_set_visible (self->button_details_remove_shortcut,
                                FALSE);
 
-       if (gs_app_get_kind (self->app) != AS_APP_KIND_DESKTOP)
+       if (gs_app_get_kind (self->app) != AS_COMPONENT_KIND_DESKTOP)
                return;
 
        /* Leave the button hidden if the app can’t be launched by the current
@@ -216,9 +216,9 @@ gs_details_page_update_shortcut_button (GsDetailsPage *self)
 
        /* only consider the shortcut button if the app is installed */
        switch (gs_app_get_state (self->app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                break;
        default:
                return;
@@ -253,14 +253,14 @@ app_has_pending_action (GsApp *app)
 {
        /* sanitize the pending state change by verifying we're in one of the
         * expected states */
-       if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE &&
-           gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE &&
-           gs_app_get_state (app) != AS_APP_STATE_UPDATABLE &&
-           gs_app_get_state (app) != AS_APP_STATE_QUEUED_FOR_INSTALL)
+       if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE &&
+           gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE &&
+           gs_app_get_state (app) != GS_APP_STATE_UPDATABLE &&
+           gs_app_get_state (app) != GS_APP_STATE_QUEUED_FOR_INSTALL)
                return FALSE;
 
        return (gs_app_get_pending_action (app) != GS_PLUGIN_ACTION_UNKNOWN) ||
-              (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL);
+              (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL);
 }
 
 static void
@@ -321,12 +321,12 @@ static void
 gs_details_page_refresh_progress (GsDetailsPage *self)
 {
        guint percentage;
-       AsAppState state;
+       GsAppState state;
 
        /* cancel button */
        state = gs_app_get_state (self->app);
        switch (state) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->button_cancel, TRUE);
                /* If the app is installing, the user can only cancel it if
                 * 1) They haven't already, and
@@ -350,12 +350,12 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
 
        /* progress status label */
        switch (state) {
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                gtk_widget_set_visible (self->label_progress_status, TRUE);
                gtk_label_set_label (GTK_LABEL (self->label_progress_status),
                                     _("Removing…"));
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->label_progress_status, TRUE);
                gtk_label_set_label (GTK_LABEL (self->label_progress_status),
                                     _("Installing"));
@@ -389,7 +389,7 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
 
        /* percentage bar */
        switch (state) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                percentage = gs_app_get_progress (self->app);
                if (percentage == GS_APP_PROGRESS_UNKNOWN) {
                        /* Translators: This string is shown when preparing to download and install an app. */
@@ -426,7 +426,7 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
 
        /* spinner */
        switch (state) {
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                if (!gtk_widget_get_visible (self->spinner_remove)) {
                        gtk_spinner_start (GTK_SPINNER (self->spinner_remove));
                        gtk_widget_set_visible (self->spinner_remove, TRUE);
@@ -443,8 +443,8 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
 
        /* progress box */
        switch (state) {
-       case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_REMOVING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->box_progress, TRUE);
                break;
        default:
@@ -562,7 +562,7 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
        gtk_widget_show (self->box_details_screenshot);
 
        /* treat screenshots differently */
-       if (gs_app_get_kind (self->app) == AS_APP_KIND_FONT) {
+       if (gs_app_get_kind (self->app) == AS_COMPONENT_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);
@@ -599,15 +599,15 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
        /* fallback warning */
        screenshots = gs_app_get_screenshots (self->app);
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_GENERIC:
-       case AS_APP_KIND_CODEC:
-       case AS_APP_KIND_ADDON:
-       case AS_APP_KIND_SOURCE:
-       case AS_APP_KIND_FIRMWARE:
-       case AS_APP_KIND_DRIVER:
-       case AS_APP_KIND_INPUT_METHOD:
-       case AS_APP_KIND_LOCALIZATION:
-       case AS_APP_KIND_RUNTIME:
+       case AS_COMPONENT_KIND_GENERIC:
+       case AS_COMPONENT_KIND_CODEC:
+       case AS_COMPONENT_KIND_ADDON:
+       case AS_COMPONENT_KIND_REPOSITORY:
+       case AS_COMPONENT_KIND_FIRMWARE:
+       case AS_COMPONENT_KIND_DRIVER:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_LOCALIZATION:
+       case AS_COMPONENT_KIND_RUNTIME:
                gtk_widget_set_visible (self->box_details_screenshot_fallback, FALSE);
                break;
        default:
@@ -750,7 +750,7 @@ gs_details_page_set_description (GsDetailsPage *self, const gchar *tmp)
        }
 
        /* show the webapp warning */
-       if (gs_app_get_kind (self->app) == AS_APP_KIND_WEB_APP) {
+       if (gs_app_get_kind (self->app) == AS_COMPONENT_KIND_WEB_APP) {
                GtkWidget *label;
                /* TRANSLATORS: this is the warning box */
                label = gtk_label_new (_("This application can only be used when there is an active internet 
connection."));
@@ -900,9 +900,9 @@ gs_details_page_can_launch_app (GsDetailsPage *self)
                return FALSE;
 
        switch (gs_app_get_state (self->app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                break;
        default:
                return FALSE;
@@ -930,31 +930,31 @@ gs_details_page_can_launch_app (GsDetailsPage *self)
 static void
 gs_details_page_refresh_buttons (GsDetailsPage *self)
 {
-       AsAppState state;
+       GsAppState state;
 
        state = gs_app_get_state (self->app);
 
        /* install button */
        switch (state) {
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_visible (self->button_install, TRUE);
                /* TRANSLATORS: button text in the header when an application
                 * can be installed */
                gtk_button_set_label (GTK_BUTTON (self->button_install), _("_Install"));
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_set_visible (self->button_install, FALSE);
                break;
-       case AS_APP_STATE_UNKNOWN:
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_UNKNOWN:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_REMOVING:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_visible (self->button_install, FALSE);
                break;
-       case AS_APP_STATE_UPDATABLE_LIVE:
-               if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
+       case GS_APP_STATE_UPDATABLE_LIVE:
+               if (gs_app_get_kind (self->app) == AS_COMPONENT_KIND_FIRMWARE) {
                        gtk_widget_set_visible (self->button_install, TRUE);
                        /* TRANSLATORS: button text in the header when firmware
                         * can be live-installed */
@@ -963,7 +963,7 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
                        gtk_widget_set_visible (self->button_install, FALSE);
                }
                break;
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                if (gs_app_get_url (self->app, AS_URL_KIND_MISSING) != NULL) {
                        gtk_widget_set_visible (self->button_install, FALSE);
                } else {
@@ -977,14 +977,14 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
                break;
        default:
                g_warning ("App unexpectedly in state %s",
-                          as_app_state_to_string (state));
+                          gs_app_state_to_string (state));
                g_assert_not_reached ();
        }
 
        /* update button */
        switch (state) {
-       case AS_APP_STATE_UPDATABLE_LIVE:
-               if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
+       case GS_APP_STATE_UPDATABLE_LIVE:
+               if (gs_app_get_kind (self->app) == AS_COMPONENT_KIND_FIRMWARE) {
                        gtk_widget_set_visible (self->button_update, FALSE);
                } else {
                        gtk_widget_set_visible (self->button_update, TRUE);
@@ -1009,13 +1009,13 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
 
        /* remove button */
        if (gs_app_has_quirk (self->app, GS_APP_QUIRK_COMPULSORY) ||
-           gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
+           gs_app_get_kind (self->app) == AS_COMPONENT_KIND_FIRMWARE) {
                gtk_widget_set_visible (self->button_remove, FALSE);
        } else {
                switch (state) {
-               case AS_APP_STATE_INSTALLED:
-               case AS_APP_STATE_UPDATABLE:
-               case AS_APP_STATE_UPDATABLE_LIVE:
+               case GS_APP_STATE_INSTALLED:
+               case GS_APP_STATE_UPDATABLE:
+               case GS_APP_STATE_UPDATABLE_LIVE:
                        gtk_widget_set_visible (self->button_remove, TRUE);
                        gtk_widget_set_sensitive (self->button_remove, TRUE);
                        /* Mark the button as destructive only if Launch is not visible */
@@ -1026,18 +1026,18 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
                        /* TRANSLATORS: button text in the header when an application can be erased */
                        gtk_button_set_label (GTK_BUTTON (self->button_remove), _("_Remove"));
                        break;
-               case AS_APP_STATE_AVAILABLE_LOCAL:
-               case AS_APP_STATE_AVAILABLE:
-               case AS_APP_STATE_INSTALLING:
-               case AS_APP_STATE_REMOVING:
-               case AS_APP_STATE_UNAVAILABLE:
-               case AS_APP_STATE_UNKNOWN:
-               case AS_APP_STATE_QUEUED_FOR_INSTALL:
+               case GS_APP_STATE_AVAILABLE_LOCAL:
+               case GS_APP_STATE_AVAILABLE:
+               case GS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_REMOVING:
+               case GS_APP_STATE_UNAVAILABLE:
+               case GS_APP_STATE_UNKNOWN:
+               case GS_APP_STATE_QUEUED_FOR_INSTALL:
                        gtk_widget_set_visible (self->button_remove, FALSE);
                        break;
                default:
                        g_warning ("App unexpectedly in state %s",
-                                  as_app_state_to_string (state));
+                                  gs_app_state_to_string (state));
                        g_assert_not_reached ();
                }
        }
@@ -1364,7 +1364,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        /* hide the kudo details for non-desktop software */
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP:
                gtk_widget_set_visible (self->grid_details_kudo, TRUE);
                break;
        default:
@@ -1374,7 +1374,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        /* only show permissions for flatpak apps */
        if (gs_app_get_bundle_kind (self->app) == AS_BUNDLE_KIND_FLATPAK &&
-           gs_app_get_kind (self->app) == AS_APP_KIND_DESKTOP) {
+           gs_app_get_kind (self->app) == AS_COMPONENT_KIND_DESKTOP) {
                GsAppPermissions permissions = gs_app_get_permissions (self->app);
 
                populate_permission_details (self, permissions);
@@ -1402,24 +1402,24 @@ gs_details_page_refresh_all (GsDetailsPage *self)
        /* are we trying to replace something in the baseos */
        gtk_widget_set_visible (self->infobar_details_package_baseos,
                                gs_app_has_quirk (self->app, GS_APP_QUIRK_COMPULSORY) &&
-                               gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+                               gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
 
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP:
                /* installing an app with a repo file */
                gtk_widget_set_visible (self->infobar_details_app_repo,
                                        gs_app_has_quirk (self->app,
                                                          GS_APP_QUIRK_HAS_SOURCE) &&
-                                       gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+                                       gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
                gtk_widget_set_visible (self->infobar_details_repo, FALSE);
                break;
-       case AS_APP_KIND_GENERIC:
+       case AS_COMPONENT_KIND_GENERIC:
                /* installing a repo-release package */
                gtk_widget_set_visible (self->infobar_details_app_repo, FALSE);
                gtk_widget_set_visible (self->infobar_details_repo,
                                        gs_app_has_quirk (self->app,
                                                          GS_APP_QUIRK_HAS_SOURCE) &&
-                                       gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+                                       gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
                break;
        default:
                gtk_widget_set_visible (self->infobar_details_app_repo, FALSE);
@@ -1429,14 +1429,14 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        /* installing a app without a repo file */
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_DESKTOP:
-               if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
+       case AS_COMPONENT_KIND_DESKTOP:
+               if (gs_app_get_kind (self->app) == AS_COMPONENT_KIND_FIRMWARE) {
                        gtk_widget_set_visible (self->infobar_details_app_norepo, FALSE);
                } else {
                        gtk_widget_set_visible (self->infobar_details_app_norepo,
                                                !gs_app_has_quirk (self->app,
                                                          GS_APP_QUIRK_HAS_SOURCE) &&
-                                               gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+                                               gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
                }
                break;
        default:
@@ -1446,9 +1446,9 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        /* only show the "select addons" string if the app isn't yet installed */
        switch (gs_app_get_state (self->app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                gtk_widget_set_visible (self->label_addons_uninstalled_app, FALSE);
                break;
        default:
@@ -1458,7 +1458,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        /* hide fields that don't make sense for sources */
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_REPOSITORY:
                gtk_widget_set_visible (self->label_details_license_title, FALSE);
                gtk_widget_set_visible (self->box_details_license_value, FALSE);
                gtk_widget_set_visible (self->label_details_version_title, FALSE);
@@ -1521,8 +1521,8 @@ gs_details_page_refresh_addons (GsDetailsPage *self)
                GtkWidget *row;
 
                addon = gs_app_list_index (addons, i);
-               if (gs_app_get_state (addon) == AS_APP_STATE_UNKNOWN ||
-                   gs_app_get_state (addon) == AS_APP_STATE_UNAVAILABLE)
+               if (gs_app_get_state (addon) == GS_APP_STATE_UNKNOWN ||
+                   gs_app_get_state (addon) == GS_APP_STATE_UNAVAILABLE)
                        continue;
 
                row = gs_app_addon_row_new (addon);
@@ -1624,13 +1624,13 @@ gs_details_page_refresh_reviews (GsDetailsPage *self)
 
        /* show or hide the entire reviews section */
        switch (gs_app_get_kind (self->app)) {
-       case AS_APP_KIND_DESKTOP:
-       case AS_APP_KIND_FONT:
-       case AS_APP_KIND_INPUT_METHOD:
-       case AS_APP_KIND_WEB_APP:
-       case AS_APP_KIND_SHELL_EXTENSION:
+       case AS_COMPONENT_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_FONT:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_WEB_APP:
+       case AS_COMPONENT_KIND_SHELL_EXTENSION:
                /* don't show a missing rating on a local file */
-               if (gs_app_get_state (self->app) != AS_APP_STATE_AVAILABLE_LOCAL &&
+               if (gs_app_get_state (self->app) != GS_APP_STATE_AVAILABLE_LOCAL &&
                    self->enable_reviews)
                        show_reviews = TRUE;
                break;
@@ -1922,8 +1922,8 @@ gs_details_page_load_stage1_cb (GObject *source,
                           gs_app_get_id (self->app),
                           error->message);
        }
-       if (gs_app_get_kind (self->app) == AS_APP_KIND_UNKNOWN ||
-           gs_app_get_state (self->app) == AS_APP_STATE_UNKNOWN) {
+       if (gs_app_get_kind (self->app) == AS_COMPONENT_KIND_UNKNOWN ||
+           gs_app_get_state (self->app) == GS_APP_STATE_UNKNOWN) {
                g_autofree gchar *str = NULL;
                const gchar *id = gs_app_get_id (self->app);
                str = g_strdup_printf (_("Unable to find “%s”"), id == NULL ? gs_app_get_source_default 
(self->app) : id);
@@ -2209,7 +2209,7 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
 
        /* FIXME: We should be able to revert the QUEUED_FOR_INSTALL without
         * having to pretend to remove the app */
-       if (gs_app_get_state (self->app) == AS_APP_STATE_QUEUED_FOR_INSTALL)
+       if (gs_app_get_state (self->app) == GS_APP_STATE_QUEUED_FOR_INSTALL)
                gs_details_page_remove_app (self);
 }
 
@@ -2224,14 +2224,14 @@ gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
                if (gs_app_addon_row_get_selected (l->data)) {
                        GsApp *addon = gs_app_addon_row_get_addon (l->data);
 
-                       if (gs_app_get_state (addon) == AS_APP_STATE_AVAILABLE)
+                       if (gs_app_get_state (addon) == GS_APP_STATE_AVAILABLE)
                                gs_app_set_to_be_installed (addon, TRUE);
                }
        }
 
        g_set_object (&self->app_cancellable, gs_app_get_cancellable (self->app));
 
-       if (gs_app_get_state (self->app) == AS_APP_STATE_UPDATABLE_LIVE) {
+       if (gs_app_get_state (self->app) == GS_APP_STATE_UPDATABLE_LIVE) {
                gs_page_update_app (GS_PAGE (self), self->app, self->app_cancellable);
                return;
        }
@@ -2260,9 +2260,9 @@ gs_details_page_addon_selected_cb (GsAppAddonRow *row,
         * triggers an immediate install. Otherwise we'll install the addon
         * together with the main app. */
        switch (gs_app_get_state (self->app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                if (gs_app_addon_row_get_selected (row)) {
                        g_set_object (&self->app_cancellable, gs_app_get_cancellable (addon));
                        gs_page_install_app (GS_PAGE (self), addon, GS_SHELL_INTERACTION_FULL,
@@ -2401,12 +2401,7 @@ static guint
 content_rating_get_age (AsContentRating *content_rating, const gchar *id)
 {
        AsContentRatingValue value = as_content_rating_get_value (content_rating, id);
-#if AS_CHECK_VERSION (0, 7, 15)
        return as_content_rating_attribute_to_csm_age (id, value);
-#else
-       /* Hackily treat the value as an age; it should compare the same */
-       return (guint) value;
-#endif
 }
 
 static void
@@ -2624,7 +2619,7 @@ gs_details_page_license_free_cb (GtkWidget *widget, GsDetailsPage *self)
 
        /* URLify any SPDX IDs */
        gs_container_remove_all (GTK_CONTAINER (self->box_details_license_list));
-       tokens = as_utils_spdx_license_tokenize (gs_app_get_license (self->app));
+       tokens = as_spdx_license_tokenize (gs_app_get_license (self->app));
        for (i = 0; tokens[i] != NULL; i++) {
                GtkWidget *w = NULL;
 
@@ -2665,7 +2660,7 @@ gs_details_page_license_nonfree_cb (GtkWidget *widget, GsDetailsPage *self)
        g_auto(GStrv) tokens = NULL;
 
        /* license specified as a link */
-       tokens = as_utils_spdx_license_tokenize (gs_app_get_license (self->app));
+       tokens = as_spdx_license_tokenize (gs_app_get_license (self->app));
        for (guint i = 0; tokens[i] != NULL; i++) {
                if (g_str_has_prefix (tokens[i], "@LicenseRef-proprietary=")) {
                        uri = g_strdup (tokens[i] + 24);
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 13970335..21af40ce 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -281,16 +281,16 @@ app_row_button_clicked_cb (GsAppRow *app_row,
 {
        GsApp *app = gs_app_row_get_app (app_row);
 
-       if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE &&
+       if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE &&
            gs_app_get_url (app, AS_URL_KIND_MISSING) != NULL) {
                gs_shell_show_uri (self->shell,
                                   gs_app_get_url (app, AS_URL_KIND_MISSING));
-       } else if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE ||
-                  gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL ||
-                  gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+       } else if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE ||
+                  gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL ||
+                  gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
                gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
                                     self->search_cancellable);
-       } else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+       } else if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                gs_page_remove_app (GS_PAGE (self), app, self->search_cancellable);
        } else {
                g_critical ("extras: app in unexpected state %u", gs_app_get_state (app));
@@ -448,8 +448,8 @@ create_missing_app (SearchData *search_data)
        }
        gs_app_set_summary_missing (app, g_string_free (summary_missing, FALSE));
 
-       gs_app_set_kind (app, AS_APP_KIND_GENERIC);
-       gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+       gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
+       gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
        gs_app_set_url (app, AS_URL_KIND_MISSING, search_data->url_not_found);
 
        return app;
@@ -1109,7 +1109,7 @@ row_activated_cb (GtkListBox *list_box,
 
        app = gs_app_row_get_app (GS_APP_ROW (row));
 
-       if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE &&
+       if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE &&
            gs_app_get_url (app, AS_URL_KIND_MISSING) != NULL) {
                gs_shell_show_uri (self->shell,
                                   gs_app_get_url (app, AS_URL_KIND_MISSING));
@@ -1128,7 +1128,7 @@ get_app_sort_key (GsApp *app)
 
        /* sort missing applications as last */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                g_string_append (key, "9:");
                break;
        default:
diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c
index 9cc5f7ce..7eca36f5 100644
--- a/src/gs-feature-tile.c
+++ b/src/gs-feature-tile.c
@@ -79,16 +79,16 @@ gs_feature_tile_refresh (GsAppTile *self)
        accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
 
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_REMOVING:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                name = g_strdup_printf ("%s (%s)",
                                        gs_app_get_name (app),
                                        _("Installed"));
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_INSTALLING:
        default:
                name = g_strdup (gs_app_get_name (app));
                break;
diff --git a/src/gs-history-dialog.c b/src/gs-history-dialog.c
index 7863e61e..bdee1d9f 100644
--- a/src/gs-history-dialog.c
+++ b/src/gs-history-dialog.c
@@ -63,20 +63,20 @@ gs_history_dialog_set_app (GsHistoryDialog *dialog, GsApp *app)
 
                /* add the action */
                switch (gs_app_get_state (app)) {
-               case AS_APP_STATE_AVAILABLE:
-               case AS_APP_STATE_REMOVING:
+               case GS_APP_STATE_AVAILABLE:
+               case GS_APP_STATE_REMOVING:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was removed */
                        tmp = C_("app status", "Removed");
                        break;
-               case AS_APP_STATE_INSTALLED:
-               case AS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_INSTALLED:
+               case GS_APP_STATE_INSTALLING:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was installed */
                        tmp = C_("app status", "Installed");
                        break;
-               case AS_APP_STATE_UPDATABLE:
-               case AS_APP_STATE_UPDATABLE_LIVE:
+               case GS_APP_STATE_UPDATABLE:
+               case GS_APP_STATE_UPDATABLE_LIVE:
                        /* TRANSLATORS: this is the status in the history UI,
                         * where we are showing the application was updated */
                        tmp = C_("app status", "Updated");
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 3688be44..d9314127 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -111,13 +111,13 @@ gs_installed_page_invalidate_sort_idle (gpointer user_data)
 {
        GsAppRow *app_row = user_data;
        GsApp *app = gs_app_row_get_app (app_row);
-       AsAppState state = gs_app_get_state (app);
+       GsAppState state = gs_app_get_state (app);
 
        gtk_list_box_row_changed (GTK_LIST_BOX_ROW (app_row));
 
        /* if the app has been uninstalled (which can happen from another view)
         * we should removed it from the installed view */
-       if (state == AS_APP_STATE_AVAILABLE || state == AS_APP_STATE_UNKNOWN)
+       if (state == GS_APP_STATE_AVAILABLE || state == GS_APP_STATE_UNKNOWN)
                gs_installed_page_unreveal_row (app_row);
 
        g_object_unref (app_row);
@@ -159,7 +159,7 @@ gs_installed_page_add_app (GsInstalledPage *self, GsAppList *list, GsApp *app)
        app_row = g_object_new (GS_TYPE_APP_ROW,
                                "app", app,
                                "show-buttons", TRUE,
-                               "show-source", gs_utils_list_has_app_fuzzy (list, app),
+                               "show-source", gs_utils_list_has_component_fuzzy (list, app),
                                "show-installed-size", !gs_app_has_quirk (app, GS_APP_QUIRK_COMPULSORY) && 
should_show_installed_size (self),
                                NULL);
 
@@ -320,13 +320,13 @@ gs_installed_page_get_app_sort_key (GsApp *app)
 
        /* sort installed, removing, other */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                g_string_append (key, "1:");
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                g_string_append (key, "2:");
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                g_string_append (key, "3:");
                break;
        default:
@@ -336,31 +336,31 @@ gs_installed_page_get_app_sort_key (GsApp *app)
 
        /* sort apps by kind */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_OS_UPDATE:
+       case AS_COMPONENT_KIND_OS_UPDATE:
                g_string_append (key, "1:");
                break;
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP:
                g_string_append (key, "2:");
                break;
-       case AS_APP_KIND_WEB_APP:
+       case AS_COMPONENT_KIND_WEB_APP:
                g_string_append (key, "3:");
                break;
-       case AS_APP_KIND_RUNTIME:
+       case AS_COMPONENT_KIND_RUNTIME:
                g_string_append (key, "4:");
                break;
-       case AS_APP_KIND_ADDON:
+       case AS_COMPONENT_KIND_ADDON:
                g_string_append (key, "5:");
                break;
-       case AS_APP_KIND_CODEC:
+       case AS_COMPONENT_KIND_CODEC:
                g_string_append (key, "6:");
                break;
-       case AS_APP_KIND_FONT:
+       case AS_COMPONENT_KIND_FONT:
                g_string_append (key, "6:");
                break;
-       case AS_APP_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
                g_string_append (key, "7:");
                break;
-       case AS_APP_KIND_SHELL_EXTENSION:
+       case AS_COMPONENT_KIND_SHELL_EXTENSION:
                g_string_append (key, "8:");
                break;
        default:
@@ -417,8 +417,8 @@ typedef enum {
 static GsInstalledPageSection
 gs_installed_page_get_app_section (GsApp *app)
 {
-       if (gs_app_get_kind (app) == AS_APP_KIND_DESKTOP ||
-           gs_app_get_kind (app) == AS_APP_KIND_WEB_APP) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_DESKTOP ||
+           gs_app_get_kind (app) == AS_COMPONENT_KIND_WEB_APP) {
                if (gs_app_has_quirk (app, GS_APP_QUIRK_COMPULSORY))
                        return GS_UPDATE_LIST_SECTION_SYSTEM_APPS;
                return GS_UPDATE_LIST_SECTION_REMOVABLE_APPS;
@@ -515,7 +515,7 @@ gs_installed_page_pending_apps_changed_cb (GsPluginLoader *plugin_loader,
 
                /* never show OS upgrades, we handle the scheduling and
                 * cancellation in GsUpgradeBanner */
-               if (gs_app_get_kind (app) == AS_APP_KIND_OS_UPGRADE)
+               if (gs_app_get_kind (app) == AS_COMPONENT_KIND_OPERATING_SYSTEM)
                        continue;
 
                /* do not to add pending apps more than once. */
diff --git a/src/gs-origin-popover-row.c b/src/gs-origin-popover-row.c
index 43e11938..325668ca 100644
--- a/src/gs-origin-popover-row.c
+++ b/src/gs-origin-popover-row.c
@@ -52,7 +52,7 @@ refresh_ui (GsOriginPopoverRow *row)
                gtk_label_set_text (GTK_LABEL (priv->name_label), origin_ui);
        }
 
-       if (gs_app_get_state (priv->app) == AS_APP_STATE_AVAILABLE_LOCAL) {
+       if (gs_app_get_state (priv->app) == GS_APP_STATE_AVAILABLE_LOCAL) {
                GFile *local_file = gs_app_get_local_file (priv->app);
                url = g_file_get_basename (local_file);
                /* TRANSLATORS: This is followed by a file name, e.g. "Name: gedit.rpm" */
@@ -77,12 +77,12 @@ refresh_ui (GsOriginPopoverRow *row)
        }
 
        if (gs_app_get_bundle_kind (priv->app) == AS_BUNDLE_KIND_FLATPAK &&
-           gs_app_get_scope (priv->app) != AS_APP_SCOPE_UNKNOWN) {
-               AsAppScope scope = gs_app_get_scope (priv->app);
-               if (scope == AS_APP_SCOPE_SYSTEM) {
+           gs_app_get_scope (priv->app) != AS_COMPONENT_SCOPE_UNKNOWN) {
+               AsComponentScope scope = gs_app_get_scope (priv->app);
+               if (scope == AS_COMPONENT_SCOPE_SYSTEM) {
                        /* TRANSLATORS: the installation location for flatpaks */
                        gtk_label_set_text (GTK_LABEL (priv->installation_label), _("system"));
-               } else if (scope == AS_APP_SCOPE_USER) {
+               } else if (scope == AS_COMPONENT_SCOPE_USER) {
                        /* TRANSLATORS: the installation location for flatpaks */
                        gtk_label_set_text (GTK_LABEL (priv->installation_label), _("user"));
                }
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 36b66104..b9dee947 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -623,7 +623,7 @@ refresh_third_party_repo (GsOverviewPage *self)
        /* only show if never prompted and third party repo is available */
        if (g_settings_get_boolean (priv->settings, "show-nonfree-prompt") &&
            priv->third_party_repo != NULL &&
-           gs_app_get_state (priv->third_party_repo) == AS_APP_STATE_AVAILABLE) {
+           gs_app_get_state (priv->third_party_repo) == GS_APP_STATE_AVAILABLE) {
                gtk_widget_set_visible (priv->infobar_third_party, TRUE);
        } else {
                gtk_widget_set_visible (priv->infobar_third_party, FALSE);
@@ -889,7 +889,7 @@ third_party_response_cb (GtkInfoBar *info_bar,
        if (response_id != GTK_RESPONSE_YES)
                return;
 
-       if (gs_app_get_state (priv->third_party_repo) == AS_APP_STATE_AVAILABLE) {
+       if (gs_app_get_state (priv->third_party_repo) == GS_APP_STATE_AVAILABLE) {
                gs_page_install_app (GS_PAGE (self), priv->third_party_repo,
                                     GS_SHELL_INTERACTION_FULL,
                                     priv->cancellable);
diff --git a/src/gs-page.c b/src/gs-page.c
index e299354d..8585e8fe 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -152,7 +152,7 @@ gs_page_app_installed_cb (GObject *source,
        }
 
        /* tell the user what they have to do */
-       if (gs_app_get_kind (helper->app) == AS_APP_KIND_FIRMWARE &&
+       if (gs_app_get_kind (helper->app) == AS_COMPONENT_KIND_FIRMWARE &&
            gs_app_has_quirk (helper->app, GS_APP_QUIRK_NEEDS_USER_ACTION)) {
                AsScreenshot *ss = gs_app_get_action_screenshot (helper->app);
                if (ss != NULL && as_screenshot_get_caption (ss, NULL) != NULL)
@@ -246,7 +246,7 @@ gs_page_install_app (GsPage *page,
        g_autoptr(GsPluginJob) plugin_job = NULL;
 
        /* probably non-free */
-       if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
                GtkResponseType response;
 
                response = gs_app_notify_unavailable (app, gs_shell_get_window (priv->shell));
@@ -378,7 +378,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
        helper->cancellable = g_object_ref (cancellable);
 
        /* tell the user what they have to do */
-       if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE &&
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE &&
            gs_app_has_quirk (app, GS_APP_QUIRK_NEEDS_USER_ACTION)) {
                AsScreenshot *ss = gs_app_get_action_screenshot (app);
                if (ss != NULL && as_screenshot_get_caption (ss, NULL) != NULL) {
@@ -443,7 +443,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
        helper->app = g_object_ref (app);
        helper->page = g_object_ref (page);
        helper->cancellable = g_object_ref (cancellable);
-       if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+       if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
                g_autoptr(GsPluginJob) plugin_job = NULL;
                plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
                                                 "interactive", TRUE,
@@ -459,7 +459,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
 
        /* use different name and summary */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_SOURCE:
+       case AS_COMPONENT_KIND_REPOSITORY:
                /* TRANSLATORS: this is a prompt message, and '%s' is an
                 * repository name, e.g. 'GNOME Nightly' */
                title = g_strdup_printf (_("Are you sure you want to remove "
diff --git a/src/gs-popular-tile.c b/src/gs-popular-tile.c
index 0a7cb986..4ed0f9d4 100644
--- a/src/gs-popular-tile.c
+++ b/src/gs-popular-tile.c
@@ -55,17 +55,17 @@ gs_popular_tile_refresh (GsAppTile *self)
        accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
 
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_REMOVING:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_REMOVING:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                installed = TRUE;
                /* TRANSLATORS: this refers to an app (by name) that is installed */
                name = g_strdup_printf (_("%s (Installed)"),
                                        gs_app_get_name (app));
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_INSTALLING:
        default:
                installed = FALSE;
                name = g_strdup (gs_app_get_name (app));
diff --git a/src/gs-removal-dialog.c b/src/gs-removal-dialog.c
index 61b5cbd6..0d946c71 100644
--- a/src/gs-removal-dialog.c
+++ b/src/gs-removal-dialog.c
@@ -126,7 +126,7 @@ gs_removal_dialog_show_upgrade_removals (GsRemovalDialog *self,
                GsApp *app = gs_app_list_index (removals, i);
                g_autofree gchar *tmp = NULL;
 
-               if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+               if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
                        continue;
                tmp = gs_app_to_string (app);
                g_debug ("removal %u: %s", i, tmp);
diff --git a/src/gs-repo-row.c b/src/gs-repo-row.c
index 72f0416a..9dda6c7b 100644
--- a/src/gs-repo-row.c
+++ b/src/gs-repo-row.c
@@ -89,15 +89,15 @@ refresh_ui (GsRepoRow *row)
 
        /* set button text */
        switch (gs_app_get_state (priv->repo)) {
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                /* TRANSLATORS: this is a button in the software repositories
                   dialog for enabling a repo */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("_Enable"));
                /* enable button */
                gtk_widget_set_sensitive (priv->button, TRUE);
                break;
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_INSTALLED:
                if (repo_supports_removal (priv->repo)) {
                        /* TRANSLATORS: this is a button in the software repositories dialog
                           for removing a repo. The ellipsis indicates that further
@@ -112,14 +112,14 @@ refresh_ui (GsRepoRow *row)
                /* enable button */
                gtk_widget_set_sensitive (priv->button, TRUE);
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                /* TRANSLATORS: this is a button in the software repositories dialog
                   that shows the status of a repo being enabled */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Enabling"));
                /* disable button */
                gtk_widget_set_sensitive (priv->button, FALSE);
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                if (repo_supports_removal (priv->repo)) {
                        /* TRANSLATORS: this is a button in the software repositories dialog
                           that shows the status of a repo being removed */
@@ -138,13 +138,13 @@ refresh_ui (GsRepoRow *row)
 
        /* set enabled/disabled label */
        switch (gs_app_get_state (priv->repo)) {
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_INSTALLED:
                /* TRANSLATORS: this is a label in the software repositories
                   dialog that indicates that a repo is enabled. */
                gtk_label_set_text (GTK_LABEL (priv->status_label), _("Enabled"));
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                /* TRANSLATORS: this is a label in the software repositories
                   dialog that indicates that a repo is disabled. */
                gtk_label_set_text (GTK_LABEL (priv->status_label), _("Disabled"));
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index f1c766be..71435575 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -74,14 +74,14 @@ get_repo_installed_text (GsApp *repo)
        for (guint i = 0; i < gs_app_list_length (related); i++) {
                GsApp *app_tmp = gs_app_list_index (related, i);
                switch (gs_app_get_kind (app_tmp)) {
-               case AS_APP_KIND_WEB_APP:
-               case AS_APP_KIND_DESKTOP:
+               case AS_COMPONENT_KIND_WEB_APP:
+               case AS_COMPONENT_KIND_DESKTOP:
                        cnt_apps++;
                        break;
-               case AS_APP_KIND_FONT:
-               case AS_APP_KIND_CODEC:
-               case AS_APP_KIND_INPUT_METHOD:
-               case AS_APP_KIND_ADDON:
+               case AS_COMPONENT_KIND_FONT:
+               case AS_COMPONENT_KIND_CODEC:
+               case AS_COMPONENT_KIND_INPUT_METHOD:
+               case AS_COMPONENT_KIND_ADDON:
                        cnt_addon++;
                        break;
                default:
@@ -350,17 +350,17 @@ repo_button_clicked_cb (GsRepoRow *row,
        repo = gs_repo_row_get_repo (row);
 
        switch (gs_app_get_state (repo)) {
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                enable_repo (dialog, repo);
                break;
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_INSTALLED:
                remove_confirm_repo (dialog, repo);
                break;
        default:
                g_warning ("repo %s button clicked in unexpected state %s",
                           gs_app_get_id (repo),
-                          as_app_state_to_string (gs_app_get_state (repo)));
+                          gs_app_state_to_string (gs_app_get_state (repo)));
                break;
        }
 }
@@ -388,17 +388,17 @@ add_repo (GsReposDialog *dialog, GsApp *repo)
 {
        GtkWidget *row;
        g_autofree gchar *text = NULL;
-       AsAppState state;
+       GsAppState state;
 
        state = gs_app_get_state (repo);
-       if (!(state == AS_APP_STATE_AVAILABLE ||
-             state == AS_APP_STATE_AVAILABLE_LOCAL ||
-             state == AS_APP_STATE_INSTALLED ||
-             state == AS_APP_STATE_INSTALLING ||
-             state == AS_APP_STATE_REMOVING)) {
+       if (!(state == GS_APP_STATE_AVAILABLE ||
+             state == GS_APP_STATE_AVAILABLE_LOCAL ||
+             state == GS_APP_STATE_INSTALLED ||
+             state == GS_APP_STATE_INSTALLING ||
+             state == GS_APP_STATE_REMOVING)) {
                g_warning ("repo %s in invalid state %s",
                           gs_app_get_id (repo),
-                          as_app_state_to_string (state));
+                          gs_app_state_to_string (state));
                return;
        }
 
@@ -474,20 +474,20 @@ third_party_repo_button_clicked_cb (GsThirdPartyRepoRow *row,
        app = gs_third_party_repo_row_get_app (row);
 
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_UNAVAILABLE:
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                install_third_party_repo (dialog, TRUE);
                break;
-       case AS_APP_STATE_UPDATABLE_LIVE:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_INSTALLED:
                install_third_party_repo (dialog, FALSE);
                break;
        default:
                g_warning ("third party repo %s button clicked in unexpected state %s",
                           gs_app_get_id (app),
-                          as_app_state_to_string (gs_app_get_state (app)));
+                          gs_app_state_to_string (gs_app_get_state (app)));
                break;
        }
 
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 8b7b6c19..41f2dde6 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -51,12 +51,12 @@ gs_search_page_app_row_clicked_cb (GsAppRow *app_row,
 {
        GsApp *app;
        app = gs_app_row_get_app (app_row);
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
+       if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE)
                gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
                                     self->cancellable);
-       else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
+       else if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED)
                gs_page_remove_app (GS_PAGE (self), app, self->cancellable);
-       else if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+       else if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
                if (gs_app_get_url (app, AS_URL_KIND_MISSING) == NULL) {
                        gs_page_install_app (GS_PAGE (self), app,
                                             GS_SHELL_INTERACTION_FULL,
@@ -160,7 +160,7 @@ gs_search_page_get_search_cb (GObject *source_object,
 
        if (self->appid_to_show != NULL) {
                g_autoptr (GsApp) a = NULL;
-               if (as_utils_unique_id_valid (self->appid_to_show)) {
+               if (as_utils_data_id_valid (self->appid_to_show)) {
                        a = gs_plugin_loader_app_create (self->plugin_loader,
                                                         self->appid_to_show);
                } else {
@@ -190,8 +190,8 @@ gs_search_page_get_app_sort_key (GsApp *app)
 
        /* sort apps before runtimes and extensions */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_DESKTOP:
-       case AS_APP_KIND_SHELL_EXTENSION:
+       case AS_COMPONENT_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_SHELL_EXTENSION:
                g_string_append (key, "9:");
                break;
        default:
@@ -201,7 +201,7 @@ gs_search_page_get_app_sort_key (GsApp *app)
 
        /* sort missing codecs before applications */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                g_string_append (key, "9:");
                break;
        default:
diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
index 715f70f3..5922395d 100644
--- a/src/gs-shell-search-provider.c
+++ b/src/gs-shell-search-provider.c
@@ -87,7 +87,7 @@ search_done_cb (GObject *source,
        g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
        for (i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
-               if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE)
+               if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE)
                        continue;
                g_variant_builder_add (&builder, "s", gs_app_get_unique_id (app));
 
@@ -107,7 +107,7 @@ gs_shell_search_provider_get_app_sort_key (GsApp *app)
 
        /* sort available apps before installed ones */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                g_string_append (key, "9:");
                break;
        default:
@@ -117,7 +117,7 @@ gs_shell_search_provider_get_app_sort_key (GsApp *app)
 
        /* sort apps before runtimes and extensions */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP:
                g_string_append (key, "9:");
                break;
        default:
@@ -252,7 +252,7 @@ handle_get_result_metas (GsShellSearchProvider2     *skeleton,
                if (pixbuf != NULL)
                        g_variant_builder_add (&meta, "{sv}", "icon", g_icon_serialize (G_ICON (pixbuf)));
 
-               if (gs_utils_list_has_app_fuzzy (self->search_results, app) &&
+               if (gs_utils_list_has_component_fuzzy (self->search_results, app) &&
                    gs_app_get_origin_hostname (app) != NULL) {
                        /* TRANSLATORS: this refers to where the app came from */
                        g_autofree gchar *source_text = g_strdup_printf (_("Source: %s"),
@@ -361,8 +361,8 @@ search_provider_dispose (GObject *obj)
 static void
 gs_shell_search_provider_init (GsShellSearchProvider *self)
 {
-       self->metas_cache = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
-                                                  (GEqualFunc) as_utils_unique_id_equal,
+       self->metas_cache = g_hash_table_new_full ((GHashFunc) as_utils_data_id_hash,
+                                                  (GEqualFunc) as_utils_data_id_equal,
                                                   g_free,
                                                   (GDestroyNotify) g_variant_unref);
 
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index c2ed8f93..69b46557 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -80,25 +80,25 @@ gs_summary_tile_refresh (GsAppTile *self)
        accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
 
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                installed = TRUE;
                name = g_strdup_printf (_("%s (Installed)"),
                                        gs_app_get_name (app));
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                installed = FALSE;
                name = g_strdup_printf (_("%s (Installing)"),
                                        gs_app_get_name (app));
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                installed = TRUE;
                name = g_strdup_printf (_("%s (Removing)"),
                                        gs_app_get_name (app));
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_AVAILABLE:
        default:
                installed = FALSE;
                name = g_strdup (gs_app_get_name (app));
diff --git a/src/gs-third-party-repo-row.c b/src/gs-third-party-repo-row.c
index e1da3fc6..c39487bc 100644
--- a/src/gs-third-party-repo-row.c
+++ b/src/gs-third-party-repo-row.c
@@ -57,7 +57,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
 
        /* do a fill bar for the current progress */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                gs_progress_button_set_progress (GS_PROGRESS_BUTTON (priv->button),
                                                 gs_app_get_progress (priv->app));
                gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (priv->button), TRUE);
@@ -69,7 +69,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
 
        /* set button text */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                /* TRANSLATORS: this is a button in the software repositories
                   dialog for installing a repo.
                   The ellipsis indicates that further steps are required */
@@ -77,31 +77,31 @@ refresh_ui (GsThirdPartyRepoRow *row)
                /* enable button */
                gtk_widget_set_sensitive (priv->button, TRUE);
                break;
-       case AS_APP_STATE_AVAILABLE:
-       case AS_APP_STATE_AVAILABLE_LOCAL:
+       case GS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE_LOCAL:
                /* TRANSLATORS: this is a button in the software repositories
                   dialog for installing a repo */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("_Install"));
                /* enable button */
                gtk_widget_set_sensitive (priv->button, TRUE);
                break;
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                /* TRANSLATORS: this is a button in the software repositories
                   dialog for removing multiple repos */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("_Remove All"));
                /* enable button */
                gtk_widget_set_sensitive (priv->button, TRUE);
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                /* TRANSLATORS: this is a button in the software repositories dialog
                   that shows the status of a repo being installed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
                /* disable button */
                gtk_widget_set_sensitive (priv->button, FALSE);
                break;
-       case AS_APP_STATE_REMOVING:
+       case GS_APP_STATE_REMOVING:
                /* TRANSLATORS: this is a button in the software repositories dialog
                   that shows the status of a repo being removed */
                gtk_button_set_label (GTK_BUTTON (priv->button), _("Removing"));
@@ -113,7 +113,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
        }
 
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_visible (priv->button, FALSE);
                break;
        default:
@@ -123,9 +123,9 @@ refresh_ui (GsThirdPartyRepoRow *row)
 
        context = gtk_widget_get_style_context (priv->button);
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_INSTALLED:
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_INSTALLED:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                gtk_style_context_add_class (context, "destructive-action");
                break;
        default:
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index c64eaa58..c50116e7 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -156,13 +156,13 @@ populate_permissions_section (GsUpdateDialog *dialog, GsAppPermissions permissio
 static void
 set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
 {
-       AsAppKind kind;
+       AsComponentKind kind;
        const GdkPixbuf *pixbuf;
        const gchar *update_details;
 
        /* set window title */
        kind = gs_app_get_kind (app);
-       if (kind == AS_APP_KIND_OS_UPDATE) {
+       if (kind == AS_COMPONENT_KIND_OS_UPDATE) {
                gtk_window_set_title (GTK_WINDOW (dialog), gs_app_get_name (app));
        } else if (gs_app_get_source_default (app) != NULL &&
                   gs_app_get_update_version (app) != NULL) {
@@ -180,7 +180,7 @@ set_updates_description_ui (GsUpdateDialog *dialog, GsApp *app)
        }
 
        /* set update header */
-       gtk_widget_set_visible (dialog->box_header, kind == AS_APP_KIND_DESKTOP);
+       gtk_widget_set_visible (dialog->box_header, kind == AS_COMPONENT_KIND_DESKTOP);
        update_details = gs_app_get_update_details (app);
        if (update_details == NULL) {
                /* TRANSLATORS: this is where the packager did not write
@@ -409,8 +409,8 @@ create_app_row (GsApp *app)
        gtk_widget_set_hexpand (label, TRUE);
        gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
        gtk_container_add (GTK_CONTAINER (row), label);
-       if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE ||
-           gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
+       if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE ||
+           gs_app_get_state (app) == GS_APP_STATE_UPDATABLE_LIVE) {
                g_autofree gchar *verstr = format_version_update (app, gtk_widget_get_direction (row));
                label = gtk_label_new (verstr);
        } else {
@@ -457,22 +457,14 @@ is_downgrade (const gchar *evr1,
         * part of the semantic version */
 
        /* check version */
-#if AS_CHECK_VERSION(0,7,15)
        rc = as_utils_vercmp_full (version1, version2,
                                   AS_VERSION_COMPARE_FLAG_NONE);
-#else
-       rc = as_utils_vercmp (version1, version2);
-#endif
        if (rc != 0)
                return rc > 0;
 
        /* check release */
-#if AS_CHECK_VERSION(0,7,15)
        rc = as_utils_vercmp_full (release1, release2,
                                   AS_VERSION_COMPARE_FLAG_NONE);
-#else
-       rc = as_utils_vercmp (release1, release2);
-#endif
        if (rc != 0)
                return rc > 0;
 
@@ -490,14 +482,14 @@ get_app_section (GsApp *app)
         * 3. updates
         * 4. downgrades */
        switch (gs_app_get_state (app)) {
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                section = GS_UPDATE_DIALOG_SECTION_ADDITIONS;
                break;
-       case AS_APP_STATE_UNAVAILABLE:
+       case GS_APP_STATE_UNAVAILABLE:
                section = GS_UPDATE_DIALOG_SECTION_REMOVALS;
                break;
-       case AS_APP_STATE_UPDATABLE:
-       case AS_APP_STATE_UPDATABLE_LIVE:
+       case GS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE_LIVE:
                if (is_downgrade (gs_app_get_version (app),
                                  gs_app_get_update_version (app)))
                        section = GS_UPDATE_DIALOG_SECTION_DOWNGRADES;
@@ -506,7 +498,7 @@ get_app_section (GsApp *app)
                break;
        default:
                g_warning ("get_app_section: unhandled state %s for %s",
-                          as_app_state_to_string (gs_app_get_state (app)),
+                          gs_app_state_to_string (gs_app_get_state (app)),
                           gs_app_get_unique_id (app));
                section = GS_UPDATE_DIALOG_SECTION_UPDATES;
                break;
@@ -630,7 +622,7 @@ create_section (GsUpdateDialog *dialog, GsUpdateDialogSection section)
 void
 gs_update_dialog_show_update_details (GsUpdateDialog *dialog, GsApp *app)
 {
-       AsAppKind kind;
+       AsComponentKind kind;
        g_autofree gchar *str = NULL;
 
        /* debug */
@@ -646,7 +638,7 @@ gs_update_dialog_show_update_details (GsUpdateDialog *dialog, GsApp *app)
 
        /* set update description */
        kind = gs_app_get_kind (app);
-       if (kind == AS_APP_KIND_OS_UPDATE) {
+       if (kind == AS_COMPONENT_KIND_OS_UPDATE) {
                GsAppList *related;
                GsApp *app_related;
                GsUpdateDialogSection section;
diff --git a/src/gs-update-list.c b/src/gs-update-list.c
index 5122329a..85cabe8f 100644
--- a/src/gs-update-list.c
+++ b/src/gs-update-list.c
@@ -28,7 +28,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GsUpdateList, gs_update_list, GTK_TYPE_LIST_BOX)
 static void
 gs_update_list_app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
 {
-       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                GsAppRow *app_row = GS_APP_ROW (user_data);
                gs_app_row_unreveal (app_row);
        }
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 7a4b3c92..319b6dd2 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -192,7 +192,7 @@ should_download_updates (GsUpdateMonitor *monitor)
 static gboolean
 _filter_by_app_kind (GsApp *app, gpointer user_data)
 {
-       AsAppKind kind = GPOINTER_TO_UINT (user_data);
+       AsComponentKind kind = GPOINTER_TO_UINT (user_data);
        return gs_app_get_kind (app) == kind;
 }
 
@@ -219,7 +219,7 @@ _build_autoupdated_notification (GsUpdateMonitor *monitor, GsAppList *list)
        list_apps = gs_app_list_copy (list);
        gs_app_list_filter (list_apps,
                            _filter_by_app_kind,
-                           GUINT_TO_POINTER(AS_APP_KIND_DESKTOP));
+                           GUINT_TO_POINTER(AS_COMPONENT_KIND_DESKTOP));
        gs_app_list_sort (list_apps, _sort_by_rating_cb, NULL);
        /* FIXME: add the applications that are currently active that use one
         * of the updated runtimes */
@@ -337,7 +337,7 @@ update_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
 static gboolean
 _should_auto_update (GsApp *app)
 {
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE)
                return FALSE;
        if (gs_app_has_quirk (app, GS_APP_QUIRK_NEW_PERMISSIONS))
                return FALSE;
@@ -522,7 +522,7 @@ get_system_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
 
        /* is not EOL */
        app = gs_plugin_loader_get_system_app (plugin_loader);
-       if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
                return;
 
        /* TRANSLATORS: this is when the current OS version goes end-of-life */
@@ -1005,7 +1005,7 @@ get_updates_historical_cb (GObject *object, GAsyncResult *res, gpointer data)
        if (time_last_notified >= gs_app_get_install_date (app))
                return;
 
-       if (gs_app_get_kind (app) == AS_APP_KIND_OS_UPGRADE) {
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_OPERATING_SYSTEM) {
                /* TRANSLATORS: Notification title when we've done a distro upgrade */
                notification = g_notification_new (_("System Upgrade Complete"));
 
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 96529296..37919fc5 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -140,12 +140,12 @@ gs_updates_page_invalidate (GsUpdatesPage *self)
 static GsUpdatesSectionKind
 _get_app_section (GsApp *app)
 {
-       if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
-               if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
+       if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE_LIVE) {
+               if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE)
                        return GS_UPDATES_SECTION_KIND_ONLINE_FIRMWARE;
                return GS_UPDATES_SECTION_KIND_ONLINE;
        }
-       if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
+       if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE)
                return GS_UPDATES_SECTION_KIND_OFFLINE_FIRMWARE;
        return GS_UPDATES_SECTION_KIND_OFFLINE;
 }
@@ -170,7 +170,7 @@ _get_num_updates (GsUpdatesPage *self)
        for (guint i = 0; i < gs_app_list_length (apps); ++i) {
                GsApp *app = gs_app_list_index (apps, i);
                if (gs_app_is_updatable (app) ||
-                   gs_app_get_state (app) == AS_APP_STATE_INSTALLING)
+                   gs_app_get_state (app) == GS_APP_STATE_INSTALLING)
                        ++count;
        }
        return count;
@@ -606,7 +606,7 @@ gs_updates_page_get_system_finished_cb (GObject *source_object,
                gtk_widget_set_visible (self->box_end_of_life, FALSE);
                return;
        }
-       if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE) {
+       if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE) {
                gtk_widget_set_visible (self->box_end_of_life, FALSE);
                return;
        }
@@ -1140,7 +1140,7 @@ gs_updates_page_upgrade_install_cb (GsUpgradeBanner *upgrade_banner,
        removals = gs_app_get_related (upgrade);
        for (i = 0; i < gs_app_list_length (removals); i++) {
                GsApp *app = gs_app_list_index (removals, i);
-               if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+               if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
                        continue;
                cnt++;
        }
@@ -1185,9 +1185,9 @@ gs_updates_page_invalidate_downloaded_upgrade (GsUpdatesPage *self)
        app = gs_upgrade_banner_get_app (GS_UPGRADE_BANNER (self->upgrade_banner));
        if (app == NULL)
                return;
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
                return;
-       gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+       gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        g_debug ("resetting %s to AVAILABLE as the updates have changed",
                 gs_app_get_id (app));
 }
@@ -1199,8 +1199,8 @@ gs_shell_update_are_updates_in_progress (GsUpdatesPage *self)
        for (guint i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
                switch (gs_app_get_state (app)) {
-               case AS_APP_STATE_INSTALLING:
-               case AS_APP_STATE_REMOVING:
+               case GS_APP_STATE_INSTALLING:
+               case GS_APP_STATE_REMOVING:
                        return TRUE;
                        break;
                default:
@@ -1238,7 +1238,7 @@ gs_updates_page_status_changed_cb (GsPluginLoader *plugin_loader,
        case GS_PLUGIN_STATUS_INSTALLING:
        case GS_PLUGIN_STATUS_REMOVING:
                if (app == NULL ||
-                   (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE &&
+                   (gs_app_get_kind (app) != AS_COMPONENT_KIND_OPERATING_SYSTEM &&
                     gs_app_get_id (app) != NULL)) {
                        /* if we do a install or remove then make sure all new
                         * packages are downloaded */
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index 16cfe436..668e88cc 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -53,7 +53,7 @@ static void
 _app_row_button_clicked_cb (GsAppRow *app_row, GsUpdatesSection *self)
 {
        GsApp *app = gs_app_row_get_app (app_row);
-       if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE)
+       if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE)
                return;
        gs_page_update_app (GS_PAGE (self->page), app, gs_app_get_cancellable (app));
 }
@@ -80,7 +80,7 @@ _unreveal_row (GsAppRow *app_row)
 static void
 _app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
 {
-       if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+       if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
                GsAppRow *app_row = GS_APP_ROW (user_data);
                _unreveal_row (app_row);
        }
@@ -142,31 +142,31 @@ _get_app_sort_key (GsApp *app)
 
        /* sort apps by kind */
        switch (gs_app_get_kind (app)) {
-       case AS_APP_KIND_OS_UPDATE:
+       case AS_COMPONENT_KIND_OS_UPDATE:
                g_string_append (key, "1:");
                break;
-       case AS_APP_KIND_DESKTOP:
+       case AS_COMPONENT_KIND_DESKTOP:
                g_string_append (key, "2:");
                break;
-       case AS_APP_KIND_WEB_APP:
+       case AS_COMPONENT_KIND_WEB_APP:
                g_string_append (key, "3:");
                break;
-       case AS_APP_KIND_RUNTIME:
+       case AS_COMPONENT_KIND_RUNTIME:
                g_string_append (key, "4:");
                break;
-       case AS_APP_KIND_ADDON:
+       case AS_COMPONENT_KIND_ADDON:
                g_string_append (key, "5:");
                break;
-       case AS_APP_KIND_CODEC:
+       case AS_COMPONENT_KIND_CODEC:
                g_string_append (key, "6:");
                break;
-       case AS_APP_KIND_FONT:
+       case AS_COMPONENT_KIND_FONT:
                g_string_append (key, "6:");
                break;
-       case AS_APP_KIND_INPUT_METHOD:
+       case AS_COMPONENT_KIND_INPUT_METHOD:
                g_string_append (key, "7:");
                break;
-       case AS_APP_KIND_SHELL_EXTENSION:
+       case AS_COMPONENT_KIND_SHELL_EXTENSION:
                g_string_append (key, "8:");
                break;
        default:
@@ -389,7 +389,7 @@ _button_update_all_clicked_cb (GtkButton *button, GsUpdatesSection *self)
        /* look at each app in turn */
        for (guint i = 0; i < gs_app_list_length (self->list); i++) {
                GsApp *app = gs_app_list_index (self->list, i);
-               if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE)
+               if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE)
                        helper->do_reboot = TRUE;
                if (gs_app_has_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT))
                        helper->do_reboot_notification = TRUE;
@@ -611,10 +611,10 @@ gs_updates_section_app_state_changed_cb (GsAppList *list,
 
        for (ii = 0; ii < len; ii++) {
                GsApp *app = gs_app_list_index (list, ii);
-               AsAppState state = gs_app_get_state (app);
+               GsAppState state = gs_app_get_state (app);
 
-               if (state == AS_APP_STATE_INSTALLING ||
-                   state == AS_APP_STATE_REMOVING) {
+               if (state == GS_APP_STATE_INSTALLING ||
+                   state == GS_APP_STATE_REMOVING) {
                        busy++;
                }
        }
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index b38a353d..7971d597 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -105,7 +105,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
         * UPDATABLE (packages are downloaded and upgrade is ready to go)
         */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                /* TRANSLATORS: This is the text displayed when a distro
                 * upgrade is available. First %s is the distro name and the
                 * 2nd %s is the version, e.g. "Fedora 23 Now Available" */
@@ -115,7 +115,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
                gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
                gtk_widget_set_visible (priv->button_upgrades_cancel, FALSE);
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
                /* TRANSLATORS: This is the text displayed while waiting to
                 * download a distro upgrade. First %s is the distro name and
                 * the 2nd %s is the version, e.g. "Waiting to Download Fedora 23" */
@@ -125,7 +125,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
                gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
                gtk_widget_set_visible (priv->button_upgrades_cancel, TRUE);
                break;
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                /* TRANSLATORS: This is the text displayed while downloading a
                 * distro upgrade. First %s is the distro name and the 2nd %s
                 * is the version, e.g. "Downloading Fedora 23" */
@@ -135,7 +135,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
                gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
                gtk_widget_set_visible (priv->button_upgrades_cancel, TRUE);
                break;
-       case AS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE:
                /* TRANSLATORS: This is the text displayed when a distro
                 * upgrade has been downloaded and is ready to be installed.
                 * First %s is the distro name and the 2nd %s is the version,
@@ -148,14 +148,14 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
                break;
        default:
                g_critical ("Unexpected app state ‘%s’ of app ‘%s’",
-                           as_app_state_to_string (gs_app_get_state (priv->app)),
+                           gs_app_state_to_string (gs_app_get_state (priv->app)),
                            gs_app_get_unique_id (priv->app));
                break;
        }
 
        /* Hide the upgrade box until the app state is known. */
        gtk_widget_set_visible (priv->box_upgrades,
-                               (gs_app_get_state (priv->app) != AS_APP_STATE_UNKNOWN));
+                               (gs_app_get_state (priv->app) != GS_APP_STATE_UNKNOWN));
 
        /* Refresh the summary if we got anything better than the default blurb */
        if (gs_app_get_summary (priv->app) != NULL)
@@ -164,22 +164,22 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
 
        /* Show the right buttons for the current state */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_AVAILABLE:
+       case GS_APP_STATE_AVAILABLE:
                gtk_widget_show (priv->button_upgrades_download);
                gtk_widget_hide (priv->button_upgrades_install);
                break;
-       case AS_APP_STATE_QUEUED_FOR_INSTALL:
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_QUEUED_FOR_INSTALL:
+       case GS_APP_STATE_INSTALLING:
                gtk_widget_hide (priv->button_upgrades_download);
                gtk_widget_hide (priv->button_upgrades_install);
                break;
-       case AS_APP_STATE_UPDATABLE:
+       case GS_APP_STATE_UPDATABLE:
                gtk_widget_hide (priv->button_upgrades_download);
                gtk_widget_show (priv->button_upgrades_install);
                break;
        default:
                g_critical ("Unexpected app state ‘%s’ of app ‘%s’",
-                           as_app_state_to_string (gs_app_get_state (priv->app)),
+                           gs_app_state_to_string (gs_app_get_state (priv->app)),
                            gs_app_get_unique_id (priv->app));
                break;
        }
@@ -190,7 +190,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
 
        /* do a fill bar for the current progress */
        switch (gs_app_get_state (priv->app)) {
-       case AS_APP_STATE_INSTALLING:
+       case GS_APP_STATE_INSTALLING:
                percentage = gs_app_get_progress (priv->app);
                if (percentage == GS_APP_PROGRESS_UNKNOWN) {
                        if (priv->progress_pulse_id == 0)
diff --git a/src/meson.build b/src/meson.build
index fde5fbdc..c6e28047 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -25,7 +25,6 @@ gnome_software_sources = [
   'gs-category-tile.c',
   'gs-common.c',
   'gs-css.c',
-  'gs-content-rating.c',
   'gs-details-page.c',
   'gs-extras-page.c',
   'gs-feature-tile.c',
@@ -230,7 +229,6 @@ if get_option('tests')
     sources : [
       'gs-css.c',
       'gs-common.c',
-      'gs-content-rating.c',
       'gs-self-test.c',
     ],
     include_directories : [


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