Function

FwupdPlugininput_stream_read_u32

Declaration [src]

gboolean
fu_input_stream_read_u32 (
  GInputStream* stream,
  gsize offset,
  guint32* value,
  FuEndianType endian,
  GError** error
)

Description [src]

Read a value from a stream using a specified endian 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.

value guint32*
 

The parsed value.

 The argument will be set by the function.
endian FuEndianType
 

An endian type, e.g. G_LITTLE_ENDIAN.

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

Return value

Returns: gboolean
 

TRUE if value was set, FALSE otherwise.