![]() |
![]() |
![]() |
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_ERROR #define PK_TASK_TYPE_ERROR PkTaskPrivate; PkTask; GQuark pk_task_error_quark (void); PkTask * pk_task_new (void); void pk_task_test (gpointer user_data); PkResults * pk_task_generic_finish (PkTask *task, GAsyncResult *res, GError **error); void pk_task_install_packages_async (PkTask *task, gchar **package_ids, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback, gpointer user_data); void pk_task_update_packages_async (PkTask *task, gchar **package_ids, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback_ready, gpointer user_data); void pk_task_remove_packages_async (PkTask *task, gchar **package_ids, gboolean allow_deps, gboolean autoremove, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback_ready, gpointer user_data); void pk_task_install_files_async (PkTask *task, gchar **files, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback_ready, gpointer user_data); void pk_task_update_system_async (PkTask *task, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback_ready, gpointer user_data); gboolean pk_task_user_accepted (PkTask *task, guint request); gboolean pk_task_user_declined (PkTask *task, guint request);
PkResults * pk_task_generic_finish (PkTask *task, GAsyncResult *res, GError **error);
Gets the result from the asynchronous function.
|
a valid PkTask instance |
|
the GAsyncResult |
|
A GError or NULL
|
Returns : |
TRUE for success
|
Since 0.5.2
void pk_task_install_packages_async (PkTask *task, gchar **package_ids, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback, 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" |
|
a GCancellable or NULL
|
|
the function to run when the progress changes |
|
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_update_packages_async (PkTask *task, gchar **package_ids, GCancellable *cancellable, PkProgressCallback 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" |
|
a GCancellable or NULL
|
|
the function to run when the progress changes |
|
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_remove_packages_async (PkTask *task, gchar **package_ids, gboolean allow_deps, gboolean autoremove, GCancellable *cancellable, PkProgressCallback progress_callback, gpointer progress_user_data, GAsyncReadyCallback callback_ready, gpointer user_data);
Remove a package (optionally with dependancies) from the system.
If allow_deps
is set to FALSE
, and other packages would have to be removed,
then the transaction would fail.
|
a valid PkTask instance |
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora" |
|
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 GCancellable or NULL
|
|
the function to run when the progress changes |
|
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_files_async (PkTask *task, gchar **files, GCancellable *cancellable, PkProgressCallback 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" |
|
a GCancellable or NULL
|
|
the function to run when the progress changes |
|
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 *cancellable, PkProgressCallback 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 GCancellable or NULL
|
|
the function to run when the progress changes |
|
data to pass to progress_callback
|
|
the function to run on completion |
|
the data to pass to callback_ready
|
Since 0.5.2
gboolean pk_task_user_accepted (PkTask *task, guint request);
|
|
|
|
Returns : |
Since 0.5.2