/* For the synchronous, blocking version of this function, see g_output_stream_write_bytes().  */
void g_output_stream_write_bytes_async(GOutputStream *stream, GBytes *bytes, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
/* For the synchronous, blocking version of this function, see g_output_stream_write_bytes().  */
void g_output_stream_write_bytes_async(GOutputStream *stream, GBytes *bytes, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  GTask *task;
  gsize size;
  gconstpointer data;
  data = g_bytes_get_data (bytes, &size);
  task = g_task_new (stream, cancellable, callback, user_data);
  g_task_set_task_data (task, g_bytes_ref (bytes),
                        (GDestroyNotify) g_bytes_unref);
  g_output_stream_write_async (stream,
                               data, size,
                               io_priority,
                               cancellable,
                               write_bytes_callback,
                               task);
}