libutil: Delete some unused checksum helper API

This code was last used in 9618232f4da325692dcf98fd6ff5b8abd9fce66c
which is sooo old and outdated.  Delete.

Closes: #767
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-03-28 22:42:26 -04:00 committed by Atomic Bot
parent 0ce7ab3827
commit 5f45ab0bb1
2 changed files with 0 additions and 53 deletions

View File

@ -180,46 +180,3 @@ ot_checksum_file_at (int dfd,
return ret;
}
static void
checksum_stream_thread (GSimpleAsyncResult *result,
GObject *object,
GCancellable *cancellable)
{
GError *error = NULL;
guchar *csum;
if (!ot_gio_checksum_stream ((GInputStream*)object, &csum,
cancellable, &error))
g_simple_async_result_take_error (result, error);
else
g_simple_async_result_set_op_res_gpointer (result, csum, g_free);
}
void
ot_gio_checksum_stream_async (GInputStream *in,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GSimpleAsyncResult *result;
result = g_simple_async_result_new ((GObject*) in,
callback, user_data,
ot_gio_checksum_stream_async);
g_simple_async_result_run_in_thread (result, checksum_stream_thread, io_priority, cancellable);
g_object_unref (result);
}
guchar *
ot_gio_checksum_stream_finish (GInputStream *in,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == ot_gio_checksum_stream_async);
return g_memdup (g_simple_async_result_get_op_res_gpointer (simple), 32);
}

View File

@ -61,14 +61,4 @@ char * ot_checksum_file_at (int dfd,
GCancellable *cancellable,
GError **error);
void ot_gio_checksum_stream_async (GInputStream *in,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
guchar * ot_gio_checksum_stream_finish (GInputStream *in,
GAsyncResult *result,
GError **error);
G_END_DECLS