![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define PK_CONTROL_ERROR #define PK_CONTROL_TYPE_ERROR PkControlPrivate; enum PkControlError; PkControl; GQuark pk_control_error_quark (void); PkControl * pk_control_new (void); gboolean pk_control_allocate_transaction_id (PkControl *control, gchar **tid, GError **error); gboolean pk_control_set_proxy (PkControl *control, const gchar *proxy_http, const gchar *proxy_ftp, GError **error); PkBitfield pk_control_get_actions (PkControl *control, GError **error); PkBitfield pk_control_get_filters (PkControl *control, GError **error); PkBitfield pk_control_get_groups (PkControl *control, GError **error); gchar ** pk_control_get_mime_types (PkControl *control, GError **error); gchar * pk_control_get_daemon_state (PkControl *control, GError **error); PkNetworkEnum pk_control_get_network_state (PkControl *control, GError **error); gboolean pk_control_get_backend_detail (PkControl *control, gchar **name, gchar **author, GError **error); gboolean pk_control_get_time_since_action (PkControl *control, PkRoleEnum role, guint *seconds, GError **error); gboolean pk_control_transaction_list_print (PkControl *control); const gchar ** pk_control_transaction_list_get (PkControl *control);
"version-major" guint : Read / Write "version-micro" guint : Read / Write "version-minor" guint : Read / Write
"locked" : Run Last "network-state-changed" : Run Last "repo-list-changed" : Run Last "restart-schedule" : Run Last "transaction-list-changed" : Run Last "updates-changed" : Run Last
typedef enum { PK_CONTROL_ERROR_FAILED, PK_CONTROL_ERROR_CANNOT_START_DAEMON } PkControlError;
Errors that can be thrown
GQuark pk_control_error_quark (void);
We are a clever GObject that sets errors
Returns : |
Our personal error quark. |
gboolean pk_control_allocate_transaction_id (PkControl *control, gchar **tid, GError **error);
We have to create a transaction ID then use it, as a one-step constructor is inherently racey.
gboolean pk_control_set_proxy (PkControl *control, const gchar *proxy_http, const gchar *proxy_ftp, GError **error);
Set a proxy on the PK daemon
PkBitfield pk_control_get_actions (PkControl *control, GError **error);
Actions are roles that the daemon can do with the current backend
PkBitfield pk_control_get_filters (PkControl *control, GError **error);
Filters are how the backend can specify what type of package is returned.
PkBitfield pk_control_get_groups (PkControl *control, GError **error);
The group list is enumerated so it can be localised and have deep integration with desktops. This method allows a frontend to only display the groups that are supported.
gchar ** pk_control_get_mime_types (PkControl *control, GError **error);
The MIME list is the supported package formats.
gchar * pk_control_get_daemon_state (PkControl *control, GError **error);
The engine state debugging output
PkNetworkEnum pk_control_get_network_state (PkControl *control, GError **error);
gboolean pk_control_get_backend_detail (PkControl *control, gchar **name, gchar **author, GError **error);
The backend detail is useful for the pk-backend-status program, or for automatic bugreports.
gboolean pk_control_get_time_since_action (PkControl *control, PkRoleEnum role, guint *seconds, GError **error);
We may want to know how long it has been since we refreshed the cache or retrieved the update list.
gboolean pk_control_transaction_list_print (PkControl *control);
|
|
Returns : |
"locked"
signalvoid user_function (PkControl *control, gboolean arg1, gpointer user_data) : Run Last
The ::locked signal is emitted when the backend instance has been locked by PackageKit. This may mean that other native package tools will not work.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |
"network-state-changed"
signalvoid user_function (PkControl *control, guint arg1, gpointer user_data) : Run Last
The ::network-state-changed signal is emitted when the network has changed speed or connections state.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |
"repo-list-changed"
signalvoid user_function (PkControl *control, gpointer user_data) : Run Last
The ::repo-list-changed signal is emitted when the repo list may have changed and the control program may have to update some UI.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |
"restart-schedule"
signalvoid user_function (PkControl *control, gpointer user_data) : Run Last
The ::restart_schedule signal is emitted when the packagekitd service has been restarted because it has been upgraded. Client programs should reload themselves when it is convenient to do so, as old client tools may not be compatable with the new daemon.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |
"transaction-list-changed"
signalvoid user_function (PkControl *control, gpointer user_data) : Run Last
The ::transaction-list-changed signal is emitted when the list of transactions handled by the daemon is changed.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |
"updates-changed"
signalvoid user_function (PkControl *control, gpointer user_data) : Run Last
The ::updates-changed signal is emitted when the update list may have changed and the control program may have to update some UI.
|
the PkControl instance that emitted the signal |
|
user data set when the signal handler was connected. |