write_mime_type_async


Description:

public virtual async bool write_mime_type_async (string mime_type, OutputStream stream, int io_priority, Cancellable? cancellable) throws Error

Asynchronously writes the contents of this to stream in the given mime_type.

When the operation is finished callback will be called. You must then call [method@Gdk.ContentProvider.write_mime_type_finish] to get the result of the operation.

The given mime type does not need to be listed in the formats returned by [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.

The given stream will not be closed.

Parameters:

this

a `GdkContentProvider`

mime_type

the mime type to provide the data in

stream

the `GOutputStream` to write to

io_priority

I/O priority of the request.

cancellable

optional `GCancellable` object, null to ignore.

callback

callback to call when the request is satisfied

user_data

the data to pass to callback function