newv_async


Description:

[ CCode ( finish_name = "g_async_initable_new_finish" ) ]
[ Version ( deprecated = true , deprecated_since = "2.54" , since = "2.22" ) ]
public static async Object newv_async (Type object_type, Parameter[] parameters, int io_priority = DEFAULT, Cancellable? cancellable = null)

Warning: newv_async is deprecated since 2.54.

Helper function for constructing AsyncInitable object.

Note:

Use new_with_properties and init_async instead. See Parameter for more information.

This is similar to newv but also initializes the object asynchronously.

When the initialization is finished, callback will be called. You can then call new_async.end to get the new object and check for any errors.

Parameters:

object_type

a Type supporting AsyncInitable.

parameters

the parameters to use to construct the object

io_priority

the I/O priority of the operation

cancellable

optional Cancellable object, null to ignore.

callback

a TaskReadyCallback to call when the initialization is finished

n_parameters

the number of parameters in parameters

user_data

the data to pass to callback function