| Top |
| #define | LI_TYPE_PACKAGE |
| GQuark | li_package_error_quark () |
| const gchar * | li_trust_level_to_text () |
| const gchar * | li_package_stage_to_string () |
| LiPackage * | li_package_new () |
| gboolean | li_package_open_file () |
| gboolean | li_package_open_remote () |
| gboolean | li_package_is_remote () |
| gboolean | li_package_download () |
| gboolean | li_package_install () |
| gboolean | li_package_get_auto_verify () |
| void | li_package_set_auto_verify () |
| LiTrustLevel | li_package_verify_signature () |
| const gchar * | li_package_get_install_root () |
| void | li_package_set_install_root () |
| const gchar * | li_package_get_id () |
| void | li_package_set_id () |
| LiPkgInfo * | li_package_get_info () |
| gboolean | li_package_has_embedded_packages () |
| GPtrArray * | li_package_get_embedded_packages () |
| LiPackage * | li_package_extract_embedded_package () |
| gchar * | li_package_get_appstream_data () |
| void | li_package_extract_contents () |
| void | li_package_extract_appstream_icons () |
| struct | LiPackageClass |
| #define | LI_IPK_MAGIC |
| enum | LiPackageError |
| #define | LI_PACKAGE_ERROR |
| enum | LiTrustLevel |
| enum | LiPackageStage |
| LiPackage |
gboolean li_package_open_file (LiPackage *pkg,const gchar *filename,GError **error);
gboolean li_package_open_remote (LiPackage *pkg,LiPkgCache *cache,const gchar *pkid,GError **error);
Open a package from a remote cache. The package will be downloaded when the install()
or verify() methods are run.
pkg |
An instance of LiPackage |
|
cache |
The LiPkgCache to download the package from. |
|
pkid |
The id of the package to download. |
|
error |
A GError |
gboolean li_package_download (LiPackage *pkg,GError **error);
Downloads a package from the cache, in case we opened a remote package previously.
gboolean
li_package_get_auto_verify (LiPackage *pkg);
TRUE if the package should be automatically verified against the
trusted keyring at install-time.
void li_package_set_auto_verify (LiPackage *pkg,gboolean verify);
Set if the package should be automatically verified against the default
keyring at install-time. Defaults to TRUE.
Do not disable this, unless you have already verified the package's origin
(e.g. by checking the signature on the repository it originates from).
LiTrustLevel li_package_verify_signature (LiPackage *pkg,GError **error);
Verifies the signature of this package and returns a trust level.
const gchar *
li_package_get_install_root (LiPackage *pkg);
Get the installation root directory
void li_package_set_install_root (LiPackage *pkg,const gchar *dir);
Set the directory where the software should be installed to.
const gchar *
li_package_get_id (LiPackage *pkg);
Get the unique name of this package
void li_package_set_id (LiPackage *pkg,const gchar *unique_name);
Set the unique name for this package.
LiPkgInfo *
li_package_get_info (LiPackage *pkg);
Get the archive control metadata object.
LiPackage * li_package_extract_embedded_package (LiPackage *pkg,LiPkgInfo *pki,GError **error);
Return: (transfer full): A new package
gchar *
li_package_get_appstream_data (LiPackage *pkg);
Returns AppStream XML data
void li_package_extract_contents (LiPackage *pkg,const gchar *dest_dir,GError **error);
Extracts the package contents into a directory. Useful to inspect the package structure manually.
void li_package_extract_appstream_icons (LiPackage *pkg,const gchar *dest_dir,GError **error);
Extracts the icons of this package into a directory and name them after the package. This will only extract icons in the sizes mandated by the AppStream spec, 128x128 and 64x64.
The error type.
|
Generic failure |
||
|
A required file or entity was not found |
||
|
Error in the archive structure |
||
|
Some data is missing in the archive |
||
|
Could not override file |
||
|
Could not extract data |
||
|
A checksum did not match |
||
|
The package was built for a different architecture |
||
|
The signature of this package is broken |
||
|
Package needs to be downloaded first before we can perfom this operation. |
A simple indicator on how much we trust a software package.
|
We don't trust that software at all (usually means no signature was found) |
||
|
The package could not be validated, its signature might be broken. |
||
|
Low trust level (signed and validated, but no trusted author) |
||
|
Medium trust level (we already have software by this author installed and auto-trust him) |
||
|
High trust level (The software author is in our trusted database) |
Stages emitted when performing actions on a LiPackage which consist of several smaller steps, like installing the package.
“progress” signalvoid user_function (LiPackage *lipackage, guint arg1, gpointer user_data)
lipackage |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“stage-changed” signalvoid user_function (LiPackage *lipackage, guint arg1, gpointer user_data)
lipackage |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last