ZifStoreRemote

ZifStoreRemote — Store for remote packages

Synopsis

struct              ZifStoreRemote;
struct              ZifStoreRemoteClass;
ZifStore *          zif_store_remote_new                (void);
gboolean            zif_store_remote_set_from_file      (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *id,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_is_devel           (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
const gchar *       zif_store_remote_get_name           (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_remote_get_files          (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_remote_get_provides       (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_remote_get_requires       (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_remote_get_conflicts      (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_remote_get_obsoletes      (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_get_enabled        (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_set_enabled        (ZifStoreRemote *store,
                                                         gboolean enabled,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_download           (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *directory,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_download_full      (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *directory,
                                                         guint64 size,
                                                         const gchar *content_types,
                                                         GChecksumType checksum_type,
                                                         const gchar *checksum,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_download_repomd    (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
ZifUpdate *         zif_store_remote_get_update_detail  (ZifStoreRemote *store,
                                                         const gchar *package_id,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_check              (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
void                zif_store_remote_set_id             (ZifStoreRemote *store,
                                                         const gchar *id);
const gchar *       zif_store_remote_get_local_directory
                                                        (ZifStoreRemote *store);
ZifDelta *          zif_store_remote_find_delta         (ZifStoreRemote *store,
                                                         ZifPackage *update,
                                                         ZifPackage *installed,
                                                         ZifState *state,
                                                         GError **error);
ZifMd *             zif_store_remote_get_md_from_type   (ZifStoreRemote *store,
                                                         ZifMdKind type);
                    ZifStoreRemotePrivate;

Description

A ZifStoreRemote is a subclassed ZifStore and operates on remote objects. A repository is another name for a ZifStoreRemote.

Details

struct ZifStoreRemote

struct ZifStoreRemote {
	ZifStore		 parent;
	ZifStoreRemotePrivate *priv;
};


struct ZifStoreRemoteClass

struct ZifStoreRemoteClass {
	ZifStoreClass		 parent_class;
};


zif_store_remote_new ()

ZifStore *          zif_store_remote_new                (void);

Returns :

A new ZifStoreRemote instance.

Since 0.1.0


zif_store_remote_set_from_file ()

gboolean            zif_store_remote_set_from_file      (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *id,
                                                         ZifState *state,
                                                         GError **error);

state :

A ZifState to use for progress reporting

Since 0.1.0


zif_store_remote_is_devel ()

gboolean            zif_store_remote_is_devel           (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);

Finds out if the repository is a development repository.

store :

A ZifStoreRemote

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

TRUE or FALSE

Since 0.1.0


zif_store_remote_get_name ()

const gchar *       zif_store_remote_get_name           (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);

Get the name of this repository.

store :

A ZifStoreRemote

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

The repository name, e.g. "Fedora"

Since 0.1.0


zif_store_remote_get_files ()

GPtrArray *         zif_store_remote_get_files          (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);

zif_store_remote_get_provides ()

GPtrArray *         zif_store_remote_get_provides       (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);

zif_store_remote_get_requires ()

GPtrArray *         zif_store_remote_get_requires       (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);

zif_store_remote_get_conflicts ()

GPtrArray *         zif_store_remote_get_conflicts      (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);

zif_store_remote_get_obsoletes ()

GPtrArray *         zif_store_remote_get_obsoletes      (ZifStoreRemote *store,
                                                         ZifPackage *package,
                                                         ZifState *state,
                                                         GError **error);

zif_store_remote_get_enabled ()

gboolean            zif_store_remote_get_enabled        (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);

Find out if this repository is enabled in the repo file.

NOTE: the repo can still be runtime disabled by using zif_store_set_enabled(store, FALSE)

store :

A ZifStoreRemote

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

TRUE or FALSE

Since 0.1.0


zif_store_remote_set_enabled ()

gboolean            zif_store_remote_set_enabled        (ZifStoreRemote *store,
                                                         gboolean enabled,
                                                         ZifState *state,
                                                         GError **error);

Enable or disable a remote repository.

store :

A ZifStoreRemote

enabled :

If the object should be enabled

error :

A GError, or NULL

Returns :

TRUE for success, FALSE otherwise

Since 0.1.6


zif_store_remote_download ()

gboolean            zif_store_remote_download           (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *directory,
                                                         ZifState *state,
                                                         GError **error);

Downloads a remote package to a local directory. NOTE: if filename is "Packages/hal-0.1.0.rpm" and directory is "/var/cache/zif" then the downloaded file will "/var/cache/zif/hal-0.1.0.rpm"

store :

A ZifStoreRemote

filename :

Filename to download, e.g. "Packages/hal-0.1.0.rpm"

directory :

Directory to put the downloaded file, e.g. "/var/cache/zif"

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

TRUE for success, FALSE otherwise

Since 0.1.0


zif_store_remote_download_full ()

gboolean            zif_store_remote_download_full      (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *directory,
                                                         guint64 size,
                                                         const gchar *content_types,
                                                         GChecksumType checksum_type,
                                                         const gchar *checksum,
                                                         ZifState *state,
                                                         GError **error);


zif_store_remote_download_repomd ()

gboolean            zif_store_remote_download_repomd    (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);

Redownloads a new repomd file, which contains the links to all new metadata with the new checksums.

store :

A ZifStoreRemote

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

TRUE for failure

Since 0.1.2


zif_store_remote_get_update_detail ()

ZifUpdate *         zif_store_remote_get_update_detail  (ZifStoreRemote *store,
                                                         const gchar *package_id,
                                                         ZifState *state,
                                                         GError **error);

Gets the update detail for a package.

store :

A ZifStoreRemote

package_id :

The package_id of the package to find

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

A ZifUpdate, or NULL for failure

Since 0.1.0


zif_store_remote_check ()

gboolean            zif_store_remote_check              (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);


zif_store_remote_set_id ()

void                zif_store_remote_set_id             (ZifStoreRemote *store,
                                                         const gchar *id);

Sets the ID for the ZifStoreRemote

id :

The repository id, e.g. "fedora"

Since 0.1.3


zif_store_remote_get_local_directory ()

const gchar *       zif_store_remote_get_local_directory
                                                        (ZifStoreRemote *store);

Gets the directory used for this repo, e.g. /var/cache/yum/i386/fedora

store :

A ZifStoreRemote

Returns :

The directory the repo downloads cache file to

Since 0.1.3


zif_store_remote_find_delta ()

ZifDelta *          zif_store_remote_find_delta         (ZifStoreRemote *store,
                                                         ZifPackage *update,
                                                         ZifPackage *installed,
                                                         ZifState *state,
                                                         GError **error);

Find a update delta between to packages. This might allow Zif to download much less data, at the expense of the amount of CPU taken during the update when the delta package is rebuilt.

store :

A ZifStoreRemote

update :

New package to update to

installed :

Package that is currently installed

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

A delta object or NULL. Free with g_object_unref() when done.

Since 0.1.3


zif_store_remote_get_md_from_type ()

ZifMd *             zif_store_remote_get_md_from_type   (ZifStoreRemote *store,
                                                         ZifMdKind type);

Gets the metadata object of a specific type.

store :

A ZifStoreRemote

type :

the ZifMdKind to get

Returns :

A ZifMd. [transfer none]

Since 0.2.1


ZifStoreRemotePrivate

typedef struct _ZifStoreRemotePrivate ZifStoreRemotePrivate;