diff options
author | Jonathan Lebon <jlebon@redhat.com> | 2016-08-23 15:55:15 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-08-31 16:52:12 +0000 |
commit | 157d878ce1a500a2b96d079e2259dbdc30419342 (patch) | |
tree | 2bd39fa1a628a7c20614e42cf8cce7ded3600546 /src/libostree/ostree-fetcher.h | |
parent | 9546b93382fc5a07ec0f753f66497992f514fd09 (diff) | |
download | ostree-157d878ce1a500a2b96d079e2259dbdc30419342.tar.gz |
pull: add mirrorlist support
This commit adds mirrorlist support to the fetcher. Users can now
prepend url or/and contenturl by mirrorlist= to interpret the link as a
mirrorlist.
If an object is not found, the fetcher will automatically try the next
mirror in the order given in the list (assuming the order returned by
the server is significant).
Closes: #469
Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-fetcher.h')
-rw-r--r-- | src/libostree/ostree-fetcher.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/libostree/ostree-fetcher.h b/src/libostree/ostree-fetcher.h index 60a13755..8cceca51 100644 --- a/src/libostree/ostree-fetcher.h +++ b/src/libostree/ostree-fetcher.h @@ -70,20 +70,31 @@ void _ostree_fetcher_set_tls_database (OstreeFetcher *self, guint64 _ostree_fetcher_bytes_transferred (OstreeFetcher *self); -void _ostree_fetcher_request_uri_with_partial_async (OstreeFetcher *self, - SoupURI *uri, - guint64 max_size, - int priority, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -char *_ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self, - GAsyncResult *result, - GError **error); +void _ostree_fetcher_mirrored_request_with_partial_async (OstreeFetcher *self, + GPtrArray *mirrorlist, + const char *filename, + guint64 max_size, + int priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +char *_ostree_fetcher_mirrored_request_with_partial_finish (OstreeFetcher *self, + GAsyncResult *result, + GError **error); + +gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher, + GPtrArray *mirrorlist, + const char *filename, + gboolean add_nul, + gboolean allow_noent, + GBytes **out_contents, + guint64 max_size, + GCancellable *cancellable, + GError **error); gboolean _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher, - SoupURI *uri, + SoupURI *uri, gboolean add_nul, gboolean allow_noent, GBytes **out_contents, |