summaryrefslogtreecommitdiff
path: root/lib/test-lib.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-12-17 21:37:30 +0100
committerAlexander Larsson <alexl@redhat.com>2015-12-17 21:37:30 +0100
commit41b3db5e01183f0d187cc9e8c88d7d794479801e (patch)
tree4aad8995178bf11adec3391751b212f545f37138 /lib/test-lib.c
parente6509ff11cfeebe2bb1497b429c1699f8e851fea (diff)
downloadxdg-app-41b3db5e01183f0d187cc9e8c88d7d794479801e.tar.gz
lib: Add xdg_app_installation_list_installed_refs_for_update
Diffstat (limited to 'lib/test-lib.c')
-rw-r--r--lib/test-lib.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/test-lib.c b/lib/test-lib.c
index 72757f9..006f1df 100644
--- a/lib/test-lib.c
+++ b/lib/test-lib.c
@@ -62,6 +62,35 @@ main (int argc, char *argv[])
return 0;
}
+ g_print ("\n**** Checking for updates\n");
+ {
+ g_autoptr(GPtrArray) updates =
+ xdg_app_installation_list_installed_refs_for_update (installation,
+ NULL, &error);
+
+ if (updates == NULL)
+ {
+ g_print ("check for updates error: %s\n", error->message);
+ g_clear_error (&error);
+ }
+ else
+ {
+ for (i = 0; i < updates->len; i++)
+ {
+ XdgAppInstalledRef *ref = g_ptr_array_index(updates,i);
+ g_print ("%d %s %s %s %s %s %s %d\n",
+ xdg_app_ref_get_kind (XDG_APP_REF(ref)),
+ xdg_app_ref_get_name (XDG_APP_REF(ref)),
+ xdg_app_ref_get_arch (XDG_APP_REF(ref)),
+ xdg_app_ref_get_branch (XDG_APP_REF(ref)),
+ xdg_app_ref_get_commit (XDG_APP_REF(ref)),
+ xdg_app_installed_ref_get_origin (ref),
+ xdg_app_installed_ref_get_deploy_dir (ref),
+ xdg_app_installed_ref_get_is_current (ref));
+ }
+ }
+ }
+
g_print ("\n**** Listing all installed refs\n");
{
g_autoptr(GPtrArray) refs = NULL;