ZifPackageRemote

ZifPackageRemote — Remote package

Synopsis

                    ZifPackageRemote;
                    ZifPackageRemotePrivate;
                    ZifPackageRemoteClass;
ZifPackage *        zif_package_remote_new              (void);
gboolean            zif_package_remote_set_from_repo    (ZifPackageRemote *pkg,
                                                         guint length,
                                                         gchar **type,
                                                         gchar **data,
                                                         const gchar *repo_id,
                                                         GError **error);
const gchar *       zif_package_get_pkgid               (ZifPackage *package);
void                zif_package_set_pkgid               (ZifPackage *package,
                                                         ZifString *pkgid);
void                zif_package_remote_set_store_remote (ZifPackageRemote *pkg,
                                                         ZifStoreRemote *store);
gboolean            zif_package_remote_download         (ZifPackageRemote *pkg,
                                                         const gchar *directory,
                                                         ZifState *state,
                                                         GError **error);
ZifUpdate *         zif_package_remote_get_update_detail
                                                        (ZifPackageRemote *package,
                                                         ZifState *state,
                                                         GError **error);

Object Hierarchy

  GObject
   +----ZifPackage
         +----ZifPackageRemote

Description

This object is a subclass of ZifPackage

Details

ZifPackageRemote

typedef struct _ZifPackageRemote ZifPackageRemote;


ZifPackageRemotePrivate

typedef struct _ZifPackageRemotePrivate ZifPackageRemotePrivate;

Private ZifPackageRemote data


ZifPackageRemoteClass

typedef struct {
	ZifPackageClass		 parent_class;
} ZifPackageRemoteClass;


zif_package_remote_new ()

ZifPackage *        zif_package_remote_new              (void);

Returns :

A new ZifPackageRemote instance.

Since 0.1.0


zif_package_remote_set_from_repo ()

gboolean            zif_package_remote_set_from_repo    (ZifPackageRemote *pkg,
                                                         guint length,
                                                         gchar **type,
                                                         gchar **data,
                                                         const gchar *repo_id,
                                                         GError **error);

Sets details on a remote package from repo data derived from the metadata xml.

pkg :

A ZifPackageRemote

length :

length of data and type arrays

type :

The data type array

data :

The data value array

repo_id :

The repository id

error :

A GError, or NULL

Returns :

TRUE for success, FALSE otherwise

Since 0.1.0


zif_package_get_pkgid ()

const gchar *       zif_package_get_pkgid               (ZifPackage *package);

Gets the package pkgid, which is normally the SHA1 hash of the header. Every package has a pkgid, either virtual, local or remote. This function cannot fail.

package :

A ZifPackage

Returns :

A SHA1 string

Since 0.1.3


zif_package_set_pkgid ()

void                zif_package_set_pkgid               (ZifPackage *package,
                                                         ZifString *pkgid);

Sets the package pkgid, which is usually the SHA1 hash of the header.

package :

A ZifPackage

pkgid :

The package pkgid

Since 0.1.3


zif_package_remote_set_store_remote ()

void                zif_package_remote_set_store_remote (ZifPackageRemote *pkg,
                                                         ZifStoreRemote *store);

Sets the store used to create this package, which we may need of we ever need to ensure() data at runtime.

pkg :

A ZifPackageRemote

store :

A ZifStoreRemote that created this package

Since 0.1.0


zif_package_remote_download ()

gboolean            zif_package_remote_download         (ZifPackageRemote *pkg,
                                                         const gchar *directory,
                                                         ZifState *state,
                                                         GError **error);

Downloads a package.

pkg :

A ZifPackageRemote

directory :

A local directory to save to, or NULL to use the package cache

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

TRUE for success, FALSE otherwise

Since 0.1.3


zif_package_remote_get_update_detail ()

ZifUpdate *         zif_package_remote_get_update_detail
                                                        (ZifPackageRemote *package,
                                                         ZifState *state,
                                                         GError **error);

Gets the update detail for a package.

package :

A ZifPackageRemote

state :

A ZifState to use for progress reporting

error :

A GError, or NULL

Returns :

A ZifUpdate, or NULL for failure

Since 0.1.3