Function

Giopollable_source_new

since: 2.28

Declaration

GSource*
g_pollable_source_new (
  GObject* pollable_stream
)

Description

Utility method for GPollableInputStream and GPollableOutputStream implementations. Creates a new GSource that expects a callback of type GPollableSourceFunc. The new source does not actually do anything on its own; use g_source_add_child_source() to add other sources to it to cause it to trigger.

Available since: 2.28

Parameters

pollable_stream

Type: GObject

The stream associated with the new source.

The data is owned by the caller of the function.

Return value

Type: GSource

The new GSource.

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