Function

FwupdPlugininput_stream_read_string

Declaration [src]

gchar*
fu_input_stream_read_string (
  GInputStream* stream,
  gsize offset,
  gsize count,
  GError** error
)

Description [src]

Read a UTF-8 string from a stream in a safe way.

Available since:2.0.0

Parameters

stream GInputStream
 

A GInputStream.

 The data is owned by the caller of the function.
offset gsize
 

Offset in bytes into stream to copy from.

count gsize
 

Maximum number of bytes to read.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

String.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The value is a NUL terminated UTF-8 string.