Function

GioTaskis_valid

since: 2.36

Declaration

gboolean
g_task_is_valid (
  GAsyncResult* result,
  GObject* source_object
)

Description

Checks that result is a GTask, and that source_object is its source object (or that source_object is NULL and result has no source object). This can be used in g_return_if_fail() checks.

Available since: 2.36

Parameters

result

Type: GAsyncResult

A GAsyncResult.

The data is owned by the caller of the function.
source_object

Type: GObject

The source object expected to be associated with the task.

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

Return value

Type: gboolean

TRUE if result and source_object are valid, FALSE if not.