Method

RsvgHandleread_stream_sync

since: 2.32

Declaration [src]

gboolean
rsvg_handle_read_stream_sync (
  RsvgHandle* handle,
  GInputStream* stream,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Reads stream and writes the data from it to handle.

Before calling this function, you may need to call rsvg_handle_set_base_uri() or rsvg_handle_set_base_gfile() to set the “base file” for resolving references to external resources. SVG elements like <image> which reference external resources will be resolved relative to the location you specify with those functions.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

Available since: 2.32

Parameters

stream

Type: GInputStream

A GInputStream

The data is owned by the caller of the method.
cancellable

Type: GCancellable

A GCancellable, or NULL

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

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE if reading stream succeeded, or FALSE otherwise with error filled in.