|
|
|
|
PackageKit Reference Manual |
|
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#define
PK_CLIENT_ERROR
#define
PK_CLIENT_TYPE_ERROR
enum
PkClientError
;
PkClientPrivate
;
PkClient
;
GQuark
pk_client_error_quark
(
void
);
PkClient
*
pk_client_new
(
void
);
void
pk_client_test
(
gpointer
user_data
);
PkResults
*
pk_client_generic_finish
(
PkClient
*client
,
GAsyncResult
*res
,
GError
**error
);
void
pk_client_resolve_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**packages
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_search_names_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_search_details_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_search_groups_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_search_files_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_details_async
(
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_update_detail_async
(
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_download_packages_async
(
PkClient
*client
,
gchar
**package_ids
,
const
gchar
*directory
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_updates_async
(
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_old_transactions_async
(
PkClient
*client
,
guint
number
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_update_system_async
(
PkClient
*client
,
gboolean
only_trusted
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_depends_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**package_ids
,
gboolean
recursive
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_packages_async
(
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_requires_async
(
PkClient
*client
,
PkBitfield
filters
,
gchar
**package_ids
,
gboolean
recursive
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_what_provides_async
(
PkClient
*client
,
PkBitfield
filters
,
PkProvidesEnum
provides
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_distro_upgrades_async
(
PkClient
*client
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_files_async
(
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_categories_async
(
PkClient
*client
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_remove_packages_async
(
PkClient
*client
,
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_client_refresh_cache_async
(
PkClient
*client
,
gboolean
force
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_install_packages_async
(
PkClient
*client
,
gboolean
only_trusted
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_install_signature_async
(
PkClient
*client
,
PkSigTypeEnum
type
,
const
gchar
*key_id
,
const
gchar
*package_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_update_packages_async
(
PkClient
*client
,
gboolean
only_trusted
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_install_files_async
(
PkClient
*client
,
gboolean
only_trusted
,
gchar
**files
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_accept_eula_async
(
PkClient
*client
,
const
gchar
*eula_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_rollback_async
(
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_get_repo_list_async
(
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_repo_enable_async
(
PkClient
*client
,
const
gchar
*repo_id
,
gboolean
enabled
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_repo_set_data_async
(
PkClient
*client
,
const
gchar
*repo_id
,
const
gchar
*parameter
,
const
gchar
*value
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_simulate_install_files_async
(
PkClient
*client
,
gchar
**files
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_simulate_install_packages_async
(
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_simulate_remove_packages_async
(
PkClient
*client
,
gchar
**package_ids
,
gboolean
autoremove
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_simulate_update_packages_async
(
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
void
pk_client_adopt_async
(
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
PkProgress
*
pk_client_get_progress_finish
(
PkClient
*client
,
GAsyncResult
*res
,
GError
**error
);
void
pk_client_get_progress_async
(
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
"
background
"
gboolean
: Read / Write "
idle
"
gboolean
: Read "
interactive
"
gboolean
: Read / Write "
locale
"
gchar
* : Read / Write
A GObject to use for accessing PackageKit asynchronously. If you'reusing PkClient to install, remove, or update packages, be prepared thatthe eula, gpg and trusted callbacks need to be rescheduled manually, as inhttp://www.packagekit.org/gtk-doc/introduction-ideas-transactions.html
typedef enum{PK_CLIENT_ERROR_FAILED,PK_CLIENT_ERROR_FAILED_AUTH,PK_CLIENT_ERROR_NO_TID,PK_CLIENT_ERROR_ALREADY_TID,PK_CLIENT_ERROR_ROLE_UNKNOWN,PK_CLIENT_ERROR_CANNOT_START_DAEMON,PK_CLIENT_ERROR_INVALID_INPUT,PK_CLIENT_ERROR_INVALID_FILE,PK_CLIENT_ERROR_NOT_SUPPORTED,PK_CLIENT_ERROR_DECLINED_SIMULATION,/* we define this so we can punt the PkErrorEnums here */PK_CLIENT_ERROR_LAST} PkClientError;
Errors that can be thrown
| the transaction failed for an unknown reason | |
| the transaction id was not pre-allocated (internal error) | |
| the transaction id has already been used (internal error) | |
| the role was not set (internal error) | |
| the package_id is invalid | |
| the file is invalid | |
| the action is not supported | |
| the simulation was declined by the user | |
GQuark
pk_client_error_quark (
void
);
|
Returns : |
Our personal error quark. |
Since 0.5.2
PkClient
* pk_client_new (
void
);
PkClient is a nice GObject wrapper for PackageKit and makes writingfrontends easy.
|
Returns : |
A new
PkClient
instance
|
Since 0.5.2
PkResults
* pk_client_generic_finish (
PkClient
*client
,
GAsyncResult
*res
,
GError
**error
);
Gets the result from the asynchronous function.
|
|
a valid PkClient instance |
|
|
the GAsyncResult |
|
|
A
GError
or
NULL
|
|
Returns : |
the
PkResults
, or
NULL
. Free with
g_object_unref()
|
Since 0.5.2
void
pk_client_resolve_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**packages
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Resolve a package name into a
package_id
. This can return installed andavailable packages and allows you find out if a package is installed locallyor is available in a repository.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
an array of package names to resolve, e.g. "gnome-system-tools" |
|
|
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_client_search_names_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Search all the locally installed files and remote repositories for a packagethat matches a specific name.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
free text to search for, for instance, "power" |
|
|
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.5
void
pk_client_search_details_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Search all detailed summary information to try and find a keyword.Think of this as
pk_client_search_names()
, but trying much harder andtaking longer.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
free text to search for, for instance, "power" |
|
|
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.5
void
pk_client_search_groups_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Return all packages in a specific group.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
a group enum to search for, for instance, "system-tools" |
|
|
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.5
void
pk_client_search_files_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Search for packages that provide a specific file.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
file to search for, for instance, "/sbin/service" |
|
|
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.5
void
pk_client_get_details_async (
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get details of a package, so more information can be obtained for GUIor command line tools.
|
|
a valid PkClient 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_client_get_update_detail_async (
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get details about the specific update, for instance any CVE urls andseverity information.
|
|
a valid PkClient 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_client_download_packages_async (
PkClient
*client
,
gchar
**package_ids
,
const
gchar
*directory
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Downloads package files to a specified location.
|
|
a valid PkClient instance |
|
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora" |
|
|
the location where packages are to be downloaded |
|
|
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_client_get_updates_async (
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get a list of all the packages that can be updated for all repositories.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_DEVEL
or
PK_FILTER_ENUM_NONE
|
|
|
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_client_get_old_transactions_async (
PkClient
*client
,
guint
number
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the old transaction list, mainly used for the rollback viewer.
|
|
a valid PkClient instance |
|
|
the number of past transactions to return, or 0 for all |
|
|
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_client_update_system_async (
PkClient
*client
,
gboolean
only_trusted
,
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 allrepositories.NOTE: you can't choose what repositories to update from, but you can do:-
pk_client_repo_disable()
-
pk_client_update_system()
-
pk_client_repo_enable()
|
|
a valid PkClient instance |
|
|
only trusted packages should be installed |
|
|
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_client_get_depends_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**package_ids
,
gboolean
recursive
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the packages that depend this one, i.e. child->parent.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora" |
|
|
If we should search recursively for depends |
|
|
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_client_get_packages_async (
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the list of packages from the backend
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
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_client_get_requires_async (
PkClient
*client
,
PkBitfield
filters
,
gchar
**package_ids
,
gboolean
recursive
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the packages that require this one, i.e. parent->child.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora" |
|
|
If we should search recursively for requires |
|
|
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_client_what_provides_async (
PkClient
*client
,
PkBitfield
filters
,
PkProvidesEnum
provides
,
gchar
**values
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
This should return packages that provide the supplied attributes.This method is useful for finding out what package(s) provide a modaliasor GStreamer codec string.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_GUI
|
PK_FILTER_ENUM_FREE
or
PK_FILTER_ENUM_NONE
|
|
|
a PkProvidesEnum value such as PK_PROVIDES_ENUM_CODEC |
|
|
a search term such as "sound/mp3" |
|
|
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_client_get_distro_upgrades_async (
PkClient
*client
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
This method should return a list of distribution upgrades that are available.It should not return updates, only major upgrades.
|
|
a valid PkClient 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
void
pk_client_get_files_async (
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the file list (i.e. a list of files installed) for the specified package.
|
|
a valid PkClient 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_client_get_categories_async (
PkClient
*client
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get a list of all categories supported.
|
|
a valid PkClient 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
void
pk_client_remove_packages_async (
PkClient
*client
,
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 PkClient 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_client_refresh_cache_async (
PkClient
*client
,
gboolean
force
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Refresh the cache, i.e. download new metadata from a remote URL so thatpackage lists are up to date.This action may take a few minutes and should be done when the session andsystem are idle.
|
|
a valid PkClient instance |
|
|
if we should aggressively drop caches |
|
|
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_client_install_packages_async (
PkClient
*client
,
gboolean
only_trusted
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Install a package of the newest and most correct version.
|
|
a valid PkClient instance |
|
|
only trusted packages should be installed |
|
|
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_client_install_signature_async (
PkClient
*client
,
PkSigTypeEnum
type
,
const
gchar
*key_id
,
const
gchar
*package_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Install a software source signature of the newest and most correct version.
|
|
a valid PkClient instance |
|
|
the signature type, e.g.
PK_SIGTYPE_ENUM_GPG
|
|
|
a key ID such as "0df23df" |
|
|
a signature_id structure 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_client_update_packages_async (
PkClient
*client
,
gboolean
only_trusted
,
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 PkClient instance |
|
|
only trusted packages should be installed |
|
|
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_client_install_files_async (
PkClient
*client
,
gboolean
only_trusted
,
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 PkClient instance |
|
|
only trusted packages should be installed |
|
|
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_client_accept_eula_async (
PkClient
*client
,
const
gchar
*eula_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
We may want to agree to a EULA dialog if one is presented.
|
|
a valid PkClient instance |
|
|
the
eula_id
we are agreeing to
|
|
|
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_client_rollback_async (
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
We may want to agree to a EULA dialog if one is presented.
|
|
a valid PkClient instance |
|
|
the
transaction_id
we want to return to
|
|
|
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_client_get_repo_list_async (
PkClient
*client
,
PkBitfield
filters
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Get the list of repositories installed on the system.
|
|
a valid PkClient instance |
|
|
a
PkBitfield
such as
PK_FILTER_ENUM_DEVEL
or
PK_FILTER_ENUM_NONE
|
|
|
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_client_repo_enable_async (
PkClient
*client
,
const
gchar
*repo_id
,
gboolean
enabled
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Enable or disable the repository.
|
|
a valid PkClient instance |
|
|
a repo_id structure such as "livna-devel" |
|
|
if we should enable the repository |
|
|
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_client_repo_set_data_async (
PkClient
*client
,
const
gchar
*repo_id
,
const
gchar
*parameter
,
const
gchar
*value
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
We may want to set a repository parameter.NOTE: this is free text, and is left to the backend to define a format.
|
|
a valid PkClient instance |
|
|
a repo_id structure such as "livna-devel" |
|
|
the parameter to change |
|
|
what we should change it to |
|
|
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_client_simulate_install_files_async (
PkClient
*client
,
gchar
**files
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Simulate an installation of files.
|
|
a valid PkClient 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_client_simulate_install_packages_async (
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Simulate an installation of packages.
|
|
a valid PkClient 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_client_simulate_remove_packages_async (
PkClient
*client
,
gchar
**package_ids
,
gboolean
autoremove
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Simulate a removal of packages.
|
|
a valid PkClient instance |
|
|
a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora" |
|
|
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_client_simulate_update_packages_async (
PkClient
*client
,
gchar
**package_ids
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Simulate an update of packages.
|
|
a valid PkClient 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_client_adopt_async (
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
PkProgressCallback
progress_callback
,
gpointer
progress_user_data
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Adopt a transaction which allows the caller to monitor the state or cancel it.
|
|
a valid PkClient instance |
|
|
a transaction ID such as "/21_ebcbdaae_data" |
|
|
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
PkProgress
* pk_client_get_progress_finish (
PkClient
*client
,
GAsyncResult
*res
,
GError
**error
);
Gets the result from the asynchronous function.
|
|
a valid PkClient instance |
|
|
the GAsyncResult |
|
|
A
GError
or
NULL
|
|
Returns : |
the
PkProgress
, or
NULL
. Free with
g_object_unref()
|
Since 0.5.2
void
pk_client_get_progress_async (
PkClient
*client
,
const
gchar
*transaction_id
,
GCancellable
*cancellable
,
GAsyncReadyCallback
callback_ready
,
gpointer
user_data
);
Find the current state of a transaction.
|
|
a valid PkClient instance |
|
|
a transaction ID such as "/21_ebcbdaae_data" |
|
|
a
GCancellable
or
NULL
|
|
|
the function to run on completion |
|
|
the data to pass to
callback_ready
|
Since 0.5.2