ZifStoreRemote

ZifStoreRemote — A remote store is a store that can operate on remote packages

Synopsis

                    ZifStoreRemote;
                    ZifStoreRemotePrivate;
                    ZifStoreRemoteClass;
ZifStoreRemote *    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);
gboolean            zif_store_remote_get_enabled        (ZifStoreRemote *store,
                                                         ZifState *state,
                                                         GError **error);
gboolean            zif_store_remote_set_enabled        (ZifStoreRemote *store,
                                                         gboolean enabled,
                                                         GError **error);
gboolean            zif_store_remote_download           (ZifStoreRemote *store,
                                                         const gchar *filename,
                                                         const gchar *directory,
                                                         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);

Object Hierarchy

  GObject
   +----ZifStore
         +----ZifStoreRemote

Description

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

Details

ZifStoreRemote

typedef struct _ZifStoreRemote ZifStoreRemote;


ZifStoreRemotePrivate

typedef struct _ZifStoreRemotePrivate ZifStoreRemotePrivate;


ZifStoreRemoteClass

typedef struct {
	ZifStoreClass		 parent_class;
} ZifStoreRemoteClass;


zif_store_remote_new ()

ZifStoreRemote *    zif_store_remote_new                (void);

Returns :

A new ZifStoreRemote class 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);

store :

filename :

id :

state :

a ZifState to use for progress reporting

error :

Returns :

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 :

the ZifStoreRemote object

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, 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 :

the ZifStoreRemote object

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, 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);

store :

package :

state :

error :

Returns :


zif_store_remote_get_enabled ()

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

Find out if this repository is enabled or not.

store :

the ZifStoreRemote object

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, 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,
                                                         GError **error);

Enable or disable a remote repository.

store :

the ZifStoreRemote object

enabled :

If the object should be enabled

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


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 :

the ZifStoreRemote object

filename :

the state filename to download, e.g. "Packages/hal-0.1.0.rpm"

directory :

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

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


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 :

the ZifStoreRemote object

package_id :

the package_id of the package to find

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, 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);

store :

state :

error :

Returns :