new_async
Description:
[ CCode ( finish_name = "g_async_initable_new_finish" ) ]
public static async Object new_async (Type object_type, int io_priority = DEFAULT, Cancellable? cancellable, ...) throws Error
public static async Object new_async (Type object_type, int io_priority = DEFAULT, Cancellable? cancellable, ...) throws Error
Helper function for constructing AsyncInitable object.
This is similar to @new 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. |
io_priority |
the I/O priority of the operation |
cancellable |
optional Cancellable object, null to ignore. |
... |
the value of the first property, followed by other property value pairs, and ended by null. |
callback |
a TaskReadyCallback to call when the initialization is finished |
first_property_name |
the name of the first property, or null if no properties |
user_data |
the data to pass to callback function |