| PackageKit Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#define PK_RESULTS_TYPE_ERROR struct PkResults; struct PkResultsClass; PkResults * pk_results_new (void); void pk_results_test (gpointer user_data); gboolean pk_results_set_exit_code (PkResults *results,PkExitEnum exit_enum); gboolean pk_results_set_error_code (PkResults *results,PkError *item); gboolean pk_results_add_package (PkResults *results,PkPackage *item); gboolean pk_results_add_details (PkResults *results,PkDetails *item); gboolean pk_results_add_update_detail (PkResults *results,PkUpdateDetail *item); gboolean pk_results_add_category (PkResults *results,PkCategory *item); gboolean pk_results_add_distro_upgrade (PkResults *results,PkDistroUpgrade *item); gboolean pk_results_add_require_restart (PkResults *results,PkRequireRestart *item); gboolean pk_results_add_transaction (PkResults *results,PkTransactionPast *item); gboolean pk_results_add_files (PkResults *results,PkFiles *item); gboolean pk_results_add_repo_signature_required (PkResults *results,PkRepoSignatureRequired *item); gboolean pk_results_add_eula_required (PkResults *results,PkEulaRequired *item); gboolean pk_results_add_media_change_required (PkResults *results,PkMediaChangeRequired *item); gboolean pk_results_add_repo_detail (PkResults *results,PkRepoDetail *item); gboolean pk_results_add_message (PkResults *results,PkMessage *item); PkExitEnum pk_results_get_exit_code (PkResults *results); PkPackageSack * pk_results_get_package_sack (PkResults *results); PkError * pk_results_get_error_code (PkResults *results); PkRoleEnum pk_results_get_role (PkResults *results); PkBitfield pk_results_get_transaction_flags (PkResults *results); PkRestartEnum pk_results_get_require_restart_worst (PkResults *results); GPtrArray * pk_results_get_package_array (PkResults *results); GPtrArray * pk_results_get_details_array (PkResults *results); GPtrArray * pk_results_get_update_detail_array (PkResults *results); GPtrArray * pk_results_get_category_array (PkResults *results); GPtrArray * pk_results_get_distro_upgrade_array (PkResults *results); GPtrArray * pk_results_get_require_restart_array (PkResults *results); GPtrArray * pk_results_get_transaction_array (PkResults *results); GPtrArray * pk_results_get_files_array (PkResults *results); GPtrArray * pk_results_get_repo_signature_required_array (PkResults *results); GPtrArray * pk_results_get_eula_required_array (PkResults *results); GPtrArray * pk_results_get_media_change_required_array (PkResults *results); GPtrArray * pk_results_get_repo_detail_array (PkResults *results); GPtrArray * pk_results_get_message_array (PkResults *results);
"inputs" guint : Read / Write "progress" PkProgress* : Read / Write "role" guint : Read / Write "transaction-flags" guint64 : Read / Write
This GObject allows a client program to query the results sent from
PackageKit. This will include Package(), ErrorCode() and all the other types
of objects. Everything is refcounted, so ensure you unref when done with the
data.
struct PkResultsClass {
GObjectClass parent_class;
/* padding for future expansion */
void (*_pk_reserved1) (void);
void (*_pk_reserved2) (void);
void (*_pk_reserved3) (void);
void (*_pk_reserved4) (void);
void (*_pk_reserved5) (void);
};
gboolean pk_results_set_exit_code (PkResults *results,PkExitEnum exit_enum);
Sets the results object to have the given exit code.
Since 0.5.2
gboolean pk_results_set_error_code (PkResults *results,PkError *item);
Adds some error details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_package (PkResults *results,PkPackage *item);
Adds a package to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.3
gboolean pk_results_add_details (PkResults *results,PkDetails *item);
Adds some package details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_update_detail (PkResults *results,PkUpdateDetail *item);
Adds some update details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_category (PkResults *results,PkCategory *item);
Adds a category item to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_distro_upgrade (PkResults *results,PkDistroUpgrade *item);
Adds a distribution upgrade item to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_require_restart (PkResults *results,PkRequireRestart *item);
Adds a require restart item to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_transaction (PkResults *results,PkTransactionPast *item);
Adds a transaction item to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_files (PkResults *results,PkFiles *item);
Adds some files details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_repo_signature_required (PkResults *results,PkRepoSignatureRequired *item);
Adds some repository signature details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_eula_required (PkResults *results,PkEulaRequired *item);
Adds some EULA details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_media_change_required (PkResults *results,PkMediaChangeRequired *item);
Adds some media change details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_repo_detail (PkResults *results,PkRepoDetail *item);
Adds some repository details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
gboolean pk_results_add_message (PkResults *results,PkMessage *item);
Adds some message details to the results set.
|
a valid PkResults instance |
|
the object to add to the array |
Returns : |
TRUE if the value was set |
Since 0.5.2
PkExitEnum pk_results_get_exit_code (PkResults *results);
Gets the exit enum. You probably don't want to be using this function, and
instead using the much more useful pk_results_get_error_code() function.
|
a valid PkResults instance |
Returns : |
The PkExitEnum or PK_EXIT_ENUM_UNKNOWN for error or if it was not set |
Since 0.5.2
PkPackageSack * pk_results_get_package_sack (PkResults *results);
Gets a package sack from the transaction.
|
a valid PkResults instance |
Returns : |
A PkPackageSack of data, g_object_unref() to free. [transfer full]
|
Since 0.5.2
PkError * pk_results_get_error_code (PkResults *results);
Gets the last error code from the transaction.
|
a valid PkResults instance |
Returns : |
A PkError, or NULL, free with g_object_unref(). [transfer full]
|
Since 0.5.2
PkRoleEnum pk_results_get_role (PkResults *results);
Gets the role that produced these results.
|
a valid PkResults instance |
Returns : |
The PkRoleEnum or PK_ROLE_ENUM_UNKNOWN if not set |
Since 0.7.5
PkBitfield pk_results_get_transaction_flags (PkResults *results);
Gets the transaction flag for these results.
|
a valid PkResults instance |
Returns : |
The PkBitfield or 0 if not set |
Since 0.8.1
PkRestartEnum pk_results_get_require_restart_worst
(PkResults *results);
This method returns the 'worst' restart of all the transactions. It is needed as multiple sub-transactions may emit require-restart with different values, and we always want to get the most invasive of all.
For instance, if a transaction emits RequireRestart(system) and then RequireRestart(session) then pk_client_get_require_restart will return system as a session restart is implied with a system restart.
|
a valid PkResults instance |
Returns : |
a PkRestartEnum value, e.g. PK_RESTART_ENUM_SYSTEM |
Since 0.5.2
GPtrArray * pk_results_get_package_array (PkResults *results);
Gets the packages from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkPackage's, free with g_ptr_array_unref(). [element-type PkPackage][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_details_array (PkResults *results);
Gets the package details from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkDetails's, free with g_ptr_array_unref(). [element-type PkDetails][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_update_detail_array (PkResults *results);
Gets the update details from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkUpdateDetail's, free with g_ptr_array_unref(). [element-type PkUpdateDetail][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_category_array (PkResults *results);
Gets the categories from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkCategory's, free with g_ptr_array_unref(). [element-type PkCategory][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_distro_upgrade_array (PkResults *results);
Gets the distribution upgrades from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkDistroUpgrade's, free with g_ptr_array_unref(). [element-type PkDistroUpgrade][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_require_restart_array
(PkResults *results);
Gets the require restarts from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkRequireRestart's, free with g_ptr_array_unref(). [element-type PkRequireRestart][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_transaction_array (PkResults *results);
Gets the transactions from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkTransactionPast's, free with g_ptr_array_unref(). [element-type PkTransactionPast][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_files_array (PkResults *results);
Gets the files from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkFiles's, free with g_ptr_array_unref(). [element-type PkFiles][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_repo_signature_required_array
(PkResults *results);
Gets the repository signatures required from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkRepoSignatureRequired's, free with g_ptr_array_unref(). [element-type PkRepoSignatureRequired][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_eula_required_array (PkResults *results);
Gets the eulas required from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkEulaRequired's, free with g_ptr_array_unref(). [element-type PkEulaRequired][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_media_change_required_array
(PkResults *results);
Gets the media changes required from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkMediaChangeRequired's, free with g_ptr_array_unref(). [element-type PkMediaChangeRequired][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_repo_detail_array (PkResults *results);
Gets the repository details from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkRepoDetail's, free with g_ptr_array_unref(). [element-type PkRepoDetail][transfer container]
|
Since 0.5.2
GPtrArray * pk_results_get_message_array (PkResults *results);
Gets the messages from the transaction.
|
a valid PkResults instance |
Returns : |
A GPtrArray array of PkMessage's, free with g_ptr_array_unref(). [element-type PkMessage][transfer container]
|
Since 0.5.2
"transaction-flags" property"transaction-flags" guint64 : Read / Write
Default value: 0
Since 0.8.1