Top | ![]() |
![]() |
![]() |
![]() |
GsPluginJobInstallApps is a GsPluginJob representing an operation to install apps.
This class is a wrapper around GsPluginClass.install_apps_async()
,
calling it for all loaded plugins.
Unless GS_PLUGIN_INSTALL_APPS_FLAGS_NO_DOWNLOAD
is specified, the first step
of this job downloads the app and any dependencies, ready to be installed or
updated.
Plugins are expected to schedule downloads using the system download scheduler if appropriate (if the download is not guaranteed to be under a few hundred kilobytes, for example), so that the user’s metered data preferences are honoured.
Plugins are expected to send progress notifications to the UI by calling the
provided GsPluginProgressCallback function. Plugins may also call
gs_app_set_progress()
on apps as they are updated, but this method will
eventually be removed as it cannot represent progress in multiple ongoing
operations.
Callbacks from this job will be executed in the GMainContext which was
thread-default at the time when GsPluginJob.run_async()
was called on the
GsPluginJobInstallApps. For plugins, this means that callbacks must be
executed in the same GMainContext which called
GsPluginClass.install_apps_async()
.
If the app is already downloaded, the first step of this job is a no-op.
Unless GS_PLUGIN_INSTALL_APPS_FLAGS_NO_APPLY
is specified, the second step of
this job applies the app and any dependencies (installing the app, and updating
dependencies or installing missing dependencies).
Once that is completed, the apps will typically be set to the state
GS_APP_STATE_INSTALLED
, or GS_APP_STATE_UNKNOWN
.
On failure the error message returned will usually only be shown on the
console, but they can also be retrieved using gs_plugin_loader_get_events()
.
See also: GsPluginClass.install_apps_async()
GsPluginJob * gs_plugin_job_install_apps_new (GsAppList *apps
,GsPluginInstallAppsFlags flags
);
Create a new GsPluginJobInstallApps for updating apps, or pre-downloading apps for installation.
apps |
list of apps to install. |
[transfer none][not nullable] |
flags |
flags to affect the install |
Since: 47
GsAppList *
gs_plugin_job_install_apps_get_apps (GsPluginJobInstallApps *self
);
Get the set of apps being installed by this GsPluginJobInstallApps.
Since: 47
GsPluginInstallAppsFlags
gs_plugin_job_install_apps_get_flags (GsPluginJobInstallApps *self
);
Get the flags affecting the behaviour of this GsPluginJobInstallApps.
Since: 47