ZIF Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
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
); gchar ** zif_store_remote_get_pubkey (ZifStoreRemote *store
); gboolean zif_store_remote_get_pubkey_enabled (ZifStoreRemote *store
); 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
); ZifUpdate * zif_store_remote_get_update_detail (ZifStoreRemote *store
,const gchar *package_id
,ZifState *state
,GError **error
); void zif_store_remote_set_id (ZifStoreRemote *store
,const gchar *id
); ZifDelta * zif_store_remote_find_delta (ZifStoreRemote *store
,ZifPackage *update
,ZifPackage *installed
,ZifState *state
,GError **error
); gchar * zif_store_remote_get_string (ZifStoreRemote *store
,const gchar *key
,GError **error
); gboolean zif_store_remote_get_boolean (ZifStoreRemote *store
,const gchar *key
,GError **error
);
A ZifStoreRemote is a subclassed ZifStore and operates on remote objects. A repository is another name for a ZifStoreRemote.
struct ZifStoreRemoteClass { ZifStoreClass parent_class; /* Padding for future expansion */ void (*_zif_reserved1) (void); void (*_zif_reserved2) (void); void (*_zif_reserved3) (void); void (*_zif_reserved4) (void); };
ZifStore * zif_store_remote_new (void
);
Returns : |
A new ZifStoreRemote instance. |
Since 0.1.0
gboolean zif_store_remote_set_from_file (ZifStoreRemote *store
,const gchar *filename
,const gchar *id
,ZifState *state
,GError **error
);
|
A ZifState to use for progress reporting |
Since 0.1.0
gboolean zif_store_remote_is_devel (ZifStoreRemote *store
,ZifState *state
,GError **error
);
Finds out if the repository is a development repository.
|
A ZifStoreRemote |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE or FALSE
|
Since 0.1.0
const gchar * zif_store_remote_get_name (ZifStoreRemote *store
,ZifState *state
,GError **error
);
Get the name of this repository.
|
A ZifStoreRemote |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
The repository name, e.g. "Fedora" |
Since 0.1.0
gchar ** zif_store_remote_get_pubkey (ZifStoreRemote *store
);
Get the public key URLs for this repository.
|
A ZifStoreRemote |
Returns : |
An array of key URLs, or NULL . [transfer none]
|
Since 0.3.2
gboolean zif_store_remote_get_pubkey_enabled (ZifStoreRemote *store
);
Get the public key URLs for this repository is enabled.
|
A ZifStoreRemote |
Returns : |
TRUE is gpgcheck is enabled. |
Since 0.3.6
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)
|
A ZifStoreRemote |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE or FALSE
|
Since 0.1.0
gboolean zif_store_remote_set_enabled (ZifStoreRemote *store
,gboolean enabled
,ZifState *state
,GError **error
);
Enable or disable a remote repository.
|
A ZifStoreRemote |
|
If the object should be enabled |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.6
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"
|
A ZifStoreRemote |
|
Filename to download, e.g. "Packages/hal-0.1.0.rpm" |
|
Directory to put the downloaded file, e.g. "/var/cache/zif" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
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
);
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"
|
A ZifStoreRemote |
|
Filename to download, e.g. "Packages/hal-0.1.0.rpm" |
|
Directory to put the downloaded file, e.g. "/var/cache/zif" |
|
Expected size in bytes, or 0 |
|
Comma delimited expected content types of the file, or NULL
|
|
Checksum type, e.g. G_CHECKSUM_SHA256 , or 0 |
|
Expected checksum of the file, or NULL
|
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.5
ZifUpdate * zif_store_remote_get_update_detail (ZifStoreRemote *store
,const gchar *package_id
,ZifState *state
,GError **error
);
Gets the update detail for a package.
|
A ZifStoreRemote |
|
The package_id of the package to find |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A ZifUpdate , or NULL for failure. [transfer full]
|
Since 0.1.0
void zif_store_remote_set_id (ZifStoreRemote *store
,const gchar *id
);
Sets the ID for the ZifStoreRemote
|
A ZifStoreRemote |
|
The repository id, e.g. "fedora" |
Since 0.1.3
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.
|
A ZifStoreRemote |
|
New package to update to |
|
Package that is currently installed |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A delta object or NULL . [transfer full]
|
Since 0.1.3
gchar * zif_store_remote_get_string (ZifStoreRemote *store
,const gchar *key
,GError **error
);
Gets a string value from the repo, falling back to the config file if not found.
|
A ZifStoreRemote |
|
A key name to retrieve, e.g. "keepcache" |
|
A GError, or NULL
|
Returns : |
An allocated value, or NULL
|
Since 0.2.6
gboolean zif_store_remote_get_boolean (ZifStoreRemote *store
,const gchar *key
,GError **error
);
Gets a boolean value from the repo, falling back to the config file if not found.
|
A ZifStoreRemote |
|
A key name to retrieve, e.g. "keepcache" |
|
A GError, or NULL
|
Returns : |
TRUE or FALSE
|
Since 0.2.6