LiManager

LiManager — Work with mgralled software

Functions

Signals

void progress Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── LiManager

Description

Functions

LI_TYPE_MANAGER

#define LI_TYPE_MANAGER (li_manager_get_type ())


li_manager_error_quark ()

GQuark
li_manager_error_quark (void);

Returns

An error quark.


li_manager_new ()

LiManager *
li_manager_new (void);

Creates a new LiManager.

Returns

a LiManager.

[transfer full]


li_manager_get_software_list ()

GPtrArray *
li_manager_get_software_list (LiManager *mgr,
                              GError **error);

Returns

A list of installed and available software.

[transfer full][element-type LiPkgInfo]


li_manager_get_installed_runtimes ()

GPtrArray *
li_manager_get_installed_runtimes (LiManager *mgr);

Returns

A list of registered runtimes.

[transfer none][element-type LiRuntime]


li_manager_get_software_by_pkid ()

LiPkgInfo *
li_manager_get_software_by_pkid (LiManager *mgr,
                                 const gchar *pkid,
                                 GError **error);

Returns

A LiPkgInfo or NULL if no software was found.

[transfer none]


li_manager_find_runtime_with_members ()

LiRuntime *
li_manager_find_runtime_with_members (LiManager *mgr,
                                      GPtrArray *members);

Get an installed runtime which contains the specified members. If none is available, NULL is returned. The resulting runtime needs to be unref'ed with g_object_unref() if it is no longer needed.

Parameters

mgr

An instance of LiManager

 

members

Software components which should be present in the runtime.

[element-type LiPkgInfo]

Returns

A LiRuntime containing members or NULL.

[transfer full]


li_manager_remove_software ()

gboolean
li_manager_remove_software (LiManager *mgr,
                            const gchar *pkgid,
                            GError **error);

li_manager_package_is_installed ()

gboolean
li_manager_package_is_installed (LiManager *mgr,
                                 LiPkgInfo *pki);

Test if package is installed.


li_manager_cleanup ()

gboolean
li_manager_cleanup (LiManager *mgr,
                    GError **error);

Remove unnecessary software. Limba automatically determines whether software is still needed. Only software which has been explicitly installed is kept, anything else will be automatically cleaned as soon as nothing needs it anymore. The cleanup routine will remove faded bundles, so it is recommended to runt it when to Limba-installed app is still in use. By default, cleanup happens when the system is shutting down.


li_manager_trust_key ()

void
li_manager_trust_key (LiManager *mgr,
                      const gchar *fpr,
                      GError **error);

Download a PGP key and add it to the database of trusted keys.

Parameters

mgr

An instance of LiManager

 

fpr

The fingerprint of the key to add.

 

li_manager_trust_key_file ()

void
li_manager_trust_key_file (LiManager *mgr,
                           const gchar *fname,
                           GError **error);

Download a PGP key and add it to the database of trusted keys.

Parameters

mgr

An instance of LiManager

 

fname

The filename of the GPG key that should be added.

 

li_manager_refresh_cache ()

void
li_manager_refresh_cache (LiManager *mgr,
                          GError **error);

Refresh the cache of available packages.

Parameters

mgr

An instance of LiManager

 

li_manager_refresh_keyring ()

void
li_manager_refresh_keyring (LiManager *mgr,
                            GError **error);

Look for new trusted keys and update the keyring.

Parameters

mgr

An instance of LiManager

 

li_manager_get_update_list ()

GList *
li_manager_get_update_list (LiManager *mgr,
                            GError **error);

Get a list of available updates for the installed software.

Parameters

mgr

An instance of LiManager

 

Returns

A list of LiUpdateItem describing the potential updates. Free with g_list_free().

[transfer full][element-type LiUpdateItem]


li_manager_update_all ()

gboolean
li_manager_update_all (LiManager *mgr,
                       GError **error);

Upgrade all Limba packages.

Parameters

mgr

An instance of LiManager

 

li_manager_update ()

gboolean
li_manager_update (LiManager *mgr,
                   LiUpdateItem *uitem,
                   GError **error);

Update a single package.

Parameters

mgr

An instance of LiManager

 

uitem

The LiUpdateItem which should be updated.

 

li_manager_get_update_for_id ()

LiUpdateItem *
li_manager_get_update_for_id (LiManager *mgr,
                              const gchar *pkid,
                              GError **error);

Get the LiUpdateItem which represents an update of the package given by the pkid parameter.

Parameters

mgr

An instance of LiManager

 

pkid

ID of the existing package which can be upgraded.

 

Returns

A LiUpdateItem or NULL if none was found.

[transfer none]

Types and Values

struct LiManagerClass

struct LiManagerClass {
	GObjectClass		parent_class;
};


enum LiManagerError

The error type.

Members

LI_MANAGER_ERROR_FAILED

Generic failure

 

LI_MANAGER_ERROR_NOT_FOUND

The software / item was not found

 

LI_MANAGER_ERROR_DEPENDENCY

Completing this action would break a dependent package

 

LI_MANAGER_ERROR_REMOVE_FAILED

Failed to remove a file

 

LI_MANAGER_ERROR

#define LI_MANAGER_ERROR li_manager_error_quark ()


LiManager

typedef struct _LiManager LiManager;

Signal Details

The “progress” signal

void
user_function (LiManager *limanager,
               guint      arg1,
               gpointer   arg2,
               gpointer   user_data)

Parameters

limanager

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last