Top |
Functions
GCabCabinet * | gcab_cabinet_new () |
gboolean | gcab_cabinet_load () |
gboolean | gcab_cabinet_extract () |
gboolean | gcab_cabinet_extract_simple () |
GPtrArray * | gcab_cabinet_get_folders () |
gboolean | gcab_cabinet_add_folder () |
gboolean | gcab_cabinet_write () |
gboolean | gcab_cabinet_write_simple () |
const GByteArray * | gcab_cabinet_get_signature () |
Description
A GCabCabinet is a handle to a Cabinet archive. It allows examining, extracting and creation of archives.
Functions
gcab_cabinet_new ()
GCabCabinet *
gcab_cabinet_new (void
);
Create a new GCabCabinet object to read or create a Cabinet archive.
gcab_cabinet_load ()
gboolean gcab_cabinet_load (GCabCabinet *cabinet
,GInputStream *stream
,GCancellable *cancellable
,GError **error
);
Load a cabinet archive.
gcab_cabinet_extract ()
gboolean gcab_cabinet_extract (GCabCabinet *cabinet
,GFile *path
,GCabFileCallback file_callback
,GFileProgressCallback progress_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Extract files to given path.
Parameters
cabinet |
||
path |
the path to extract files |
|
file_callback |
an optionnal GCabFile callback,
return |
[allow-none][scope call][closure user_data] |
progress_callback |
a progress callback. |
[allow-none][scope call][closure user_data] |
user_data |
callback data. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gcab_cabinet_extract_simple ()
gboolean gcab_cabinet_extract_simple (GCabCabinet *cabinet
,GFile *path
,GCabFileCallback file_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Extract files to given path.
Parameters
cabinet |
||
path |
the path to extract files |
|
file_callback |
an optionnal GCabFile callback,
return |
[allow-none][scope call][closure user_data] |
user_data |
callback data. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gcab_cabinet_get_folders ()
GPtrArray *
gcab_cabinet_get_folders (GCabCabinet *cabinet
);
Get the Cabinet folders within the cabinet
.
Note that Cabinet folders are not like filesystem path, they are
group of files sharing some layout parameters.
gcab_cabinet_add_folder ()
gboolean gcab_cabinet_add_folder (GCabCabinet *cabinet
,GCabFolder *folder
,GError **error
);
Add folder
to cabinet
.
gcab_cabinet_write ()
gboolean gcab_cabinet_write (GCabCabinet *cabinet
,GOutputStream *stream
,GCabFileCallback file_callback
,GFileProgressCallback progress_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Save cabinet
to the output stream out
. out
must be a GSeekable.
Parameters
cabinet |
||
stream |
a GOutputStream also GSeekable |
|
file_callback |
report current file being saved. |
[allow-none][scope call][closure user_data] |
progress_callback |
report saving progress. |
[allow-none][scope call][closure user_data] |
user_data |
user data to pass to callbacks. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gcab_cabinet_write_simple ()
gboolean gcab_cabinet_write_simple (GCabCabinet *cabinet
,GOutputStream *stream
,GCabFileCallback file_callback
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
Save cabinet
to the output stream out
. out
must be a GSeekable.
Parameters
cabinet |
||
stream |
a GOutputStream also GSeekable |
|
file_callback |
report current file being saved. |
[allow-none][scope call][closure user_data] |
user_data |
user data to pass to callbacks. |
[closure] |
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
gcab_cabinet_get_signature ()
const GByteArray * gcab_cabinet_get_signature (GCabCabinet *cabinet
,GCancellable *cancellable
,GError **error
);
Lookup the cabinet authenticode signature if any.
Parameters
cabinet |
||
cancellable |
optional GCancellable object,
|
[allow-none] |
error |
GError to set on error, or |
[allow-none] |
Since: 0.5
Types and Values
GCabCabinet
typedef struct _GCabCabinet GCabCabinet;
An opaque object holding a Cabinet file reference.
GCAB_ERROR
#define GCAB_ERROR gcab_error_quark ()
Error domain for the GCab library. See GError for more information on error domains.