| PackageKit Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
PkTaskPkTask — An abstract package task GObject, dealing with unsigned transactions, GPG keys and EULA requests. |
#define PK_TASK_TYPE_ERROR struct PkTask; struct PkTaskClass;void pk_task_download_packages_async (PkTask *task,,gchar **package_idsconst,gchar *directory,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready); PkResults * pk_task_generic_finish (gpointer user_dataPkTask *task,,GAsyncResult *res);GError **errorvoid pk_task_get_categories_async (PkTask *task,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_depends_async (PkTask *task,PkBitfield filters,,gchar **package_ids,gboolean recursive,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_details_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_files_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datagboolean pk_task_get_interactive (PkTask *task);void pk_task_get_packages_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_repo_list_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_requires_async (PkTask *task,PkBitfield filters,,gchar **package_ids,gboolean recursive,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datagboolean pk_task_get_simulate (PkTask *task);void pk_task_get_update_detail_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_get_updates_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_install_files_async (PkTask *task,,gchar **files,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_install_packages_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready); PkTask * pk_task_new (gpointer user_datavoid);void pk_task_refresh_cache_async (PkTask *task,,gboolean force,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_remove_packages_async (PkTask *task,,gchar **package_ids,gboolean allow_deps,gboolean autoremove,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_repo_enable_async (PkTask *task,const,gchar *repo_id,gboolean enabled,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_resolve_async (PkTask *task,PkBitfield filters,,gchar **packages,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_rollback_async (PkTask *task,const,gchar *transaction_id,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_search_details_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_search_files_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_search_groups_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_search_names_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_set_interactive (PkTask *task,);gboolean interactivevoid pk_task_set_simulate (PkTask *task,);gboolean simulatevoid pk_task_test ();gpointer user_datavoid pk_task_update_packages_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datavoid pk_task_update_system_async (PkTask *task,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_datagboolean pk_task_user_accepted (PkTask *task,);guint requestgboolean pk_task_user_declined (PkTask *task,);guint requestvoid pk_task_what_provides_async (PkTask *task,PkBitfield filters,PkProvidesEnum provides,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
struct PkTaskClass {
PkClientClass parent_class;
void (*untrusted_question) (PkTask *task,
guint request,
PkResults *results);
void (*key_question) (PkTask *task,
guint request,
PkResults *results);
void (*eula_question) (PkTask *task,
guint request,
PkResults *results);
void (*media_change_question) (PkTask *task,
guint request,
PkResults *results);
void (*simulate_question) (PkTask *task,
guint request,
PkResults *results);
/* padding for future expansion */
void (*_pk_reserved1) (void);
void (*_pk_reserved2) (void);
void (*_pk_reserved3) (void);
void (*_pk_reserved4) (void);
void (*_pk_reserved5) (void);
};
void pk_task_download_packages_async (PkTask *task,,gchar **package_idsconst,gchar *directory,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Downloads packages
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
the destination directory |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
PkResults * pk_task_generic_finish (PkTask *task,,GAsyncResult *res);GError **error
Gets the result from the asynchronous function.
|
a valid PkTask instance |
|
the |
|
A NULL |
Returns : |
The PkResults of the transaction. [transfer full] |
Since 0.5.2
void pk_task_get_categories_async (PkTask *task,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Get the categories available.
|
a valid PkTask instance |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_depends_async (PkTask *task,PkBitfield filters,,gchar **package_ids,gboolean recursive,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Get the list of dependant packages.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
if we should recurse to packages that depend on other packages |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_details_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Gets details about packages.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_files_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Get the files in a package.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
gboolean pk_task_get_interactive (PkTask *task);
Gets if the transaction is interactive.
|
a valid PkTask instance |
Returns : |
TRUE |
Since 0.6.10
void pk_task_get_packages_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Gets the list of packages.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_repo_list_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Get the list of available repositories.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_requires_async (PkTask *task,PkBitfield filters,,gchar **package_ids,gboolean recursive,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Get the packages this package requires.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
if we should return packages that depend on the ones we do |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
gboolean pk_task_get_simulate (PkTask *task);
Gets if we are simulating.
|
a valid PkTask instance |
Returns : |
TRUE |
Since 0.6.10
void pk_task_get_update_detail_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Gets details about updates.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_get_updates_async (PkTask *task,PkBitfield filters,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Gets the update lists.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_install_files_async (PkTask *task,,gchar **files,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Install a file locally, and get the deps from the repositories. This is useful for double clicking on a .rpm or .deb file.
|
a valid PkTask instance |
|
a file such as "/home/hughsie/Desktop/hal-devel-0.10.0.rpm". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback_ready
|
Since 0.5.2
void pk_task_install_packages_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Merges in details about packages using resolve.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
void pk_task_refresh_cache_async (PkTask *task,,gboolean force,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Refresh the package cache.
|
a valid PkTask instance |
|
if the metadata should be deleted and re-downloaded even if it is correct |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_remove_packages_async (PkTask *task,,gchar **package_ids,gboolean allow_deps,gboolean autoremove,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Remove a package (optionally with dependancies) from the system.
If allow_depsFALSE
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
if other dependant packages are allowed to be removed from the computer |
|
if other packages installed at the same time should be tried to remove |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback_ready
|
Since 0.5.2
void pk_task_repo_enable_async (PkTask *task,const,gchar *repo_id,gboolean enabled,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Enable or disable a specific repo.
|
a valid PkTask instance |
|
The software source ID |
|
TRUEFALSE |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_resolve_async (PkTask *task,PkBitfield filters,,gchar **packages,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Resolves a package name to a package-id.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
package names to find |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_rollback_async (PkTask *task,const,gchar *transaction_id,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Rollback to a previous package state.
|
a valid PkTask instance |
|
The transaction ID of the old transaction |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_search_details_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Searches for some package details.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
search values. [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_search_files_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Searches for specific files.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
search values. [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_search_groups_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Searches the group lists.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
search values. [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_search_names_async (PkTask *task,PkBitfield filters,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Searches for a package name.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
search values. [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5
void pk_task_set_interactive (PkTask *task,);gboolean interactive
Sets the interactive mode, i.e. if the user is allowed to ask questions.
|
a valid PkTask instance |
|
if we are interactive |
Since 0.6.10
void pk_task_set_simulate (PkTask *task,);gboolean simulate
If the simulate step should be run without the actual transaction.
|
a valid PkTask instance |
|
the simulate mode |
Since 0.6.10
void pk_task_update_packages_async (PkTask *task,,gchar **package_ids,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Update specific packages to the newest available versions.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora". [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback_ready
|
Since 0.5.2
void pk_task_update_system_async (PkTask *task,,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Update all the packages on the system with the highest versions found in all repositories. NOTE: you can't choose what repositories to update from, but you can do:
pk_task_repo_disable()
pk_task_update_system()
pk_task_repo_enable()
|
a valid PkTask instance |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback_ready
|
Since 0.5.2
void pk_task_what_provides_async (PkTask *task,PkBitfield filters,PkProvidesEnum provides,,gchar **values,GCancellable *cancellablePkProgressCallback progress_callback,,gpointer progress_user_data,GAsyncReadyCallback callback_ready);gpointer user_data
Find the package that provides some resource.
|
a valid PkTask instance |
|
a bitfield of filters that can be used to limit the results |
|
a PkProvidesEnum type |
|
values to search for. [array zero-terminated=1] |
|
a NULL |
|
the function to run when the progress changes. [scope call] |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.5