Top | ![]() |
![]() |
![]() |
![]() |
FuChunk * | fu_chunk_bytes_new () |
void | fu_chunk_set_idx () |
guint32 | fu_chunk_get_idx () |
void | fu_chunk_set_page () |
guint32 | fu_chunk_get_page () |
void | fu_chunk_set_address () |
guint32 | fu_chunk_get_address () |
const guint8 * | fu_chunk_get_data () |
guint8 * | fu_chunk_get_data_out () |
guint32 | fu_chunk_get_data_sz () |
void | fu_chunk_set_bytes () |
GBytes * | fu_chunk_get_bytes () |
FuChunk * | fu_chunk_new () |
gchar * | fu_chunk_to_string () |
gchar * | fu_chunk_array_to_string () |
GPtrArray * | fu_chunk_array_new () |
GPtrArray * | fu_chunk_array_mutable_new () |
GPtrArray * | fu_chunk_array_new_from_bytes () |
FuChunk *
fu_chunk_bytes_new (GBytes *bytes
);
Creates a new packet of data.
Since: 1.5.6
void fu_chunk_set_idx (FuChunk *self
,guint32 idx
);
Sets the index of the chunk.
Since: 1.5.6
guint32
fu_chunk_get_idx (FuChunk *self
);
Gets the index of the chunk.
Since: 1.5.6
void fu_chunk_set_page (FuChunk *self
,guint32 page
);
Sets the page of the chunk.
Since: 1.5.6
guint32
fu_chunk_get_page (FuChunk *self
);
Gets the page of the chunk.
Since: 1.5.6
void fu_chunk_set_address (FuChunk *self
,guint32 address
);
Sets the address of the chunk.
Since: 1.5.6
guint32
fu_chunk_get_address (FuChunk *self
);
Gets the address of the chunk.
Since: 1.5.6
const guint8 *
fu_chunk_get_data (FuChunk *self
);
Gets the data of the chunk.
Since: 1.5.6
guint8 *
fu_chunk_get_data_out (FuChunk *self
);
Gets the mutable data of the chunk.
WARNING: At the moment fu_chunk_get_data_out()
returns the same data as
fu_chunk_get_data()
in all cases. The caller should verify the data passed to
fu_chunk_array_new()
is also writable (i.e. not const
or mmap
) before
using this function.
Since: 1.5.6
guint32
fu_chunk_get_data_sz (FuChunk *self
);
Gets the data size of the chunk.
Since: 1.5.6
void fu_chunk_set_bytes (FuChunk *self
,GBytes *bytes
);
Sets the GBytes blob
Since: 1.5.6
GBytes *
fu_chunk_get_bytes (FuChunk *self
);
Gets the data as bytes of the chunk.
Since: 1.5.6
FuChunk * fu_chunk_new (guint32 idx
,guint32 page
,guint32 address
,const guint8 *data
,guint32 data_sz
);
Creates a new packet of chunked data.
idx |
the packet number |
|
page |
the hardware memory page |
|
address |
the address *within* the page |
|
data |
the data |
|
data_sz |
size of |
Since: 1.1.2
gchar *
fu_chunk_to_string (FuChunk *self
);
Converts the chunked packet to a string representation.
Since: 1.1.2
gchar *
fu_chunk_array_to_string (GPtrArray *chunks
);
Converts all the chunked packets in an array to a string representation.
Since: 1.0.1
GPtrArray * fu_chunk_array_new (const guint8 *data
,guint32 data_sz
,guint32 addr_start
,guint32 page_sz
,guint32 packet_sz
);
Chunks a linear blob of memory into packets, ensuring each packet does not cross a package boundary and is less that a specific transfer size.
data |
a linear blob of memory, or |
|
data_sz |
size of |
|
addr_start |
the hardware address offset, or 0 |
|
page_sz |
the hardware page size, or 0 |
|
packet_sz |
the transfer size, or 0 |
Since: 1.1.2
GPtrArray * fu_chunk_array_mutable_new (guint8 *data
,guint32 data_sz
,guint32 addr_start
,guint32 page_sz
,guint32 packet_sz
);
Chunks a mutable blob of memory into packets, ensuring each packet does not cross a package boundary and is less that a specific transfer size.
data |
a mutable blob of memory |
|
data_sz |
size of |
|
addr_start |
the hardware address offset, or 0 |
|
page_sz |
the hardware page size, or 0 |
|
packet_sz |
the transfer size, or 0 |
Since: 1.5.6
GPtrArray * fu_chunk_array_new_from_bytes (GBytes *blob
,guint32 addr_start
,guint32 page_sz
,guint32 packet_sz
);
Chunks a linear blob of memory into packets, ensuring each packet does not cross a package boundary and is less that a specific transfer size.
blob |
a GBytes |
|
addr_start |
the hardware address offset, or 0 |
|
page_sz |
the hardware page size, or 0 |
|
packet_sz |
the transfer size, or 0 |
Since: 1.1.2