Dex.AsyncPair

g Dex.AsyncPair Dex.AsyncPair Dex.Future Dex.Future Dex.Future->Dex.AsyncPair Dex.Object Dex.Object Dex.Object->Dex.Future

Subclasses:

None

Methods

Inherited:

Dex.Future (48), Dex.Object (2)

class

new (instance, info)

get_cancellable ()

return_boolean (value)

return_error (error)

return_int64 (value)

return_object (instance)

return_string (value)

return_uint64 (value)

return_variant (variant)

set_cancel_on_discard (cancel_on_discard)

Virtual Methods

None

Fields

None

Class Details

class Dex.AsyncPair
Bases:

Dex.Future

Abstract:

No

classmethod new(instance, info)
Parameters:
Return type:

Dex.Future

get_cancellable()
Returns:

a Gio.Cancellable

Return type:

Gio.Cancellable

Gets the cancellable for the async pair.

If the Dex.AsyncPair is discarded by it’s callers, then it will automatically be cancelled using Gio.Cancellable.cancel().

return_boolean(value)
Parameters:

value (bool) –

return_error(error)
Parameters:

error (GLib.Error) – a GLib.Error

Rejects self with error.

This function is meant to be used when manually wrapping various Gio.AsyncReadyCallback based API.

The ownership of error is taken when calling this function.

return_int64(value)
Parameters:

value (int) –

return_object(instance)
Parameters:

instance (GObject.Object) – a GObject.Object

Resolves self with a value of instance.

This function is meant to be used when manually wrapping various Gio.AsyncReadyCallback based API.

The ownership of instance is taken when calling this function.

return_string(value)
Parameters:

value (str or None) – a string or None

Resolves self with value.

return_uint64(value)
Parameters:

value (int) –

return_variant(variant)
Parameters:

variant (GLib.Variant) – the variant to resolve with

Resolves self with variant.

set_cancel_on_discard(cancel_on_discard)
Parameters:

cancel_on_discard (bool) – if the operation should cancel when the future is discarded

Sets whether or not the future should cancel the async operation when the future is discarded. This happens when no more futures are awaiting the completion of this future.

New in version 0.4.