## gs-plugin-job-uninstall-apps

gs-plugin-job-uninstall-apps — A plugin job to uninstall apps

## Functions

GsPluginJob * | gs_plugin_job_uninstall_apps_new ()
GsAppList * | gs_plugin_job_uninstall_apps_get_apps ()
GsPluginUninstallAppsFlags | gs_plugin_job_uninstall_apps_get_flags ()

## Types and Values

#define | GS_TYPE_PLUGIN_JOB_UNINSTALL_APPS
| GsPluginJobUninstallApps

## Description

GsPluginJobUninstallApps is a GsPluginJob representing an operation to uninstall apps.

This class is a wrapper around `GsPluginClass.uninstall_apps_async()`, calling it for all loaded plugins.

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 uninstalled, 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 GsPluginJobUninstallApps. For plugins, this means that callbacks must be executed in the same GMainContext which called `GsPluginClass.uninstall_apps_async()`.

Once the uninstall is completed, the apps will typically be set to the state `GS_APP_STATE_AVAILABLE`, 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.uninstall_apps_async()`

## Functions

### gs_plugin_job_uninstall_apps_new ()

    GsPluginJob *
    gs_plugin_job_uninstall_apps_new (GsAppList *apps,
                                      GsPluginUninstallAppsFlags flags);

Create a new GsPluginJobUninstallApps for uninstalling apps.

#### Parameters

apps | list of apps to uninstall. | [transfer none][not nullable]
flags | flags to affect the uninstall |

#### Returns

a new GsPluginJobUninstallApps.

[transfer full]

Since: 47

### gs_plugin_job_uninstall_apps_get_apps ()

    GsAppList *
    gs_plugin_job_uninstall_apps_get_apps (GsPluginJobUninstallApps *self);

Get the set of apps being uninstalled by this GsPluginJobUninstallApps.

#### Parameters

self | a GsPluginJobUninstallApps |

#### Returns

apps being uninstalled

Since: 47

### gs_plugin_job_uninstall_apps_get_flags ()

    GsPluginUninstallAppsFlags
    gs_plugin_job_uninstall_apps_get_flags
                                   (GsPluginJobUninstallApps *self);

Get the flags affecting the behaviour of this GsPluginJobUninstallApps.

#### Parameters

self | a GsPluginJobUninstallApps |

#### Returns

flags for the job

Since: 47

## Types and Values

### GS_TYPE_PLUGIN_JOB_UNINSTALL_APPS

    #define GS_TYPE_PLUGIN_JOB_UNINSTALL_APPS (gs_plugin_job_uninstall_apps_get_type ())

### GsPluginJobUninstallApps

    typedef struct _GsPluginJobUninstallApps GsPluginJobUninstallApps;