![]() |
![]() |
![]() |
ZIF Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define ZIF_STORE_ERROR struct ZifStore; struct ZifStoreClass; enum ZifStoreError; GQuark zif_store_error_quark (void
); ZifStore * zif_store_new (void
); gboolean zif_store_add_package (ZifStore *store
,ZifPackage *package
,GError **error
); gboolean zif_store_add_packages (ZifStore *store
,GPtrArray *array
,GError **error
); gboolean zif_store_remove_package (ZifStore *store
,ZifPackage *package
,GError **error
); gboolean zif_store_remove_packages (ZifStore *store
,GPtrArray *array
,GError **error
); gboolean zif_store_load (ZifStore *store
,ZifState *state
,GError **error
); gboolean zif_store_unload (ZifStore *store
,GError **error
); gboolean zif_store_clean (ZifStore *store
,ZifState *state
,GError **error
); gboolean zif_store_refresh (ZifStore *store
,gboolean force
,ZifState *state
,GError **error
); GPtrArray * zif_store_search_name (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_search_category (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_search_details (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_search_group (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_search_file (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_resolve (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_what_provides (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_what_requires (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_what_obsoletes (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_what_conflicts (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_get_packages (ZifStore *store
,ZifState *state
,GError **error
); ZifPackage * zif_store_find_package (ZifStore *store
,const gchar *package_id
,ZifState *state
,GError **error
); GPtrArray * zif_store_get_categories (ZifStore *store
,ZifState *state
,GError **error
); const gchar * zif_store_get_id (ZifStore *store
); void zif_store_print (ZifStore *store
); gboolean zif_store_get_enabled (ZifStore *store
); void zif_store_set_enabled (ZifStore *store
,gboolean enabled
); ZifStorePrivate;
struct ZifStoreClass { GObjectClass parent_class; /* vtable */ gboolean (*load) (ZifStore *store, ZifState *state, GError **error); gboolean (*clean) (ZifStore *store, ZifState *state, GError **error); gboolean (*refresh) (ZifStore *store, gboolean force, ZifState *state, GError **error); GPtrArray *(*search_name) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*search_category) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*search_details) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*search_group) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*search_file) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*resolve) (ZifStore *store, gchar **search, ZifState *state, GError **error); GPtrArray *(*what_provides) (ZifStore *store, GPtrArray *depends, ZifState *state, GError **error); GPtrArray *(*what_requires) (ZifStore *store, GPtrArray *depends, ZifState *state, GError **error); GPtrArray *(*what_obsoletes) (ZifStore *store, GPtrArray *depends, ZifState *state, GError **error); GPtrArray *(*what_conflicts) (ZifStore *store, GPtrArray *depends, ZifState *state, GError **error); GPtrArray *(*get_packages) (ZifStore *store, ZifState *state, GError **error); ZifPackage *(*find_package) (ZifStore *store, const gchar *package_id, ZifState *state, GError **error); GPtrArray *(*get_categories) (ZifStore *store, ZifState *state, GError **error); const gchar *(*get_id) (ZifStore *store); void (*print) (ZifStore *store); };
typedef enum { ZIF_STORE_ERROR_FAILED, ZIF_STORE_ERROR_FAILED_AS_OFFLINE, ZIF_STORE_ERROR_FAILED_TO_FIND, ZIF_STORE_ERROR_FAILED_TO_DOWNLOAD, ZIF_STORE_ERROR_ARRAY_IS_EMPTY, ZIF_STORE_ERROR_NO_SUPPORT, ZIF_STORE_ERROR_NOT_LOCKED, ZIF_STORE_ERROR_MULTIPLE_MATCHES, ZIF_STORE_ERROR_RECOVERABLE, ZIF_STORE_ERROR_LAST } ZifStoreError;
gboolean zif_store_add_package (ZifStore *store
,ZifPackage *package
,GError **error
);
Adds a package to the store.
|
A ZifStore |
|
A ZifPackage |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.6
gboolean zif_store_add_packages (ZifStore *store
,GPtrArray *array
,GError **error
);
Adds an array of packages to the store.
|
A ZifStore |
|
Array of ZifPackage's |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.6
gboolean zif_store_remove_package (ZifStore *store
,ZifPackage *package
,GError **error
);
Removes a package from the store.
|
A ZifStore |
|
A ZifPackage |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.6
gboolean zif_store_remove_packages (ZifStore *store
,GPtrArray *array
,GError **error
);
Removes an array of packages from the store.
|
A ZifStore |
|
Array of ZifPackage's |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.6
gboolean zif_store_load (ZifStore *store
,ZifState *state
,GError **error
);
Loads the ZifStore object.
|
A ZifStore |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
gboolean zif_store_unload (ZifStore *store
,GError **error
);
Unloads the ZifStore object.
Since 0.1.6
gboolean zif_store_clean (ZifStore *store
,ZifState *state
,GError **error
);
Cleans the ZifStore objects by deleting cache.
|
A ZifStore |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
gboolean zif_store_refresh (ZifStore *store
,gboolean force
,ZifState *state
,GError **error
);
refresh the ZifStore objects by downloading new data if required.
|
A ZifStore |
|
If the data should be re-downloaded if it's still valid |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
GPtrArray * zif_store_search_name (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Find packages that match the package name in some part.
|
A ZifStore |
|
A search term, e.g. "power" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_search_category (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Return packages in a specific category.
|
A ZifStore |
|
A search term, e.g. "gnome/games" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_search_details (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Find packages that match some detail about the package.
|
A ZifStore |
|
A search term, e.g. "trouble" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_search_group (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Find packages that belong in a specific group.
|
A ZifStore |
|
A search term, e.g. "games" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_search_file (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Find packages that provide the specified file.
|
A ZifStore |
|
A search term, e.g. "/usr/bin/gnome-power-manager" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_resolve (ZifStore *store
,gchar **search
,ZifState *state
,GError **error
);
Finds packages matching the package name exactly.
|
A ZifStore |
|
A search term, e.g. "gnome-power-manager" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
GPtrArray * zif_store_what_provides (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that provide a specific string.
|
A ZifStore |
|
An array of ZifDepend's to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.3
GPtrArray * zif_store_what_requires (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that provide a specific string.
|
A ZifStore |
|
An array of ZifDepend's to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.3
GPtrArray * zif_store_what_obsoletes (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that obsolete a specific string.
|
A ZifStore |
|
An array of ZifDepend's to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.3
GPtrArray * zif_store_what_conflicts (ZifStore *store
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that conflict a specific string.
|
A ZifStore |
|
An array of ZifDepend's to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.3
GPtrArray * zif_store_get_packages (ZifStore *store
,ZifState *state
,GError **error
);
Return all packages in the ZifStore's.
|
A ZifStore |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's |
Since 0.1.0
ZifPackage * zif_store_find_package (ZifStore *store
,const gchar *package_id
,ZifState *state
,GError **error
);
Find a single package in the ZifStore.
|
A ZifStore |
|
A package ID which defines the package |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A single ZifPackage or NULL . Use g_object_unref when done() . |
Since 0.1.0
GPtrArray * zif_store_get_categories (ZifStore *store
,ZifState *state
,GError **error
);
Return a list of custom categories.
|
A ZifStore |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifCategory's, free with g_ptr_array_unref() when done. |
Since 0.1.0
const gchar * zif_store_get_id (ZifStore *store
);
Gets the id for the object.
Since 0.1.0
void zif_store_print (ZifStore *store
);
Prints all the objects in the store.
|
A ZifStore |
Since 0.1.0
gboolean zif_store_get_enabled (ZifStore *store
);
Gets if the store is enabled at runtime.
|
A ZifStore |
Since 0.2.2
void zif_store_set_enabled (ZifStore *store
,gboolean enabled
);
Sets the store runtime enabled state.
NOTE: this will not change results if the store has already been
referenced, but will stop the store showing up in the results from
zif_repos_get_stores_enabled()
.
|
A ZifStore |
|
The new value |
Since 0.2.2