![]() |
![]() |
![]() |
PackageKit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define PK_CONTROL_ERROR #define PK_CONTROL_TYPE_ERROR struct PkControl; struct PkControlClass; enum PkControlError;void pk_control_can_authorize_async (PkControl *control
,const
,gchar *action_id,
GCancellable *cancellable,
GAsyncReadyCallback callback); PkAuthorizeEnum pk_control_can_authorize_finish (
gpointer user_dataPkControl *control
,,
GAsyncResult *res);
GError **errorGQuark pk_control_error_quark (void
);void pk_control_get_daemon_state_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagchar * pk_control_get_daemon_state_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_get_network_state_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback); PkNetworkEnum pk_control_get_network_state_finish (
gpointer user_dataPkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_get_properties_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagboolean pk_control_get_properties_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_get_tid_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagchar * pk_control_get_tid_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_get_time_since_action_async (PkControl *control
,PkRoleEnum role
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_dataguint pk_control_get_time_since_action_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_get_transaction_list_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagchar ** pk_control_get_transaction_list_finish (PkControl *control
,,
GAsyncResult *res); PkControl * pk_control_new (
GError **errorvoid
);void pk_control_set_proxy2_async (PkControl *control
,const
,gchar *proxy_httpconst
,gchar *proxy_httpsconst
,gchar *proxy_ftpconst
,gchar *proxy_socksconst
,gchar *no_proxyconst
,gchar *pac,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datavoid pk_control_set_proxy_async (PkControl *control
,const
,gchar *proxy_httpconst
,gchar *proxy_ftp,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagboolean pk_control_set_proxy_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_set_root_async (PkControl *control
,const
,gchar *root,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagboolean pk_control_set_root_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_suggest_daemon_quit_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_datagboolean pk_control_suggest_daemon_quit_finish (PkControl *control
,,
GAsyncResult *res);
GError **errorvoid pk_control_test ();
gpointer user_data
"backend-author"gchar * : Read / Write "backend-description"gchar * : Read / Write "backend-name"gchar * : Read / Write "connected"gboolean : Read / Write "distro-id"gchar * : Read / Write "filters"guint64 : Read / Write "groups"guint64 : Read / Write "locked"gboolean : Read / Write "mime-types"gchar * : Read / Write "network-state"guint : Read / Write "roles"guint64 : Read / Write "version-major"guint : Read "version-micro"guint : Read "version-minor"guint : Read
"repo-list-changed" :"restart-schedule" : Run Last
"transaction-list-changed" : Run Last
"updates-changed" : Run Last
Run Last
struct PkControlClass { GObjectClass parent_class; /* signals */ void (* transaction_list_changed) (PkControl *control, gchar **transaction_ids); void (* updates_changed) (PkControl *control); void (* repo_list_changed) (PkControl *control); void (* network_state_changed) (PkControl *control); void (* restart_schedule) (PkControl *control); void (* locked) (PkControl *control, gboolean is_locked); void (* connection_changed) (PkControl *control, gboolean connected); /* padding for future expansion */ void (*_pk_reserved1) (void); void (*_pk_reserved2) (void); void (*_pk_reserved3) (void); void (*_pk_reserved4) (void); void (*_pk_reserved5) (void); };
typedef enum { PK_CONTROL_ERROR_FAILED, PK_CONTROL_ERROR_CANNOT_START_DAEMON } PkControlError;
Errors that can be thrown
void pk_control_can_authorize_async (PkControl *control
,const
,gchar *action_id,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
We may want to know before we run a method if we are going to be denied, accepted or challenged for authentication.
|
a valid PkControl instance |
|
The action ID, for instance "org.freedesktop.PackageKit.install-untrusted" |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
PkAuthorizeEnum pk_control_can_authorize_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
the PkAuthorizeEnum or PK_AUTHORIZE_ENUM_UNKNOWN |
Since 0.5.2
GQuark pk_control_error_quark (void
);
We are a GObject that sets errors
Returns : |
Our personal error quark. |
Since 0.5.2
void pk_control_get_daemon_state_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Gets the debugging state from the daemon.
|
a valid PkControl instance |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
gchar * pk_control_get_daemon_state_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
the ID, or NULL g_free() |
Since 0.5.2
void pk_control_get_network_state_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
PkNetworkEnum pk_control_get_network_state_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
void pk_control_get_properties_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Gets global properties from the daemon.
|
a valid PkControl instance |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
gboolean pk_control_get_properties_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
TRUE |
Since 0.5.2
void pk_control_get_tid_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Gets a transacton ID from the daemon.
|
a valid PkControl instance |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
gchar * pk_control_get_tid_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
the ID, or NULL g_free() |
Since 0.5.2
void pk_control_get_time_since_action_async (PkControl *control
,PkRoleEnum role
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
We may want to know how long it has been since we refreshed the cache or retrieved the update list.
|
a valid PkControl instance |
|
the role enum, e.g. PK_ROLE_ENUM_GET_UPDATES |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
guint pk_control_get_time_since_action_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
TRUE |
Since 0.5.2
void pk_control_get_transaction_list_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Gets the transactions currently running in the daemon.
|
a valid PkControl instance |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
gchar ** pk_control_get_transaction_list_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
A GStrv list of transaction ID's, free with g_strfreev() |
Since 0.5.2
void pk_control_set_proxy2_async (PkControl *control
,const
,gchar *proxy_httpconst
,gchar *proxy_httpsconst
,gchar *proxy_ftpconst
,gchar *proxy_socksconst
,gchar *no_proxyconst
,gchar *pac,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Set a proxy on the PK daemon
|
a valid PkControl instance |
|
a HTTP proxy string such as "username:passwordserver.lan :8080", or NULL |
|
a HTTPS proxy string such as "username:passwordserver.lan :8080", or NULL |
|
a FTP proxy string such as "server.lan:8080", or NULL |
|
a SOCKS proxy string such as "server.lan:8080", or NULL |
|
a list of download IPs that shouldn't go through the proxy, or NULL |
|
a PAC string, or NULL |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.13
void pk_control_set_proxy_async (PkControl *control
,const
,gchar *proxy_httpconst
,gchar *proxy_ftp,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Set a proxy on the PK daemon
NOTE: This is just provided for backwards compatibility.
Clients should really be using pk_control_set_proxy2_async()
.
|
a valid PkControl instance |
|
a HTTP proxy string such as "username:passwordserver.lan :8080" |
|
a FTP proxy string such as "server.lan:8080" |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.5.2
gboolean pk_control_set_proxy_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
TRUE |
Since 0.5.2
void pk_control_set_root_async (PkControl *control
,const
,gchar *root,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Set the install root for the backend used by PackageKit
|
a valid PkControl instance |
|
an install root string such as "/mnt/ltsp" |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.4
gboolean pk_control_set_root_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
TRUE |
Since 0.6.4
void pk_control_suggest_daemon_quit_async (PkControl *control
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Suggests to the daemon that it should quit as soon as possible.
|
a valid PkControl instance |
|
a NULL |
|
the function to run on completion |
|
the data to pass to callback
|
Since 0.6.2
gboolean pk_control_suggest_daemon_quit_finish (PkControl *control
,,
GAsyncResult *res);
GError **error
Gets the result from the asynchronous function.
|
a valid PkControl instance |
|
the |
|
A NULL |
Returns : |
TRUE |
Since 0.6.2
"backend-author"
property"backend-author"gchar * : Read / Write
Default value: NULL
Since 0.5.2
"backend-description"
property"backend-description"gchar * : Read / Write
Default value: NULL
Since 0.5.2
"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,GStrv transaction_ids,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 |
|
an |
|
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. |