Constructor

GioSimpleAsyncResultnew

deprecated: 2.46 

Declaration [src]

GSimpleAsyncResult*
g_simple_async_result_new (
  GObject* source_object,
  GAsyncReadyCallback callback,
  gpointer user_data,
  gpointer source_tag
)

Description [src]

Creates a GSimpleAsyncResult.

The common convention is to create the GSimpleAsyncResult in the function that starts the asynchronous operation and use that same function as the source_tag.

If your operation supports cancellation with GCancellable (which it probably should) then you should provide the user’s cancellable to g_simple_async_result_set_check_cancellable() immediately after this function returns.

Deprecated since: 2.46

Use g_task_new() instead.

Parameters

source_object

Type: GObject

A GObject, or NULL.

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

Type: GAsyncReadyCallback

A GAsyncReadyCallback.

The argument can be NULL.
user_data

Type: gpointer

User data passed to callback.

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

Type: gpointer

The asynchronous function.

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

Return value

Type: GSimpleAsyncResult

A GSimpleAsyncResult.

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