Top |
A package sack is a set of packages that can have operations done on them in parallel. This might be adding summary text for bare package ID's, or to add package or update details.
gboolean (*PkPackageSackFilterFunc) (PkPackage *package
,gpointer user_data
);
Function to filter packages in PkPackageSack.
void
pk_package_sack_clear (PkPackageSack *sack
);
Empty all the packages from the sack
Since: 0.5.2
gchar **
pk_package_sack_get_ids (PkPackageSack *sack
);
Returns all the Package IDs in the sack
Since: 0.5.3
guint
pk_package_sack_get_size (PkPackageSack *sack
);
Gets the number of packages in the sack
Since: 0.5.2
GPtrArray *
pk_package_sack_get_array (PkPackageSack *sack
);
Gets the package array from the sack
Since: 0.6.1
void pk_package_sack_sort (PkPackageSack *sack
,PkPackageSackSortType type
);
Sorts the package sack
sack |
a valid PkPackageSack instance |
|
type |
the type of sorting, e.g. PK_PACKAGE_SACK_SORT_TYPE_NAME |
Since: 0.6.1
gboolean pk_package_sack_add_package (PkPackageSack *sack
,PkPackage *package
);
Adds a package to the sack.
Since: 0.5.2
gboolean pk_package_sack_add_package_by_id (PkPackageSack *sack
,const gchar *package_id
,GError **error
);
Adds a package reference to the sack.
Since: 0.5.2
gboolean pk_package_sack_add_packages_from_file (PkPackageSack *sack
,GFile *file
,GError **error
);
Adds packages from package-list file to a PkPackageSack.
gboolean pk_package_sack_to_file (PkPackageSack *sack
,GFile *file
,GError **error
);
Write the contents of a PkPackageSack to a package-list file.
Since: 0.8.6
gboolean pk_package_sack_remove_package (PkPackageSack *sack
,PkPackage *package
);
Removes a package reference from the sack. The pointers have to match exactly.
Since: 0.5.2
gboolean pk_package_sack_remove_package_by_id (PkPackageSack *sack
,const gchar *package_id
);
Removes a package reference from the sack. As soon as one package is removed the search is stopped.
Since: 0.5.2
gboolean pk_package_sack_remove_by_filter (PkPackageSack *sack
,PkPackageSackFilterFunc filter_cb
,gpointer user_data
);
Removes from the package sack any packages that return FALSE
from the filter
function.
sack |
a valid PkPackageSack instance |
|
filter_cb |
a PkPackageSackFilterFunc, which returns |
[scope call] |
user_data |
user data to pass to |
Since: 0.6.3
PkPackage * pk_package_sack_find_by_id (PkPackageSack *sack
,const gchar *package_id
);
Finds a package in a sack from reference. As soon as one package is found the search is stopped.
Since: 0.5.2
PkPackage * pk_package_sack_find_by_id_name_arch (PkPackageSack *sack
,const gchar *package_id
);
Finds a package in a sack by package name and architecture. As soon as one package is found the search is stopped.
Since: 0.8.16
PkPackageSack * pk_package_sack_filter_by_info (PkPackageSack *sack
,PkInfoEnum info
);
Returns a new package sack which only matches packages that match the specified info enum value.
Since: 0.6.2
PkPackageSack * pk_package_sack_filter (PkPackageSack *sack
,PkPackageSackFilterFunc filter_cb
,gpointer user_data
);
Returns a new package sack which only matches packages that return TRUE
from the filter function.
sack |
a valid PkPackageSack instance |
|
filter_cb |
a PkPackageSackFilterFunc, which returns |
[scope call] |
user_data |
user data to pass to |
Since: 0.6.3
guint64
pk_package_sack_get_total_bytes (PkPackageSack *sack
);
Gets the total size of the package sack in bytes.
Since: 0.5.2
gboolean pk_package_sack_merge_generic_finish (PkPackageSack *sack
,GAsyncResult *res
,GError **error
);
Gets the result from the asynchronous function.
Since: 0.5.2
gboolean pk_package_sack_resolve (PkPackageSack *package_sack
,GCancellable *cancellable
,GError **error
);
Gets the properties the daemon supports. Warning: this function is synchronous, and may block. Do not use it in GUI applications.
Since: 0.6.0
void pk_package_sack_resolve_async (PkPackageSack *sack
,GCancellable *cancellable
,PkProgressCallback progress_callback
,gpointer progress_user_data
,GAsyncReadyCallback callback
,gpointer user_data
);
Merges in details about packages using resolve.
sack |
a valid PkPackageSack instance |
|
cancellable |
a GCancellable or |
|
progress_callback |
the function to run when the progress changes. |
[scope notified] |
progress_user_data |
data to pass to |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.5.2
gboolean pk_package_sack_get_details (PkPackageSack *package_sack
,GCancellable *cancellable
,GError **error
);
Gets the properties the daemon supports. Warning: this function is synchronous, and may block. Do not use it in GUI applications.
Since: 0.6.0
void pk_package_sack_get_details_async (PkPackageSack *sack
,GCancellable *cancellable
,PkProgressCallback progress_callback
,gpointer progress_user_data
,GAsyncReadyCallback callback
,gpointer user_data
);
Merges in details about packages.
sack |
a valid PkPackageSack instance |
|
cancellable |
a GCancellable or |
|
progress_callback |
the function to run when the progress changes. |
[scope notified] |
progress_user_data |
data to pass to |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
gboolean pk_package_sack_get_update_detail (PkPackageSack *package_sack
,GCancellable *cancellable
,GError **error
);
Gets the properties the daemon supports. Warning: this function is synchronous, and may block. Do not use it in GUI applications.
Since: 0.6.0
void pk_package_sack_get_update_detail_async (PkPackageSack *sack
,GCancellable *cancellable
,PkProgressCallback progress_callback
,gpointer progress_user_data
,GAsyncReadyCallback callback
,gpointer user_data
);
Merges in update details about packages.
sack |
a valid PkPackageSack instance |
|
cancellable |
a GCancellable or |
|
progress_callback |
the function to run when the progress changes. |
[scope notified] |
progress_user_data |
data to pass to |
|
callback |
the function to run on completion |
|
user_data |
the data to pass to |
Since: 0.5.2