FuArchive

FuArchive — an in-memory archive decompressor

Functions

Types and Values

Description

Functions

FuArchiveIterateFunc ()

gboolean
(*FuArchiveIterateFunc) (FuArchive *self,
                         const gchar *filename,
                         GBytes *bytes,
                         gpointer user_data,
                         GError **error);

Specifies the type of archive iteration function.

Parameters

self

A FuArchive.

 

filename

A filename.

 

bytes

The blob referenced by filename .

 

user_data

User data.

 

error

a GError or NULL

 

fu_archive_new ()

FuArchive *
fu_archive_new (GBytes *data,
                FuArchiveFlags flags,
                GError **error);

Parses data as an archive and decompresses all files to memory blobs.

Parameters

data

A GBytes

 

flags

A FuArchiveFlags, e.g. FU_ARCHIVE_FLAG_NONE

 

error

A GError, or NULL

 

Returns

a FuArchive, or NULL if the archive was invalid in any way.

Since: 1.2.2


fu_archive_lookup_by_fn ()

GBytes *
fu_archive_lookup_by_fn (FuArchive *self,
                         const gchar *fn,
                         GError **error);

Finds the blob referenced by filename

Parameters

self

A FuArchive

 

fn

A filename

 

error

A GError, or NULL

 

Returns

a GBytes, or NULL if the filename was not found.

[transfer none]

Since: 1.2.2


fu_archive_iterate ()

gboolean
fu_archive_iterate (FuArchive *self,
                    FuArchiveIterateFunc callback,
                    gpointer user_data,
                    GError **error);

Iterates over the archive contents, calling the given function for each of the files found. If any callback returns FALSE scanning is aborted.

Parameters

self

A FuArchive

 

callback

A FuArchiveIterateFunc.

[scope call]

user_data

User data.

 

error

A GError, or NULL

 

Returns

True if no callback returned FALSE

Since: 1.3.4

Types and Values

FU_TYPE_ARCHIVE

#define FU_TYPE_ARCHIVE (fu_archive_get_type ())

enum FuArchiveFlags

The flags to use when loading the archive.

Members

FU_ARCHIVE_FLAG_NONE

No flags set

 

FU_ARCHIVE_FLAG_IGNORE_PATH

Ignore any path component

 

FuArchive

typedef struct _FuArchive FuArchive;