Top | ![]() |
![]() |
![]() |
![]() |
void | gs_plugin_job_run_async () |
gboolean | gs_plugin_job_run_finish () |
gboolean | gs_plugin_job_get_interactive () |
void | gs_plugin_job_emit_event () |
void gs_plugin_job_run_async (GsPluginJob *self
,GsPluginLoader *plugin_loader
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously run the job.
This stores a reference to cancellable
so that gs_plugin_job_cancel()
can be
used to asynchronously cancel the job from another thread.
self |
||
plugin_loader |
plugin loader to provide the plugins to run the job against |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
callback to call once the job is finished |
|
user_data |
data to pass to |
Since: 49
gboolean gs_plugin_job_run_finish (GsPluginJob *self
,GAsyncResult *result
,GError **error
);
Finish an asynchronous plugin job started with gs_plugin_job_run_async()
.
self |
||
result |
result of the asynchronous operation |
|
error |
return location for a GError, or |
Since: 49
void gs_plugin_job_emit_event (GsPluginJob *self
,GsPlugin *plugin
,GsPluginEvent *event
);
Emit an event from the plugin job.
This is typically used to report errors while running the job, and it allows multiple errors to be reported and for the job to continue after those errors. Returning a GError would not allow that.
plugin
may be NULL
if the event is not associated with a specific plugin.
It will typically be non-NULL
, though, as most events come from
plugin-specific code.
self |
a plugin job |
|
plugin |
plugin which reported the event, or
|
[nullable][transfer none] |
event |
event being reported. |
[transfer none] |
Since: 49
struct GsPluginJobClass { GObjectClass parent_class; void (*run_async) (GsPluginJob *self, GsPluginLoader *plugin_loader, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*run_finish) (GsPluginJob *self, GAsyncResult *result, GError **error); gboolean (*get_interactive) (GsPluginJob *self); };