summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-fetcher.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-12-22 17:57:04 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-01-04 16:32:10 +0000
commitaf560047a2460bf7e75a5e343b9bb338a52131e2 (patch)
tree3e755b3fcd7cfdfe4c314112d2b43ec718d041e1 /src/libostree/ostree-fetcher.h
parenteceb165013a2bba8f4aaca34aa8dc01f4633d152 (diff)
downloadostree-af560047a2460bf7e75a5e343b9bb338a52131e2.tar.gz
fetcher: Hoist core "mirrored request" API to public
This is in preparation for the libcurl port. We're basically making public what we had internally. The next step here is to create `ostree-fetcher-util.[ch]` that only operates in terms of this lower level API. Also drop the `_mirrored` from the function name since it's the default now. Closes: #636 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-fetcher.h')
-rw-r--r--src/libostree/ostree-fetcher.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/libostree/ostree-fetcher.h b/src/libostree/ostree-fetcher.h
index 8e282e24..124a02bf 100644
--- a/src/libostree/ostree-fetcher.h
+++ b/src/libostree/ostree-fetcher.h
@@ -103,18 +103,25 @@ void _ostree_fetcher_set_extra_headers (OstreeFetcher *self,
guint64 _ostree_fetcher_bytes_transferred (OstreeFetcher *self);
-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);
+typedef enum {
+ OSTREE_FETCHER_REQUEST_FLAG_ENABLE_PARTIAL = (1 << 0)
+} OstreeFetcherRequestFlags;
+
+void _ostree_fetcher_request_async (OstreeFetcher *self,
+ GPtrArray *mirrorlist,
+ const char *filename,
+ OstreeFetcherRequestFlags flags,
+ guint64 max_size,
+ int priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean _ostree_fetcher_request_finish (OstreeFetcher *self,
+ GAsyncResult *result,
+ char **out_filename,
+ GInputStream **out_stream,
+ GError **error);
gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher,
GPtrArray *mirrorlist,