fu-chunk

fu-chunk — A packet of chunked data

Functions

FuChunk * fu_chunk_new ()
gchar * fu_chunk_to_string ()
gchar * fu_chunk_array_to_string ()
GPtrArray * fu_chunk_array_new ()
GPtrArray * fu_chunk_array_new_from_bytes ()

Types and Values

  FuChunk

Description

An object that represents a packet of data.

Functions

fu_chunk_new ()

FuChunk *
fu_chunk_new (guint32 idx,
              guint32 page,
              guint32 address,
              const guint8 *data,
              guint32 data_sz);

fu_chunk_to_string ()

gchar *
fu_chunk_to_string (FuChunk *item);

Converts the chunked packet to a string representation.

Parameters

item

a FuChunk

 

Returns

A string.

[transfer full]

Since: 1.1.2


fu_chunk_array_to_string ()

gchar *
fu_chunk_array_to_string (GPtrArray *chunks);

Converts all the chunked packets in an array to a string representation.

Parameters

chunks

array of packets.

[element-type FuChunk]

Returns

A string.

[transfer full]

Since: 1.0.1


fu_chunk_array_new ()

GPtrArray *
fu_chunk_array_new (const guint8 *data,
                    guint32 data_sz,
                    guint32 addr_start,
                    guint32 page_sz,
                    guint32 packet_sz);

fu_chunk_array_new_from_bytes ()

GPtrArray *
fu_chunk_array_new_from_bytes (GBytes *blob,
                               guint32 addr_start,
                               guint32 page_sz,
                               guint32 packet_sz);

Types and Values

FuChunk

typedef struct {
	guint32		 idx;
	guint32		 page;
	guint32		 address;
	const guint8 *data;
	guint32		 data_sz;
} FuChunk;