diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-01-14 16:44:00 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-01-14 16:45:44 +0100 |
commit | 78601a42ce99d21cdeaaecb77e5f711da303e7d8 (patch) | |
tree | 0a43d413f6cf38cb0ca3c6a6d5d09ca5cbc93e30 /lib/test-lib.c | |
parent | 839c5ca885d3584e8ae3a4d113a35c24aa0c3e62 (diff) | |
download | xdg-app-78601a42ce99d21cdeaaecb77e5f711da303e7d8.tar.gz |
lib: xdg_app_installation_fetch_remote_size_sync
Diffstat (limited to 'lib/test-lib.c')
-rw-r--r-- | lib/test-lib.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/test-lib.c b/lib/test-lib.c index 8324003..5e55f51 100644 --- a/lib/test-lib.c +++ b/lib/test-lib.c @@ -263,6 +263,25 @@ main (int argc, char *argv[]) xdg_app_ref_get_branch (XDG_APP_REF(ref)), xdg_app_ref_get_commit (XDG_APP_REF(ref)), xdg_app_remote_ref_get_remote_name (ref)); + + if (j == 0) + { + guint64 download_size; + guint64 installed_size; + if (!xdg_app_installation_fetch_remote_size_sync (installation, + xdg_app_remote_get_name (remote), + xdg_app_ref_get_commit (XDG_APP_REF(ref)), + &download_size, + &installed_size, + NULL, &error)) + { + g_print ("error fetching sizes: %s\n", error->message); + g_clear_error (&error); + } + else + g_print ("Download size: %"G_GUINT64_FORMAT" Installed size: %"G_GUINT64_FORMAT"\n", + download_size, installed_size); + } } } |