LiPkgCache

LiPkgCache — Download information about available packages from remote sources.

Functions

Signals

void progress Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── LiPkgCache

Description

Functions

LI_TYPE_PKG_CACHE

#define LI_TYPE_PKG_CACHE (li_pkg_cache_get_type ())


li_pkg_cache_error_quark ()

GQuark
li_pkg_cache_error_quark (void);

Returns

An error quark.


li_pkg_cache_new ()

LiPkgCache *
li_pkg_cache_new (void);

Creates a new LiPkgCache.

Returns

a LiPkgCache.

[transfer full]


li_pkg_cache_open ()

void
li_pkg_cache_open (LiPkgCache *cache,
                   GError **error);

Open the package cache and load a list of available packages.


li_pkg_cache_update ()

void
li_pkg_cache_update (LiPkgCache *cache,
                     GError **error);

Update the package cache by downloading new package indices from the web.


li_pkg_cache_get_packages ()

GPtrArray *
li_pkg_cache_get_packages (LiPkgCache *cache);

Returns

Packages in the index.

[transfer none][element-type LiPkgInfo]


li_pkg_cache_get_pkg_info ()

LiPkgInfo *
li_pkg_cache_get_pkg_info (LiPkgCache *cache,
                           const gchar *pkid);

Returns

The LiPkgInfo for pkid, or NULL in case no package with that id was found in the cache.

[transfer none]


li_pkg_cache_fetch_remote ()

gchar *
li_pkg_cache_fetch_remote (LiPkgCache *cache,
                           const gchar *pkgid,
                           GError **error);

Download a package from a remote source.

Parameters

cache

an instance of LiPkgCache

 

pkgid

id of the package to download

 

Returns

Path to the downloaded package file.

[transfer full]

Types and Values

struct LiPkgCacheClass

struct LiPkgCacheClass {
	GObjectClass		parent_class;
};


enum LiPkgCacheError

The error type.

Members

LI_PKG_CACHE_ERROR_FAILED

Generic failure

 

LI_PKG_CACHE_ERROR_DOWNLOAD_FAILED

Failed to download a file

 

LI_PKG_CACHE_ERROR_REMOTE_NOT_FOUND

Data could not be found on remote server

 

LI_PKG_CACHE_ERROR_NOT_FOUND

A cache entity was not found

 

LI_PKG_CACHE_ERROR_WRITE

Writing to cache was not possible

 

LI_PKG_CACHE_ERROR_VERIFICATION

Validation of repository data failed.

 

LI_PKG_CACHE_ERROR_UNPACK

Unpacking of data (e.g. from the icon tarball) has failed.

 

LI_PKG_CACHE_ERROR

#define LI_PKG_CACHE_ERROR li_pkg_cache_error_quark ()


LiPkgCache

typedef struct _LiPkgCache LiPkgCache;

Signal Details

The “progress” signal

void
user_function (LiPkgCache *lipkgcache,
               guint       arg1,
               gpointer    arg2,
               gpointer    user_data)

Parameters

lipkgcache

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last