## gs-plugin-types gs-plugin-types |

## Functions

void | (*GsPluginProgressCallback) ()
void | (*GsPluginAppNeedsUserActionCallback) ()

## Types and Values

enum | GsPluginStatus
enum | GsPluginFlags
enum | GsPluginError
enum | GsPluginRefineFlags
enum | GsPluginListAppsFlags
enum | GsPluginRefineCategoriesFlags
enum | GsPluginRefreshMetadataFlags
enum | GsPluginListDistroUpgradesFlags
enum | GsPluginManageRepositoryFlags
enum | GsPluginInstallAppsFlags
enum | GsPluginUninstallAppsFlags
enum | GsPluginUpdateAppsFlags
enum | GsPluginCancelOfflineUpdateFlags
enum | GsPluginDownloadUpgradeFlags
enum | GsPluginTriggerUpgradeFlags
enum | GsPluginLaunchFlags
enum | GsPluginFileToAppFlags
enum | GsPluginUrlToAppFlags
enum | GsPluginRule
enum | GsPluginAction

## Description

## Functions

### GsPluginProgressCallback ()

    void
    (*GsPluginProgressCallback) (GsPlugin *plugin,
                                 guint progress,
                                 gpointer user_data);

Callback to report the progress of a particular `plugin` through a particular operation.

#### Parameters

plugin | the GsPlugin reporting its progress |
progress | the percentage completion (0–100 inclusive), or `GS_APP_PROGRESS_UNKNOWN` for unknown |
user_data | user data passed to the calling function |

Since: 44

### GsPluginAppNeedsUserActionCallback ()

    void
    (*GsPluginAppNeedsUserActionCallback) (GsPlugin *plugin,
                                           GsApp *app,
                                           AsScreenshot *action_screenshot,
                                           gpointer user_data);

Callback to ask the user to perform a physical action during a plugin operation.

This will typically be something like unplugging and reconnecting a hardware device, and instructions will be given via `action_screenshot` .

#### Parameters

plugin | the GsPlugin asking for user action |
app | the related GsApp, or `NULL` if no app is explicitly related to the necessary user action. | [nullable][transfer none]
action_screenshot | a screenshot (with caption set) which gives the user instructions about what action to take, or `NULL` if no instructions are available. | [nullable][transfer none]
user_data | user data passed to the calling function |

Since: 44

## Types and Values

### enum GsPluginStatus

The status of the plugin.

#### Members

GS_PLUGIN_STATUS_UNKNOWN | Unknown status |
GS_PLUGIN_STATUS_WAITING | Waiting |
GS_PLUGIN_STATUS_FINISHED | Finished |
GS_PLUGIN_STATUS_SETUP | Setup in progress |
GS_PLUGIN_STATUS_DOWNLOADING | Downloading in progress |
GS_PLUGIN_STATUS_QUERYING | Querying in progress |
GS_PLUGIN_STATUS_INSTALLING | Installing in progress |
GS_PLUGIN_STATUS_REMOVING | Removing in progress |
GS_PLUGIN_STATUS_LAST |  |

### enum GsPluginFlags

The flags for the plugin at this point in time.

#### Members

GS_PLUGIN_FLAGS_NONE | No flags set |
GS_PLUGIN_FLAGS_INTERACTIVE | User initiated the job |

### enum GsPluginError

The failure error types.

#### Members

GS_PLUGIN_ERROR_FAILED | Generic failure |
GS_PLUGIN_ERROR_NOT_SUPPORTED | Action not supported |
GS_PLUGIN_ERROR_CANCELLED | Action was cancelled |
GS_PLUGIN_ERROR_NO_NETWORK | No network connection available |
GS_PLUGIN_ERROR_NO_SECURITY | Security policy forbid action |
GS_PLUGIN_ERROR_NO_SPACE | No disk space to allow action |
GS_PLUGIN_ERROR_AUTH_REQUIRED | Authentication was required |
GS_PLUGIN_ERROR_AUTH_INVALID | Provided authentication was invalid |
GS_PLUGIN_ERROR_PLUGIN_DEPSOLVE_FAILED | The plugins installed are incompatible |
GS_PLUGIN_ERROR_DOWNLOAD_FAILED | The download action failed |
GS_PLUGIN_ERROR_WRITE_FAILED | The save-to-disk failed |
GS_PLUGIN_ERROR_INVALID_FORMAT | The data format is invalid |
GS_PLUGIN_ERROR_DELETE_FAILED | The delete action failed |
GS_PLUGIN_ERROR_RESTART_REQUIRED | A restart is required |
GS_PLUGIN_ERROR_AC_POWER_REQUIRED | AC power is required |
GS_PLUGIN_ERROR_TIMED_OUT | The job timed out |
GS_PLUGIN_ERROR_BATTERY_LEVEL_TOO_LOW | The system battery level is too low |
GS_PLUGIN_ERROR_LAST |  |

### enum GsPluginRefineFlags

The refine flags.

#### Members

GS_PLUGIN_REFINE_FLAGS_NONE | No explicit flags set |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ID | Require the app’s ID; this is the minimum possible requirement |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE | Require the license |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_URL | Require the URL |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION | Require the long description |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SIZE | Require the installed and download sizes |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | Require the rating |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION | Require the version |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_HISTORY | Require the history |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION | Require enough to install or remove the package |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS | Require update details |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN | Require the origin |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED | Require related packages |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SIZE_DATA | Require user and cache data sizes (Since: 41) |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ADDONS | Require available addons |
GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES | Allow packages to be returned |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_SEVERITY | Require update severity |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPGRADE_REMOVED | Require distro upgrades |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE | Require the provenance |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS | Require user-reviews |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS | Require user-ratings |
GS_PLUGIN_REFINE_FLAGS_DISABLE_FILTERING | Normally the results of a refine are filtered to remove non-valid apps; if this flag is set, that won’t happen. This is intended to be used by internal GsPluginLoader code. (Since: 42) |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON | Require the icon to be loaded |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS | Require the needed permissions |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME | Require the origin hostname |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_UI | Require the origin for UI |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RUNTIME | Require the runtime |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SCREENSHOTS | Require screenshot information |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_CATEGORIES | Require categories |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROJECT_GROUP | Require project group |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DEVELOPER_NAME | Require developer name |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_KUDOS | Require kudos |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_CONTENT_RATING | Require content rating |
GS_PLUGIN_REFINE_FLAGS_MASK | All flags (Since: 40) |

### enum GsPluginListAppsFlags

Flags for an operation to list apps matching a given query.

#### Members

GS_PLUGIN_LIST_APPS_FLAGS_NONE | No flags set. |
GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE | User initiated the job. |

Since: 43

### enum GsPluginRefineCategoriesFlags

Flags for an operation to refine categories.

#### Members

GS_PLUGIN_REFINE_CATEGORIES_FLAGS_NONE | No flags set. |
GS_PLUGIN_REFINE_CATEGORIES_FLAGS_INTERACTIVE | User initiated the job. |
GS_PLUGIN_REFINE_CATEGORIES_FLAGS_SIZE | Work out the number of apps in each category. |

Since: 43

### enum GsPluginRefreshMetadataFlags

Flags for an operation to refresh metadata.

#### Members

GS_PLUGIN_REFRESH_METADATA_FLAGS_NONE | No flags set. |
GS_PLUGIN_REFRESH_METADATA_FLAGS_INTERACTIVE | User initiated the job. |

Since: 42

### enum GsPluginListDistroUpgradesFlags

Flags for an operation to list available distro upgrades.

#### Members

GS_PLUGIN_LIST_DISTRO_UPGRADES_FLAGS_NONE | No flags set. |
GS_PLUGIN_LIST_DISTRO_UPGRADES_FLAGS_INTERACTIVE | User initiated the job. |

Since: 42

### enum GsPluginManageRepositoryFlags

Flags for an operation on a repository.

#### Members

GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE | No flags set. |
GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_INTERACTIVE | User initiated the job. |
GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_INSTALL | Install the repository. |
GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_REMOVE | Remove the repository. |
GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_ENABLE | Enable the repository. |
GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_DISABLE | Disable the repository. |

Since: 42

### enum GsPluginInstallAppsFlags

Flags for an operation to download or install apps.

#### Members

GS_PLUGIN_INSTALL_APPS_FLAGS_NONE | No flags set. |
GS_PLUGIN_INSTALL_APPS_FLAGS_INTERACTIVE | User initiated the job. |
GS_PLUGIN_INSTALL_APPS_FLAGS_NO_DOWNLOAD | Only use locally cached resources, and error if they don’t exist. |
GS_PLUGIN_INSTALL_APPS_FLAGS_NO_APPLY | Only download the resources, and don’t do the installation. |

Since: 47

### enum GsPluginUninstallAppsFlags

Flags for an operation to uninstall apps.

#### Members

GS_PLUGIN_UNINSTALL_APPS_FLAGS_NONE | No flags set. |
GS_PLUGIN_UNINSTALL_APPS_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginUpdateAppsFlags

Flags for an operation to download or update apps.

#### Members

GS_PLUGIN_UPDATE_APPS_FLAGS_NONE | No flags set. |
GS_PLUGIN_UPDATE_APPS_FLAGS_INTERACTIVE | User initiated the job. |
GS_PLUGIN_UPDATE_APPS_FLAGS_NO_DOWNLOAD | Only use locally cached resources, and error if they don’t exist. |
GS_PLUGIN_UPDATE_APPS_FLAGS_NO_APPLY | Only download the resources, and don’t apply the updates. |

Since: 44

### enum GsPluginCancelOfflineUpdateFlags

Flags for an operation to cancel a pending offline update.

#### Members

GS_PLUGIN_CANCEL_OFFLINE_UPDATE_FLAGS_NONE | No flags set. |
GS_PLUGIN_CANCEL_OFFLINE_UPDATE_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginDownloadUpgradeFlags

Flags for an operation to download an upgrade.

#### Members

GS_PLUGIN_DOWNLOAD_UPGRADE_FLAGS_NONE | No flags set. |
GS_PLUGIN_DOWNLOAD_UPGRADE_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginTriggerUpgradeFlags

Flags for an operation to trigger an upgrade.

#### Members

GS_PLUGIN_TRIGGER_UPGRADE_FLAGS_NONE | No flags set. |
GS_PLUGIN_TRIGGER_UPGRADE_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginLaunchFlags

Flags for a launch operation.

#### Members

GS_PLUGIN_LAUNCH_FLAGS_NONE | No flags set. |
GS_PLUGIN_LAUNCH_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginFileToAppFlags

Flags for a file-to-app operation.

#### Members

GS_PLUGIN_FILE_TO_APP_FLAGS_NONE | No flags set. |
GS_PLUGIN_FILE_TO_APP_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginUrlToAppFlags

Flags for a url-to-app operation.

#### Members

GS_PLUGIN_URL_TO_APP_FLAGS_NONE | No flags set. |
GS_PLUGIN_URL_TO_APP_FLAGS_INTERACTIVE | User initiated the job. |

Since: 47

### enum GsPluginRule

The rules used for ordering plugins. Plugins are expected to add rules in the init function for their GsPlugin subclass.

#### Members

GS_PLUGIN_RULE_CONFLICTS | The plugin conflicts with another |
GS_PLUGIN_RULE_RUN_AFTER | Order the plugin after another |
GS_PLUGIN_RULE_RUN_BEFORE | Order the plugin before another |
GS_PLUGIN_RULE_BETTER_THAN | Results are better than another |
GS_PLUGIN_RULE_LAST |  |

### enum GsPluginAction

The plugin action.

#### Members

GS_PLUGIN_ACTION_UNKNOWN | Action is unknown |
GS_PLUGIN_ACTION_INSTALL | Install an app |
GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD | Download a distro upgrade |
GS_PLUGIN_ACTION_LAUNCH | Launch an app |
GS_PLUGIN_ACTION_FILE_TO_APP | Convert the file to an app |
GS_PLUGIN_ACTION_URL_TO_APP | Convert the URI to an app |
GS_PLUGIN_ACTION_GET_LANGPACKS | Get appropriate language pack |
GS_PLUGIN_ACTION_INSTALL_REPO | Install a repository (Since: 41) |
GS_PLUGIN_ACTION_REMOVE_REPO | Remove a repository (Since: 41) |
GS_PLUGIN_ACTION_ENABLE_REPO | Enable a repository (Since: 41) |
GS_PLUGIN_ACTION_DISABLE_REPO | Disable a repository (Since: 41) |
GS_PLUGIN_ACTION_LAST |  |