ZIF Reference Manual | ||||
---|---|---|---|---|
Top | Description |
GPtrArray * zif_store_array_new (void
); ZifStore * zif_store_array_find_by_id (GPtrArray *store_array
,const gchar *id
); gboolean zif_store_array_add_store (GPtrArray *store_array
,ZifStore *store
); gboolean zif_store_array_add_stores (GPtrArray *store_array
,GPtrArray *stores
); gboolean zif_store_array_add_local (GPtrArray *store_array
,ZifState *state
,GError **error
); gboolean zif_store_array_add_remote (GPtrArray *store_array
,ZifState *state
,GError **error
); gboolean zif_store_array_add_remote_enabled (GPtrArray *store_array
,ZifState *state
,GError **error
); gboolean zif_store_array_clean (GPtrArray *store_array
,ZifState *state
,GError **error
); gboolean zif_store_array_refresh (GPtrArray *store_array
,gboolean force
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_resolve (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_resolve_full (GPtrArray *store_array
,gchar **search
,ZifStoreResolveFlags flags
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_search_name (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_search_details (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_search_group (GPtrArray *store_array
,gchar **group_enum
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_search_category (GPtrArray *store_array
,gchar **group_id
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_search_file (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_what_provides (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_what_requires (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_what_obsoletes (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_what_conflicts (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_get_packages (GPtrArray *store_array
,ZifState *state
,GError **error
); ZifPackage * zif_store_array_find_package (GPtrArray *store_array
,const gchar *package_id
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_get_categories (GPtrArray *store_array
,ZifState *state
,GError **error
); GPtrArray * zif_store_array_get_updates (GPtrArray *store_array
,ZifStore *store_local
,ZifState *state
,GError **error
);
A GPtrArray is the container where ZifStore's are kept. Global operations can be done on the array and not the indervidual stores.
IMPORTANT: any errors that happen on the ZifStores are fatal unless you're
using zif_state_set_error_handler()
.
GPtrArray * zif_store_array_new (void
);
Returns : |
A new GPtrArray instance. [element-type ZifStore][transfer container] |
Since 0.1.0
ZifStore * zif_store_array_find_by_id (GPtrArray *store_array
,const gchar *id
);
Finds a single ZifStore in the GPtrArray.
|
An array of ZifStores. [element-type ZifStore] |
|
The ID of the ZifStore, e.g. 'fedora-debuginfo' |
Returns : |
a ZifStore for success, NULL otherwise. [transfer none]
|
Since 0.3.4
gboolean zif_store_array_add_store (GPtrArray *store_array
,ZifStore *store
);
Add a single ZifStore to the GPtrArray if it does not already exist.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifStore to add |
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
gboolean zif_store_array_add_stores (GPtrArray *store_array
,GPtrArray *stores
);
Add an array of ZifStore's to the GPtrArray.
|
An array of ZifStores. [element-type ZifStore] |
|
An a rray of ZifStore's to add |
Returns : |
TRUE for success, FALSE otherwise |
Since 0.1.0
gboolean zif_store_array_add_local (GPtrArray *store_array
,ZifState *state
,GError **error
);
Convenience function to add local store to the GPtrArray.
|
An array of ZifStores. [element-type 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_array_add_remote (GPtrArray *store_array
,ZifState *state
,GError **error
);
Convenience function to add remote stores to the GPtrArray.
|
An array of ZifStores. [element-type 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_array_add_remote_enabled (GPtrArray *store_array
,ZifState *state
,GError **error
);
Convenience function to add enabled remote stores to the GPtrArray.
|
An array of ZifStores. [element-type 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_array_clean (GPtrArray *store_array
,ZifState *state
,GError **error
);
Cleans the ZifStoreRemote objects by deleting cache.
|
An array of ZifStores. [element-type 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_array_refresh (GPtrArray *store_array
,gboolean force
,ZifState *state
,GError **error
);
Refreshes the ZifStoreRemote objects by downloading new data
|
An array of ZifStores. [element-type 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_array_resolve (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
);
Finds packages matching the package name exactly.
|
An array of ZifStores. [element-type ZifStore] |
|
The search terms, e.g. "gnome-power-manager". [array zero-terminated=1][element-type utf8] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_resolve_full (GPtrArray *store_array
,gchar **search
,ZifStoreResolveFlags flags
,ZifState *state
,GError **error
);
Finds packages matching the package in a certain way, for instance matching the name, the name.arch or even the name-version depending on the flags used..
|
An array of ZifStores. [element-type ZifStore] |
|
The search terms, e.g. "gnome-power-manager". [array zero-terminated=1][element-type utf8] |
|
A bitfield of ZifStoreResolveFlags , e.g. ZIF_STORE_RESOLVE_FLAG_USE_NAME_ARCH
|
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.2.4
GPtrArray * zif_store_array_search_name (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
);
Find packages that match the package name in some part.
|
An array of ZifStores. [element-type ZifStore] |
|
The search terms, e.g. "power". [array zero-terminated=1][element-type utf8] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_search_details (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
);
Find packages that match some detail about the package.
|
An array of ZifStores. [element-type ZifStore] |
|
The search terms, e.g. "trouble". [array zero-terminated=1][element-type utf8] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_search_group (GPtrArray *store_array
,gchar **group_enum
,ZifState *state
,GError **error
);
Find packages that belong in a specific group.
|
An array of ZifStores. [element-type ZifStore] |
|
The group enumerated values, e.g. "games" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_search_category (GPtrArray *store_array
,gchar **group_id
,ZifState *state
,GError **error
);
Find packages that belong in a specific category.
|
An array of ZifStores. [element-type ZifStore] |
|
A group id, e.g. "gnome-system-tools" |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_search_file (GPtrArray *store_array
,gchar **search
,ZifState *state
,GError **error
);
Find packages that provide the specified file.
|
An array of ZifStores. [element-type ZifStore] |
|
The search terms, e.g. "/usr/bin/gnome-power-manager". [array zero-terminated=1][element-type utf8] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_what_provides (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that provide a specific string.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifDepend to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.3
GPtrArray * zif_store_array_what_requires (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that require a specific string.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifDepend to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.3
GPtrArray * zif_store_array_what_obsoletes (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that conflict with a specific string.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifDepend to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.3
GPtrArray * zif_store_array_what_conflicts (GPtrArray *store_array
,GPtrArray *depends
,ZifState *state
,GError **error
);
Find packages that conflict with a specific string.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifDepend to search for |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.3
GPtrArray * zif_store_array_get_packages (GPtrArray *store_array
,ZifState *state
,GError **error
);
Return all packages in the GPtrArray's.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifPackage's. [element-type ZifPackage][transfer container] |
Since 0.1.0
ZifPackage * zif_store_array_find_package (GPtrArray *store_array
,const gchar *package_id
,ZifState *state
,GError **error
);
Find a single package in the GPtrArray.
|
An array of ZifStores. [element-type ZifStore] |
|
A PackageId which defines the package |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
A single ZifPackage or NULL . [transfer full]
|
Since 0.1.0
GPtrArray * zif_store_array_get_categories (GPtrArray *store_array
,ZifState *state
,GError **error
);
Return a list of custom categories from all repos.
|
An array of ZifStores. [element-type ZifStore] |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of ZifCategory's. [element-type ZifCategory][transfer container] |
Since 0.1.0
GPtrArray * zif_store_array_get_updates (GPtrArray *store_array
,ZifStore *store_local
,ZifState *state
,GError **error
);
Gets the list of packages that can be updated to newer versions.
|
An array of ZifStores. [element-type ZifStore] |
|
The ZifStoreLocal to use for the installed packages |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
An array of the *new* ZifPackage's, not the existing installed packages that are going to be updated. Note: this is a convenience function which makes a few assumptions. [element-type ZifPackage][transfer container] |
Since 0.2.1