Function

FwupdPluginmemory_input_stream_new_from_data

since: 2.1.7

Declaration [src]

FuInputStream*
fu_memory_input_stream_new_from_data (
  void* data,
  gssize len,
  GDestroyNotify destroy
)

Description [src]

Creates a new memory-backed input stream from data.

Available since: 2.1.7

Parameters

data

Type: An array of guint8

Input data.

The length of the array is specified in the len argument.
The data is owned by the caller of the function.
len

Type: gssize

Length of the data, or -1 if data is a nul-terminated string.

destroy

Type: GDestroyNotify

Function that is called to free data, or NULL.

The argument can be NULL.

Return value

Type: FuInputStream

A FuInputStream.

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