zif-store-array

zif-store-array — A store-array is a container that holds one or more stores

Synopsis

GPtrArray *         zif_store_array_new                 (void);
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_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,
                                                         gchar **search,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_array_get_packages        (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);
GPtrArray *         zif_store_array_get_updates         (GPtrArray *store_array,
                                                         GPtrArray *packages,
                                                         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);

Description

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().

Details

zif_store_array_new ()

GPtrArray *         zif_store_array_new                 (void);

Returns :

A new GPtrArray class instance.

Since 0.1.0


zif_store_array_add_store ()

gboolean            zif_store_array_add_store           (GPtrArray *store_array,
                                                         ZifStore *store);

Add a single ZifStore to the GPtrArray.

store_array :

the GPtrArray of ZifStores

store :

the ZifStore to add

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_add_stores ()

gboolean            zif_store_array_add_stores          (GPtrArray *store_array,
                                                         GPtrArray *stores);

Add an array of ZifStore's to the GPtrArray.

store_array :

the GPtrArray of ZifStores

stores :

the array of ZifStore's to add

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_add_local ()

gboolean            zif_store_array_add_local           (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Convenience function to add local store to the GPtrArray.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_add_remote ()

gboolean            zif_store_array_add_remote          (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Convenience function to add remote stores to the GPtrArray.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_add_remote_enabled ()

gboolean            zif_store_array_add_remote_enabled  (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Convenience function to add enabled remote stores to the GPtrArray.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_clean ()

gboolean            zif_store_array_clean               (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Cleans the ZifStoreRemote objects by deleting cache.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_refresh ()

gboolean            zif_store_array_refresh             (GPtrArray *store_array,
                                                         gboolean force,
                                                         ZifState *state,
                                                         GError **error);

Refreshs the ZifStoreRemote objects by downloading new data

store_array :

the GPtrArray of ZifStores

force :

if the data should be re-downloaded if it's still valid

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

TRUE for success, FALSE for failure

Since 0.1.0


zif_store_array_resolve ()

GPtrArray *         zif_store_array_resolve             (GPtrArray *store_array,
                                                         gchar **search,
                                                         ZifState *state,
                                                         GError **error);

Finds packages matching the package name exactly.

store_array :

the GPtrArray of ZifStores

search :

the search term, e.g. "gnome-power-manager"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_search_name ()

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.

store_array :

the GPtrArray of ZifStores

search :

the search term, e.g. "power"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_search_details ()

GPtrArray *         zif_store_array_search_details      (GPtrArray *store_array,
                                                         gchar **search,
                                                         ZifState *state,
                                                         GError **error);

Find packages that match some detail about the package.

store_array :

the GPtrArray of ZifStores

search :

the search term, e.g. "trouble"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_search_group ()

GPtrArray *         zif_store_array_search_group        (GPtrArray *store_array,
                                                         gchar **group_enum,
                                                         ZifState *state,
                                                         GError **error);

Find packages that belong in a specific group.

store_array :

the GPtrArray of ZifStores

group_enum :

the group enumerated value, e.g. "games"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_search_category ()

GPtrArray *         zif_store_array_search_category     (GPtrArray *store_array,
                                                         gchar **group_id,
                                                         ZifState *state,
                                                         GError **error);

Find packages that belong in a specific category.

store_array :

the GPtrArray of ZifStores

group_id :

the group id, e.g. "gnome-system-tools"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_search_file ()

GPtrArray *         zif_store_array_search_file         (GPtrArray *store_array,
                                                         gchar **search,
                                                         ZifState *state,
                                                         GError **error);

Find packages that provide the specified file.

store_array :

the GPtrArray of ZifStores

search :

the search term, e.g. "/usr/bin/gnome-power-manager"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_what_provides ()

GPtrArray *         zif_store_array_what_provides       (GPtrArray *store_array,
                                                         gchar **search,
                                                         ZifState *state,
                                                         GError **error);

Find packages that provide a specific string.

store_array :

the GPtrArray of ZifStores

search :

the search term, e.g. "gstreamer(codec-mp3)"

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_get_packages ()

GPtrArray *         zif_store_array_get_packages        (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Return all packages in the GPtrArray's.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_get_updates ()

GPtrArray *         zif_store_array_get_updates         (GPtrArray *store_array,
                                                         GPtrArray *packages,
                                                         ZifState *state,
                                                         GError **error);

Return a list of packages that are updatable.

store_array :

the GPtrArray of ZifStores

packages :

the GPtrArray of ZifPackages to check for updates

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifPackage's

Since 0.1.0


zif_store_array_find_package ()

ZifPackage *        zif_store_array_find_package        (GPtrArray *store_array,
                                                         const gchar *package_id,
                                                         ZifState *state,
                                                         GError **error);

Find a single package in the GPtrArray.

store_array :

the GPtrArray of ZifStores

package_id :

the PackageId which defines the package

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

A single ZifPackage or NULL

Since 0.1.0


zif_store_array_get_categories ()

GPtrArray *         zif_store_array_get_categories      (GPtrArray *store_array,
                                                         ZifState *state,
                                                         GError **error);

Return a list of custom categories from all repos.

store_array :

the GPtrArray of ZifStores

state :

a ZifState to use for progress reporting

error :

a GError which is used on failure, or NULL

Returns :

an array of ZifCategory's

Since 0.1.0