Top | ![]() |
![]() |
![]() |
![]() |
#define | FU_TYPE_ARCHIVE |
enum | FuArchiveFlags |
enum | FuArchiveFormat |
enum | FuArchiveCompression |
FuArchive |
gboolean (*FuArchiveIterateFunc) (FuArchive *self
,const gchar *filename
,GBytes *bytes
,gpointer user_data
,GError **error
);
The archive iteration callback.
const gchar *
fu_archive_format_to_string (FuArchiveFormat format
);
Converts an enumerated format to a string.
Since: 1.8.1
FuArchiveFormat
fu_archive_format_from_string (const gchar *format
);
Converts a string to an enumerated format.
Since: 1.8.1
FuArchiveCompression
fu_archive_compression_from_string (const gchar *compression
);
Converts a string to an enumerated compression.
Since: 1.8.1
const gchar *
fu_archive_compression_to_string (FuArchiveCompression compression
);
Converts an enumerated compression to a string.
Since: 1.8.1
FuArchive * fu_archive_new (GBytes *data
,FuArchiveFlags flags
,GError **error
);
Parses data
as an archive and decompresses all files to memory blobs.
If data
is unspecified then a new empty archive is created.
data |
archive contents. |
[nullable] |
flags |
archive flags, e.g. |
|
error |
optional return location for an error. |
[nullable] |
Since: 1.2.2
void fu_archive_add_entry (FuArchive *self
,const gchar *fn
,GBytes *blob
);
Adds, or replaces an entry to an archive.
Since: 1.8.1
GBytes * fu_archive_lookup_by_fn (FuArchive *self
,const gchar *fn
,GError **error
);
Finds the blob referenced by filename
Since: 1.2.2
GBytes * fu_archive_write (FuArchive *self
,FuArchiveFormat format
,FuArchiveCompression compression
,GError **error
);
Writes an archive with specified format
and compression
.
self |
||
format |
a compression, e.g. |
|
compression |
a compression, e.g. |
|
error |
optional return location for an error. |
[nullable] |
Since: 1.8.1
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.
self |
||
callback |
[scope call] | |
user_data |
user data |
|
error |
optional return location for an error. |
[nullable] |
Since: 1.3.4
The archive format.
The archive compression.