ZIF Reference Manual | ||||
---|---|---|---|---|
Top | Description |
GPtrArray * zif_package_array_new (void
); ZifPackage * zif_package_array_get_newest (GPtrArray *array
,GError **error
); ZifPackage * zif_package_array_get_oldest (GPtrArray *array
,GError **error
); gboolean zif_package_array_download (GPtrArray *packages
,const gchar *directory
,ZifState *state
,GError **error
); gboolean zif_package_array_filter_newest (GPtrArray *packages
); void zif_package_array_filter_best_arch (GPtrArray *array
,const gchar *arch
); void zif_package_array_filter_arch (GPtrArray *array
,const gchar *arch
); void zif_package_array_filter_duplicates (GPtrArray *packages
); ZifPackage * zif_package_array_find (GPtrArray *array
,const gchar *package_id
,GError **error
);
GPtrArray * zif_package_array_new (void
);
Returns : |
A new GPtrArray instance. [element-type ZifPackage][transfer container] |
Since 0.1.3
ZifPackage * zif_package_array_get_newest (GPtrArray *array
,GError **error
);
Returns the newest package from a list. The package name is not used when calculating the newest package.
|
Array of ZifPackage 's. [element-type ZifPackage]
|
|
A GError, or NULL
|
Returns : |
A single ZifPackage , or NULL in the case of an error.
The returned object should be freed with g_object_unref() when no
longer needed. [transfer full]
|
Since 0.1.0
ZifPackage * zif_package_array_get_oldest (GPtrArray *array
,GError **error
);
Returns the oldest package from a list.
|
Array of ZifPackage 's. [element-type ZifPackage]
|
|
A GError, or NULL
|
Returns : |
A single ZifPackage , or NULL in the case of an error.
The returned object should be freed with g_object_unref() when no
longer needed. [transfer full]
|
Since 0.1.3
gboolean zif_package_array_download (GPtrArray *packages
,const gchar *directory
,ZifState *state
,GError **error
);
Downloads a list of packages.
|
array of ZifPackage 's |
|
A local directory to save to, or NULL to use the package cache |
|
A ZifState to use for progress reporting |
|
A GError, or NULL
|
Returns : |
TRUE for success, FALSE otherwise |
Since 0.2.5
gboolean zif_package_array_filter_newest (GPtrArray *packages
);
Filters the list so that only the newest version of a package remains.
|
array of ZifPackage 's |
Returns : |
TRUE if the array was modified |
Since 0.1.0
void zif_package_array_filter_best_arch (GPtrArray *array
,const gchar *arch
);
Filters the array so that only the best version of a package remains.
If we have the following packages: - glibc.i386 - hal.i386 - glibc.i686
Then we output: - glibc.i686
|
Array of ZifPackage 's. [element-type ZifPackage]
|
Since 0.2.1
void zif_package_array_filter_arch (GPtrArray *array
,const gchar *arch
);
Filters the array so that only the matching arch of a package remains.
|
Array of ZifPackage 's. [element-type ZifPackage]
|
|
architecture string, e.g. "i486" |
Since 0.1.3
void zif_package_array_filter_duplicates (GPtrArray *packages
);
Filters the list for duplicates.
|
array of ZifPackage 's |
Since 0.2.1
ZifPackage * zif_package_array_find (GPtrArray *array
,const gchar *package_id
,GError **error
);
Finds a package from an array.
|
Array of ZifPackage 's. [element-type ZifPackage]
|
|
A GError, or NULL
|
|
A GError, or NULL
|
Returns : |
A single ZifPackage , or NULL in the case of an error.
The returned object should be freed with g_object_unref() when no
longer needed. [transfer full]
|
Since 0.2.1