ostree-fetcher: Remove _ostree_fetcher_request_uri_to_stream function

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2014-11-06 14:57:25 +01:00 committed by Colin Walters
parent 5546c4d2fc
commit c2bc99bc16
2 changed files with 11 additions and 22 deletions

View File

@ -619,8 +619,8 @@ _ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self,
return g_object_ref (pending->out_tmpfile); return g_object_ref (pending->out_tmpfile);
} }
void static void
_ostree_fetcher_stream_uri_async (OstreeFetcher *self, ostree_fetcher_stream_uri_async (OstreeFetcher *self,
SoupURI *uri, SoupURI *uri,
guint64 max_size, guint64 max_size,
GCancellable *cancellable, GCancellable *cancellable,
@ -633,7 +633,7 @@ _ostree_fetcher_stream_uri_async (OstreeFetcher *self,
pending = ostree_fetcher_request_uri_internal (self, uri, TRUE, max_size, cancellable, pending = ostree_fetcher_request_uri_internal (self, uri, TRUE, max_size, cancellable,
callback, user_data, callback, user_data,
_ostree_fetcher_stream_uri_async); ostree_fetcher_stream_uri_async);
if (SOUP_IS_REQUEST_HTTP (pending->request)) if (SOUP_IS_REQUEST_HTTP (pending->request))
{ {
@ -646,15 +646,15 @@ _ostree_fetcher_stream_uri_async (OstreeFetcher *self,
on_request_sent, pending); on_request_sent, pending);
} }
GInputStream * static GInputStream *
_ostree_fetcher_stream_uri_finish (OstreeFetcher *self, ostree_fetcher_stream_uri_finish (OstreeFetcher *self,
GAsyncResult *result, GAsyncResult *result,
GError **error) GError **error)
{ {
GSimpleAsyncResult *simple; GSimpleAsyncResult *simple;
OstreeFetcherPendingURI *pending; OstreeFetcherPendingURI *pending;
g_return_val_if_fail (g_simple_async_result_is_valid (result, (GObject*)self, _ostree_fetcher_stream_uri_async), FALSE); g_return_val_if_fail (g_simple_async_result_is_valid (result, (GObject*)self, ostree_fetcher_stream_uri_async), FALSE);
simple = G_SIMPLE_ASYNC_RESULT (result); simple = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (simple, error)) if (g_simple_async_result_propagate_error (simple, error))
@ -711,7 +711,7 @@ fetch_uri_sync_on_complete (GObject *object,
{ {
FetchUriSyncData *data = user_data; FetchUriSyncData *data = user_data;
data->result_stream = _ostree_fetcher_stream_uri_finish ((OstreeFetcher*)object, data->result_stream = ostree_fetcher_stream_uri_finish ((OstreeFetcher*)object,
result, data->error); result, data->error);
g_main_loop_quit (data->loop); g_main_loop_quit (data->loop);
} }
@ -744,10 +744,10 @@ _ostree_fetcher_contents_membuf_sync (OstreeFetcher *fetcher,
data.loop = loop; data.loop = loop;
data.error = error; data.error = error;
_ostree_fetcher_stream_uri_async (fetcher, uri, ostree_fetcher_stream_uri_async (fetcher, uri,
max_size, max_size,
cancellable, cancellable,
fetch_uri_sync_on_complete, &data); fetch_uri_sync_on_complete, &data);
run_mainloop_monitor_fetcher (&data); run_mainloop_monitor_fetcher (&data);
if (!data.result_stream) if (!data.result_stream)

View File

@ -76,17 +76,6 @@ GFile *_ostree_fetcher_request_uri_with_partial_finish (OstreeFetcher *self,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void _ostree_fetcher_stream_uri_async (OstreeFetcher *self,
SoupURI *uri,
guint64 max_size,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GInputStream *_ostree_fetcher_stream_uri_finish (OstreeFetcher *self,
GAsyncResult *result,
GError **error);
gboolean _ostree_fetcher_contents_membuf_sync (OstreeFetcher *fetcher, gboolean _ostree_fetcher_contents_membuf_sync (OstreeFetcher *fetcher,
SoupURI *uri, SoupURI *uri,
gboolean add_nul, gboolean add_nul,