summaryrefslogtreecommitdiff
path: root/lib/test-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test-lib.c')
-rw-r--r--lib/test-lib.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/lib/test-lib.c b/lib/test-lib.c
index 6032ee9..df641df 100644
--- a/lib/test-lib.c
+++ b/lib/test-lib.c
@@ -332,19 +332,35 @@ main (int argc, char *argv[])
else
g_print ("Download size: %"G_GUINT64_FORMAT" Installed size: %"G_GUINT64_FORMAT"\n",
download_size, installed_size);
+
+ if (!xdg_app_installation_fetch_remote_size_sync2 (installation,
+ xdg_app_remote_get_name (remote),
+ XDG_APP_REF(ref),
+ &download_size,
+ &installed_size,
+ NULL, &error))
+ {
+ g_print ("error fetching sizes2: %s\n", error->message);
+ g_clear_error (&error);
+ }
+ else
+ g_print ("Download size2: %"G_GUINT64_FORMAT" Installed size2: %"G_GUINT64_FORMAT"\n",
+ download_size, installed_size);
+
}
}
}
- g_print ("\n**** Getting remote gedit master on %s\n", xdg_app_remote_get_name (remote));
+ g_print ("\n**** Getting remote platform 3.20 on %s\n", xdg_app_remote_get_name (remote));
error = NULL;
remote_ref = xdg_app_installation_fetch_remote_ref_sync (installation, xdg_app_remote_get_name (remote),
- XDG_APP_REF_KIND_APP,
- "org.gnome.gedit", NULL, "master",
+ XDG_APP_REF_KIND_RUNTIME,
+ "org.gnome.Platform", NULL, "3.20",
NULL, &error);
if (remote_ref)
{
GBytes *metadata;
+ GBytes *metadata2;
g_print ("%d %s %s %s %s %s\n",
xdg_app_ref_get_kind (XDG_APP_REF(remote_ref)),
@@ -366,6 +382,19 @@ main (int argc, char *argv[])
g_print ("error: %s\n", error->message);
g_clear_error (&error);
}
+
+ metadata2 = xdg_app_installation_fetch_remote_metadata_sync2 (installation, xdg_app_remote_get_name (remote),
+ XDG_APP_REF(remote_ref), NULL, &error);
+ if (metadata2)
+ {
+ g_print ("metadata2: %s\n", (char *)g_bytes_get_data (metadata2, NULL));
+ }
+ else
+ {
+ g_print ("fetch error\n");
+ g_print ("error: %s\n", error->message);
+ g_clear_error (&error);
+ }
}
else
{