GsPluginJob

GsPluginJob

Functions

Types and Values

Description

Functions

gs_plugin_job_run_async ()

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.

Parameters

self

a GsPluginJob

 

plugin_loader

plugin loader to provide the plugins to run the job against

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call once the job is finished

 

user_data

data to pass to callback

 

Since: 49


gs_plugin_job_run_finish ()

gboolean
gs_plugin_job_run_finish (GsPluginJob *self,
                          GAsyncResult *result,
                          GError **error);

Finish an asynchronous plugin job started with gs_plugin_job_run_async().

Parameters

self

a GsPluginJob

 

result

result of the asynchronous operation

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE otherwise

Since: 49


gs_plugin_job_get_interactive ()

gboolean
gs_plugin_job_get_interactive (GsPluginJob *self);

gs_plugin_job_set_app ()

void
gs_plugin_job_set_app (GsPluginJob *self,
                       GsApp *app);

Types and Values

GS_TYPE_PLUGIN_JOB

#define GS_TYPE_PLUGIN_JOB (gs_plugin_job_get_type ())

struct GsPluginJobClass

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);
};

GsPluginJob

typedef struct _GsPluginJob GsPluginJob;