Function
FwupdPlugininput_stream_read_bytes
Declaration [src]
GBytes*
fu_input_stream_read_bytes (
GInputStream* stream,
gsize offset,
gsize count,
FuProgress* progress,
GError** error
)
Description [src]
Read a GBytes from a stream in a safe way.
NOTE: The returned buffer may be smaller than count!
| Available since: | 2.0.0 |
Parameters
stream |
GInputStream |
A |
|
| The data is owned by the caller of the function. | |
offset |
gsize |
Offset in bytes into |
|
count |
gsize |
Maximum number of bytes to read. |
|
progress |
FuProgress |
An optional |
|
The argument can be NULL. | |
| The data is owned by the caller of the function. | |
error |
GError ** |
The return location for a GError*, or NULL. |
Return value
| Returns: | GBytes |
Buffer. |
|
| The caller of the function takes ownership of the data, and is responsible for freeing it. |