| ZIF Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define ZIF_REPOS_ERROR struct ZifRepos; struct ZifReposClass; enum ZifReposError; GQuark zif_repos_error_quark (void); ZifRepos * zif_repos_new (void); gboolean zif_repos_set_repos_dir (ZifRepos *repos,const gchar *repos_dir,GError **error); gboolean zif_repos_load (ZifRepos *repos,ZifState *state,GError **error); GPtrArray * zif_repos_get_stores (ZifRepos *repos,ZifState *state,GError **error); GPtrArray * zif_repos_get_stores_enabled (ZifRepos *repos,ZifState *state,GError **error); GPtrArray * zif_repos_get_stores_debuginfo (ZifRepos *repos,ZifState *state,GError **error); ZifStoreRemote * zif_repos_get_store (ZifRepos *repos,const gchar *id,ZifState *state,GError **error);
struct ZifReposClass {
GObjectClass parent_class;
/* Padding for future expansion */
void (*_zif_reserved1) (void);
void (*_zif_reserved2) (void);
void (*_zif_reserved3) (void);
void (*_zif_reserved4) (void);
};
typedef enum {
ZIF_REPOS_ERROR_FAILED,
ZIF_REPOS_ERROR_NO_DATA,
ZIF_REPOS_ERROR_LAST
} ZifReposError;
gboolean zif_repos_set_repos_dir (ZifRepos *repos,const gchar *repos_dir,GError **error);
Set the repository directory.
Using repos_dir set to NULL to use the value from the config file
has been supported since 0.1.3. Earlier versions will assert.
|
A ZifRepos |
|
A directory, e.g. "/etc/yum.repos.d", or NULL to use the default |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
gboolean zif_repos_load (ZifRepos *repos,ZifState *state,GError **error);
Load the repository, and parse it's config file.
|
A ZifRepos |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
GPtrArray * zif_repos_get_stores (ZifRepos *repos,ZifState *state,GError **error);
Gets the enabled and disabled remote stores.
|
A ZifRepos |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A list of ZifStore's. [element-type ZifStore][transfer container] |
Since 0.1.0
GPtrArray * zif_repos_get_stores_enabled (ZifRepos *repos,ZifState *state,GError **error);
Gets the enabled remote stores.
|
A ZifRepos |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A list of ZifStore's. [element-type ZifStore][transfer container] |
Since 0.1.0
GPtrArray * zif_repos_get_stores_debuginfo (ZifRepos *repos,ZifState *state,GError **error);
Gets the remote stores for debug packages.
|
A ZifRepos |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A list of ZifStore's. [element-type ZifStore][transfer container] |
Since 0.3.3
ZifStoreRemote * zif_repos_get_store (ZifRepos *repos,const gchar *id,ZifState *state,GError **error);
Gets the store matching the ID.
|
A ZifRepos |
|
A repository id, e.g. "fedora" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A ZifStoreRemote object, or NULL. [transfer full]
|
Since 0.1.0