![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
#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); PkRoleEnum pk_control_get_actions (PkControl *control); PkFilterEnum pk_control_get_filters (PkControl *control); PkGroupEnum pk_control_get_groups (PkControl *control); PkNetworkEnum pk_control_get_network_state (PkControl *control); 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);
"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, } 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);
Set a proxy on the PK daemon
|
a valid PkControl instance |
|
a HTTP proxy string such as "username:passwordserver.lan :8080"
|
|
a FTP proxy string such as "server.lan:8080" |
Returns : |
if we set the proxy successfully |
PkRoleEnum pk_control_get_actions (PkControl *control);
Actions are roles that the daemon can do with the current backend
|
a valid PkControl instance |
Returns : |
an enumerated list of the actions the backend supports |
PkFilterEnum pk_control_get_filters (PkControl *control);
Filters are how the backend can specify what type of package is returned.
|
a valid PkControl instance |
Returns : |
an enumerated list of the filters the backend supports |
PkGroupEnum pk_control_get_groups (PkControl *control);
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.
|
a valid PkControl instance |
Returns : |
an enumerated list of the groups the backend supports |
PkNetworkEnum pk_control_get_network_state (PkControl *control);
|
a valid PkControl instance |
Returns : |
an enumerated network state |
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 TODO
|
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 *pkcontrol, gpointer user_data) : Run Last
|
the object which received 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 TODO
|
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. |