Method

ValentObjectchain_cancellable

unstable since: 1.0

Declaration [src]

GCancellable*
valent_object_chain_cancellable (
  ValentObject* object,
  GCancellable* cancellable
)

Description [src]

Chain a cancellable to the object’s cancellable.

This connects cancellable to objectss GCancellable::cancelled so that if object is destroyed, cancellable will be cancelled. If cancellable is NULL, this method will return a new reference to ValentObject:cancellable, otherwise it returns a new reference to cancellable.

Typically the returned GCancellable is passed to an internal asynchronous operation, to ensure it is cancelled if cancellable is triggered or object is destroyed.

Available since: 1.0

Parameters

cancellable

Type: GCancellable

A GCancellable.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: GCancellable

A GCancellable.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.