gs-plugin-helpers: GNOME Software Reference Manual

## gs-plugin-helpers gs-plugin-helpers — Helpers for storing call closures for GsPlugin vfuncs |

## Functions

GsPluginRefineData * | gs_plugin_refine_data_new ()
GTask * | gs_plugin_refine_data_new_task ()
void | gs_plugin_refine_data_free ()
GsPluginRefreshMetadataData * | gs_plugin_refresh_metadata_data_new ()
void | gs_plugin_refresh_metadata_data_free ()
GsPluginListAppsData * | gs_plugin_list_apps_data_new ()
GTask * | gs_plugin_list_apps_data_new_task ()
void | gs_plugin_list_apps_data_free ()
GsPluginManageRepositoryData * | gs_plugin_manage_repository_data_new ()
GTask * | gs_plugin_manage_repository_data_new_task ()
void | gs_plugin_manage_repository_data_free ()
GsPluginRefineCategoriesData * | gs_plugin_refine_categories_data_new ()
GTask * | gs_plugin_refine_categories_data_new_task ()
void | gs_plugin_refine_categories_data_free ()
GsPluginInstallAppsData * | gs_plugin_install_apps_data_new ()
GTask * | gs_plugin_install_apps_data_new_task ()
void | gs_plugin_install_apps_data_free ()
GsPluginUninstallAppsData * | gs_plugin_uninstall_apps_data_new ()
GTask * | gs_plugin_uninstall_apps_data_new_task ()
void | gs_plugin_uninstall_apps_data_free ()
GsPluginUpdateAppsData * | gs_plugin_update_apps_data_new ()
GTask * | gs_plugin_update_apps_data_new_task ()
void | gs_plugin_update_apps_data_free ()
GsPluginCancelOfflineUpdateData * | gs_plugin_cancel_offline_update_data_new ()
GTask * | gs_plugin_cancel_offline_update_data_new_task ()
void | gs_plugin_cancel_offline_update_data_free ()
GsPluginDownloadUpgradeData * | gs_plugin_download_upgrade_data_new ()
GTask * | gs_plugin_download_upgrade_data_new_task ()
void | gs_plugin_download_upgrade_data_free ()
GsPluginTriggerUpgradeData * | gs_plugin_trigger_upgrade_data_new ()
GTask * | gs_plugin_trigger_upgrade_data_new_task ()
void | gs_plugin_trigger_upgrade_data_free ()
GsPluginLaunchData * | gs_plugin_launch_data_new ()
GTask * | gs_plugin_launch_data_new_task ()
void | gs_plugin_launch_data_free ()
GsPluginFileToAppData * | gs_plugin_file_to_app_data_new ()
GTask * | gs_plugin_file_to_app_data_new_task ()
void | gs_plugin_file_to_app_data_free ()
GsPluginUrlToAppData * | gs_plugin_url_to_app_data_new ()
GTask * | gs_plugin_url_to_app_data_new_task ()
void | gs_plugin_url_to_app_data_free ()

## Types and Values

| GsPluginRefineData
| GsPluginRefreshMetadataData
| GsPluginListAppsData
| GsPluginManageRepositoryData
| GsPluginRefineCategoriesData
| GsPluginInstallAppsData
| GsPluginUninstallAppsData
| GsPluginUpdateAppsData
| GsPluginCancelOfflineUpdateData
| GsPluginDownloadUpgradeData
| GsPluginTriggerUpgradeData
| GsPluginLaunchData
| GsPluginFileToAppData
| GsPluginUrlToAppData

## Description

The helpers in this file each create a context structure to store the arguments passed to a standard GsPlugin vfunc.

These are intended to be used by plugin implementations to easily create GTasks for handling GsPlugin vfunc calls, without all having to write the same code to create a structure to wrap the vfunc arguments.

## Functions

### gs_plugin_refine_data_new ()

    GsPluginRefineData *
    gs_plugin_refine_data_new (GsAppList *list,
                               GsPluginRefineFlags flags);

Context data for a call to GsPluginClass.refine_async.

#### Parameters

list | list of GsApps to refine |
flags | refine flags |

#### Returns

context data structure.

[transfer full]

Since: 42

### gs_plugin_refine_data_new_task ()

    GTask *
    gs_plugin_refine_data_new_task (gpointer source_object,
                                    GsAppList *list,
                                    GsPluginRefineFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for a refine operation with the given arguments. The task data will be set to a GsPluginRefineData containing the given context.

This is essentially a combination of `gs_plugin_refine_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
list | list of GsApps to refine |
flags | refine flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 42

### gs_plugin_refine_data_free ()

    void
    gs_plugin_refine_data_free (GsPluginRefineData *data);

Free the given `data` .

#### Parameters

data | a GsPluginRefineData. | [transfer full]

Since: 42

### gs_plugin_refresh_metadata_data_new ()

    GsPluginRefreshMetadataData *
    gs_plugin_refresh_metadata_data_new (guint64 cache_age_secs,
                                         GsPluginRefreshMetadataFlags flags);

Context data for a call to GsPluginClass.refresh_metadata_async.

#### Parameters

cache_age_secs | maximum allowed age of the cache in order for it to remain valid, in seconds |
flags | refresh metadata flags |

#### Returns

context data structure.

[transfer full]

Since: 42

### gs_plugin_refresh_metadata_data_free ()

    void
    gs_plugin_refresh_metadata_data_free (GsPluginRefreshMetadataData *data);

Free the given `data` .

#### Parameters

data | a GsPluginRefreshMetadataData. | [transfer full]

Since: 42

### gs_plugin_list_apps_data_new ()

    GsPluginListAppsData *
    gs_plugin_list_apps_data_new (GsAppQuery *query,
                                  GsPluginListAppsFlags flags);

Context data for a call to GsPluginClass.list_apps_async.

#### Parameters

query | a query to filter apps, or `NULL` for no filtering. | [nullable][transfer none]
flags | list apps flags |

#### Returns

context data structure.

[transfer full]

Since: 43

### gs_plugin_list_apps_data_new_task ()

    GTask *
    gs_plugin_list_apps_data_new_task (gpointer source_object,
                                       GsAppQuery *query,
                                       GsPluginListAppsFlags flags,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Create a GTask for a list apps operation with the given arguments. The task data will be set to a GsPluginListAppsData containing the given context.

This is essentially a combination of `gs_plugin_list_apps_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
query | a query to filter apps, or `NULL` for no filtering. | [nullable][transfer none]
flags | list apps flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 43

### gs_plugin_list_apps_data_free ()

    void
    gs_plugin_list_apps_data_free (GsPluginListAppsData *data);

Free the given `data` .

#### Parameters

data | a GsPluginListAppsData. | [transfer full]

Since: 43

### gs_plugin_manage_repository_data_new ()

    GsPluginManageRepositoryData *
    gs_plugin_manage_repository_data_new (GsApp *repository,
                                          GsPluginManageRepositoryFlags flags);

Common context data for a call to GsPluginClass.install_repository_async, GsPluginClass.remove_repository_async, GsPluginClass.enable_repository_async and GsPluginClass.disable_repository_async.

#### Parameters

repository | a repository to manage. | [not nullable][transfer none]
flags | manage repository flags |

#### Returns

context data structure.

[transfer full]

Since: 43

### gs_plugin_manage_repository_data_new_task ()

    GTask *
    gs_plugin_manage_repository_data_new_task
                                   (gpointer source_object,
                                    GsApp *repository,
                                    GsPluginManageRepositoryFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for a manage repository operation with the given arguments. The task data will be set to a GsPluginManageRepositoryData containing the given context.

This is essentially a combination of `gs_plugin_manage_repository_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
repository | a repository to manage. | [not nullable][transfer none]
flags | manage repository flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 43

### gs_plugin_manage_repository_data_free ()

    void
    gs_plugin_manage_repository_data_free (GsPluginManageRepositoryData *data);

Free the given `data` .

#### Parameters

data | a GsPluginManageRepositoryData. | [transfer full]

Since: 43

### gs_plugin_refine_categories_data_new ()

    GsPluginRefineCategoriesData *
    gs_plugin_refine_categories_data_new (GPtrArray *list,
                                          GsPluginRefineCategoriesFlags flags);

Context data for a call to GsPluginClass.refine_categories_async.

#### Parameters

list | list of GsCategory objects to refine. | [element-type GsCategory]
flags | refine flags |

#### Returns

context data structure.

[transfer full]

Since: 43

### gs_plugin_refine_categories_data_new_task ()

    GTask *
    gs_plugin_refine_categories_data_new_task
                                   (gpointer source_object,
                                    GPtrArray *list,
                                    GsPluginRefineCategoriesFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for a refine categories operation with the given arguments. The task data will be set to a GsPluginRefineCategoriesData containing the given context.

This is essentially a combination of `gs_plugin_refine_categories_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
list | list of GsCategory objects to refine. | [element-type GsCategory]
flags | refine flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 43

### gs_plugin_refine_categories_data_free ()

    void
    gs_plugin_refine_categories_data_free (GsPluginRefineCategoriesData *data);

Free the given `data` .

#### Parameters

data | a GsPluginRefineCategoriesData. | [transfer full]

Since: 43

### gs_plugin_install_apps_data_new ()

    GsPluginInstallAppsData *
    gs_plugin_install_apps_data_new (GsAppList *apps,
                                     GsPluginInstallAppsFlags flags,
                                     GsPluginProgressCallback progress_callback,
                                     gpointer progress_user_data,
                                     GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                     gpointer app_needs_user_action_data);

Context data for a call to GsPluginClass.install_apps_async.

#### Parameters

apps | list of apps to install |
flags | install flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_install_apps_data_new_task ()

    GTask *
    gs_plugin_install_apps_data_new_task (gpointer source_object,
                                          GsAppList *apps,
                                          GsPluginInstallAppsFlags flags,
                                          GsPluginProgressCallback progress_callback,
                                          gpointer progress_user_data,
                                          GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                          gpointer app_needs_user_action_data,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Create a GTask for an install apps operation with the given arguments. The task data will be set to a GsPluginInstallAppsData containing the given context.

This is essentially a combination of `gs_plugin_install_apps_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
apps | list of apps to install |
flags | install flags |
progress_callback | function to call to notify of progress. | [nullable]
progress_user_data | data to pass to `progress_callback` |
app_needs_user_action_callback | function to call to ask the user for a decision. | [nullable]
app_needs_user_action_data | data to pass to `app_needs_user_action_callback` |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_install_apps_data_free ()

    void
    gs_plugin_install_apps_data_free (GsPluginInstallAppsData *data);

Free the given `data` .

#### Parameters

data | a GsPluginInstallAppsData. | [transfer full]

Since: 47

### gs_plugin_uninstall_apps_data_new ()

    GsPluginUninstallAppsData *
    gs_plugin_uninstall_apps_data_new (GsAppList *apps,
                                       GsPluginUninstallAppsFlags flags,
                                       GsPluginProgressCallback progress_callback,
                                       gpointer progress_user_data,
                                       GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                       gpointer app_needs_user_action_data);

Context data for a call to GsPluginClass.uninstall_apps_async.

#### Parameters

apps | list of apps to uninstall |
flags | uninstall flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_uninstall_apps_data_new_task ()

    GTask *
    gs_plugin_uninstall_apps_data_new_task
                                   (gpointer source_object,
                                    GsAppList *apps,
                                    GsPluginUninstallAppsFlags flags,
                                    GsPluginProgressCallback progress_callback,
                                    gpointer progress_user_data,
                                    GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                    gpointer app_needs_user_action_data,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for an uninstall apps operation with the given arguments. The task data will be set to a GsPluginUninstallAppsData containing the given context.

This is essentially a combination of `gs_plugin_uninstall_apps_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
apps | list of apps to uninstall |
flags | uninstall flags |
progress_callback | function to call to notify of progress. | [nullable]
progress_user_data | data to pass to `progress_callback` |
app_needs_user_action_callback | function to call to ask the user for a decision. | [nullable]
app_needs_user_action_data | data to pass to `app_needs_user_action_callback` |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_uninstall_apps_data_free ()

    void
    gs_plugin_uninstall_apps_data_free (GsPluginUninstallAppsData *data);

Free the given `data` .

#### Parameters

data | a GsPluginUninstallAppsData. | [transfer full]

Since: 47

### gs_plugin_update_apps_data_new ()

    GsPluginUpdateAppsData *
    gs_plugin_update_apps_data_new (GsAppList *apps,
                                    GsPluginUpdateAppsFlags flags,
                                    GsPluginProgressCallback progress_callback,
                                    gpointer progress_user_data,
                                    GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                    gpointer app_needs_user_action_data);

Context data for a call to GsPluginClass.update_apps_async.

#### Parameters

apps | list of apps to update |
flags | update flags |

#### Returns

context data structure.

[transfer full]

Since: 44

### gs_plugin_update_apps_data_new_task ()

    GTask *
    gs_plugin_update_apps_data_new_task (gpointer source_object,
                                         GsAppList *apps,
                                         GsPluginUpdateAppsFlags flags,
                                         GsPluginProgressCallback progress_callback,
                                         gpointer progress_user_data,
                                         GsPluginAppNeedsUserActionCallback app_needs_user_action_callback,
                                         gpointer app_needs_user_action_data,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Create a GTask for an update apps operation with the given arguments. The task data will be set to a GsPluginUpdateAppsData containing the given context.

This is essentially a combination of `gs_plugin_update_apps_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
apps | list of apps to update |
flags | update flags |
progress_callback | function to call to notify of progress. | [nullable]
progress_user_data | data to pass to `progress_callback` |
app_needs_user_action_callback | function to call to ask the user for a decision. | [nullable]
app_needs_user_action_data | data to pass to `app_needs_user_action_callback` |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 44

### gs_plugin_update_apps_data_free ()

    void
    gs_plugin_update_apps_data_free (GsPluginUpdateAppsData *data);

Free the given `data` .

#### Parameters

data | a GsPluginUpdateAppsData. | [transfer full]

Since: 44

### gs_plugin_cancel_offline_update_data_new ()

    GsPluginCancelOfflineUpdateData *
    gs_plugin_cancel_offline_update_data_new
                                   (GsPluginCancelOfflineUpdateFlags flags);

Common context data for a call to GsPluginClass.cancel_offline_update_async.

#### Parameters

flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_cancel_offline_update_data_new_task ()

    GTask *
    gs_plugin_cancel_offline_update_data_new_task
                                   (gpointer source_object,
                                    GsPluginCancelOfflineUpdateFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for an update-cancel operation with the given arguments. The task data will be set to a GsPluginCancelOfflineUpdateData containing the given context.

This is essentially a combination of `gs_plugin_cancel_offline_update_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_cancel_offline_update_data_free ()

    void
    gs_plugin_cancel_offline_update_data_free
                                   (GsPluginCancelOfflineUpdateData *data);

Free the given `data` .

#### Parameters

data | a GsPluginCancelOfflineUpdateData. | [transfer full]

Since: 47

### gs_plugin_download_upgrade_data_new ()

    GsPluginDownloadUpgradeData *
    gs_plugin_download_upgrade_data_new (GsApp *app,
                                         GsPluginDownloadUpgradeFlags flags);

Common context data for a call to GsPluginClass.download_upgrade_async.

#### Parameters

app | a GsApp, with kind `AS_COMPONENT_KIND_OPERATING_SYSTEM`. | [not nullable][transfer none]
flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_download_upgrade_data_new_task ()

    GTask *
    gs_plugin_download_upgrade_data_new_task
                                   (gpointer source_object,
                                    GsApp *app,
                                    GsPluginDownloadUpgradeFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for an upgrade-download operation with the given arguments. The task data will be set to a GsPluginDownloadUpgradeData containing the given context.

This is essentially a combination of `gs_plugin_download_upgrade_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
app | a GsApp, with kind `AS_COMPONENT_KIND_OPERATING_SYSTEM`. | [not nullable][transfer none]
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_download_upgrade_data_free ()

    void
    gs_plugin_download_upgrade_data_free (GsPluginDownloadUpgradeData *data);

Free the given `data` .

#### Parameters

data | a GsPluginDownloadUpgradeData. | [transfer full]

Since: 47

### gs_plugin_trigger_upgrade_data_new ()

    GsPluginTriggerUpgradeData *
    gs_plugin_trigger_upgrade_data_new (GsApp *app,
                                        GsPluginTriggerUpgradeFlags flags);

Common context data for a call to GsPluginClass.trigger_upgrade_async.

#### Parameters

app | a GsApp, with kind `AS_COMPONENT_KIND_OPERATING_SYSTEM`. | [not nullable][transfer none]
flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_trigger_upgrade_data_new_task ()

    GTask *
    gs_plugin_trigger_upgrade_data_new_task
                                   (gpointer source_object,
                                    GsApp *app,
                                    GsPluginTriggerUpgradeFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for an upgrade-trigger operation with the given arguments. The task data will be set to a GsPluginTriggerUpgradeData containing the given context.

This is essentially a combination of `gs_plugin_trigger_upgrade_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
app | a GsApp, with kind `AS_COMPONENT_KIND_OPERATING_SYSTEM`. | [not nullable][transfer none]
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_trigger_upgrade_data_free ()

    void
    gs_plugin_trigger_upgrade_data_free (GsPluginTriggerUpgradeData *data);

Free the given `data` .

#### Parameters

data | a GsPluginTriggerUpgradeData. | [transfer full]

Since: 47

### gs_plugin_launch_data_new ()

    GsPluginLaunchData *
    gs_plugin_launch_data_new (GsApp *app,
                               GsPluginLaunchFlags flags);

Common context data for a call to GsPluginClass.launch_async.

#### Parameters

app | a GsApp. | [not nullable][transfer none]
flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_launch_data_new_task ()

    GTask *
    gs_plugin_launch_data_new_task (gpointer source_object,
                                    GsApp *app,
                                    GsPluginLaunchFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Create a GTask for a launch operation with the given arguments. The task data will be set to a GsPluginLaunchData containing the given context.

This is essentially a combination of `gs_plugin_launch_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
app | a GsApp. | [not nullable][transfer none]
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_launch_data_free ()

    void
    gs_plugin_launch_data_free (GsPluginLaunchData *data);

Free the given `data` .

#### Parameters

data | a GsPluginLaunchData. | [transfer full]

Since: 47

### gs_plugin_file_to_app_data_new ()

    GsPluginFileToAppData *
    gs_plugin_file_to_app_data_new (GFile *file,
                                    GsPluginFileToAppFlags flags);

Common context data for a call to GsPluginClass.file_to_app_async.

#### Parameters

file | a GFile. | [not nullable][transfer none]
flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_file_to_app_data_new_task ()

    GTask *
    gs_plugin_file_to_app_data_new_task (gpointer source_object,
                                         GFile *file,
                                         GsPluginFileToAppFlags flags,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Create a GTask for a file-to-app operation with the given arguments. The task data will be set to a GsPluginFileToAppData containing the given context.

This is essentially a combination of `gs_plugin_file_to_app_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
file | a GFile. | [not nullable][transfer none]
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_file_to_app_data_free ()

    void
    gs_plugin_file_to_app_data_free (GsPluginFileToAppData *data);

Free the given `data` .

#### Parameters

data | a GsPluginFileToAppData. | [transfer full]

Since: 47

### gs_plugin_url_to_app_data_new ()

    GsPluginUrlToAppData *
    gs_plugin_url_to_app_data_new (const gchar *url,
                                   GsPluginUrlToAppFlags flags);

Common context data for a call to GsPluginClass.url_to_app_async.

#### Parameters

url | a URL. | [not nullable]
flags | operation flags |

#### Returns

context data structure.

[transfer full]

Since: 47

### gs_plugin_url_to_app_data_new_task ()

    GTask *
    gs_plugin_url_to_app_data_new_task (gpointer source_object,
                                        const gchar *url,
                                        GsPluginUrlToAppFlags flags,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

Create a GTask for a url-to-app operation with the given arguments. The task data will be set to a GsPluginUrlToAppData containing the given context.

This is essentially a combination of `gs_plugin_url_to_app_data_new()`, `g_task_new()` and `g_task_set_task_data()`.

#### Parameters

source_object | task source object |
url | a URL. | [not nullable]
flags | operation flags |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | function to call once asynchronous operation is finished |
user_data | data to pass to `callback` |

#### Returns

new GTask with the given context data.

[transfer full]

Since: 47

### gs_plugin_url_to_app_data_free ()

    void
    gs_plugin_url_to_app_data_free (GsPluginUrlToAppData *data);

Free the given `data` .

#### Parameters

data | a GsPluginUrlToAppData. | [transfer full]

Since: 47

## Types and Values

### GsPluginRefineData

    typedef struct {
    	GsAppList *list;  /* (owned) (not nullable) */
    	GsPluginRefineFlags flags;
    } GsPluginRefineData;

### GsPluginRefreshMetadataData

    typedef struct {
    	guint64 cache_age_secs;
    	GsPluginRefreshMetadataFlags flags;
    } GsPluginRefreshMetadataData;

### GsPluginListAppsData

    typedef struct {
    	GsAppQuery *query;  /* (owned) (nullable) */
    	GsPluginListAppsFlags flags;
    } GsPluginListAppsData;

### GsPluginManageRepositoryData

    typedef struct {
    	GsApp *repository;  /* (owned) (nullable) */
    	GsPluginManageRepositoryFlags flags;
    } GsPluginManageRepositoryData;

### GsPluginRefineCategoriesData

    typedef struct {
    	GPtrArray *list;  /* (element-type GsCategory) (owned) (not nullable) */
    	GsPluginRefineCategoriesFlags flags;
    } GsPluginRefineCategoriesData;

### GsPluginInstallAppsData

    typedef struct {
    	GsAppList *apps;  /* (owned) (not nullable) */
    	GsPluginInstallAppsFlags flags;
    	GsPluginProgressCallback progress_callback;
    	gpointer progress_user_data;
    	GsPluginAppNeedsUserActionCallback app_needs_user_action_callback;
    	gpointer app_needs_user_action_data;
    } GsPluginInstallAppsData;

### GsPluginUninstallAppsData

    typedef struct {
    	GsAppList *apps;  /* (owned) (not nullable) */
    	GsPluginUninstallAppsFlags flags;
    	GsPluginProgressCallback progress_callback;
    	gpointer progress_user_data;
    	GsPluginAppNeedsUserActionCallback app_needs_user_action_callback;
    	gpointer app_needs_user_action_data;
    } GsPluginUninstallAppsData;

### GsPluginUpdateAppsData

    typedef struct {
    	GsAppList *apps;  /* (owned) (not nullable) */
    	GsPluginUpdateAppsFlags flags;
    	GsPluginProgressCallback progress_callback;
    	gpointer progress_user_data;
    	GsPluginAppNeedsUserActionCallback app_needs_user_action_callback;
    	gpointer app_needs_user_action_data;
    } GsPluginUpdateAppsData;

### GsPluginCancelOfflineUpdateData

    typedef struct {
    	GsPluginCancelOfflineUpdateFlags flags;
    } GsPluginCancelOfflineUpdateData;

### GsPluginDownloadUpgradeData

    typedef struct {
    	GsApp *app;  /* (owned) (not nullable) */
    	GsPluginDownloadUpgradeFlags flags;
    } GsPluginDownloadUpgradeData;

### GsPluginTriggerUpgradeData

    typedef struct {
    	GsApp *app;  /* (owned) (not nullable) */
    	GsPluginTriggerUpgradeFlags flags;
    } GsPluginTriggerUpgradeData;

### GsPluginLaunchData

    typedef struct {
    	GsApp *app;  /* (owned) (not nullable) */
    	GsPluginLaunchFlags flags;
    } GsPluginLaunchData;

### GsPluginFileToAppData

    typedef struct {
    	GFile *file;  /* (owned) */
    	GsPluginFileToAppFlags flags;
    } GsPluginFileToAppData;

### GsPluginUrlToAppData

    typedef struct {
    	gchar *url;  /* (owned) */
    	GsPluginUrlToAppFlags flags;
    } GsPluginUrlToAppData;