Function

FwupdPluginbytes_new_offset

Declaration [src]

GBytes*
fu_bytes_new_offset (
  GBytes* bytes,
  gsize offset,
  gsize length,
  GError** error
)

Description [src]

Creates a GBytes which is a subsection of another GBytes.

Available since:1.8.2

Parameters

bytes GBytes
 

Data blob.

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

Where subsection starts at.

length gsize
 

Length of subsection.

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

Return value

Returns: GBytes
 

A GBytes, or NULL if range is invalid.

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