Top | ![]() |
![]() |
![]() |
![]() |
gs-plugin-helpersgs-plugin-helpers — Helpers for storing call closures for GsPlugin vfuncs |
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.
GsPluginRefineData * gs_plugin_refine_data_new (GsAppList *list
,GsPluginRefineFlags flags
);
Context data for a call to GsPluginClass.refine_async.
Since: 42
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()
.
Since: 42
void
gs_plugin_refine_data_free (GsPluginRefineData *data
);
Free the given data
.
Since: 42
GsPluginRefreshMetadataData * gs_plugin_refresh_metadata_data_new (guint64 cache_age_secs
,GsPluginRefreshMetadataFlags flags
);
Context data for a call to GsPluginClass.refresh_metadata_async.
cache_age_secs |
maximum allowed age of the cache in order for it to remain valid, in seconds |
|
flags |
refresh metadata flags |
Since: 42
void
gs_plugin_refresh_metadata_data_free (GsPluginRefreshMetadataData *data
);
Free the given data
.
Since: 42
GsPluginListAppsData * gs_plugin_list_apps_data_new (GsAppQuery *query
,GsPluginListAppsFlags flags
);
Context data for a call to GsPluginClass.list_apps_async.
query |
a query to filter apps, or |
[nullable][transfer none] |
flags |
list apps flags |
Since: 43
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()
.
source_object |
task source object |
|
query |
a query to filter apps, or |
[nullable][transfer none] |
flags |
list apps flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 43
void
gs_plugin_list_apps_data_free (GsPluginListAppsData *data
);
Free the given data
.
Since: 43
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.
repository |
a repository to manage. |
[not nullable][transfer none] |
flags |
manage repository flags |
Since: 43
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()
.
source_object |
task source object |
|
repository |
a repository to manage. |
[not nullable][transfer none] |
flags |
manage repository flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 43
void
gs_plugin_manage_repository_data_free (GsPluginManageRepositoryData *data
);
Free the given data
.
Since: 43
GsPluginRefineCategoriesData * gs_plugin_refine_categories_data_new (GPtrArray *list
,GsPluginRefineCategoriesFlags flags
);
Context data for a call to GsPluginClass.refine_categories_async.
Since: 43
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()
.
source_object |
task source object |
|
list |
list of GsCategory objects to refine. |
[element-type GsCategory] |
flags |
refine flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 43
void
gs_plugin_refine_categories_data_free (GsPluginRefineCategoriesData *data
);
Free the given data
.
Since: 43
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.
Since: 47
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()
.
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 |
|
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 |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_install_apps_data_free (GsPluginInstallAppsData *data
);
Free the given data
.
Since: 47
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.
Since: 47
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()
.
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 |
|
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 |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_uninstall_apps_data_free (GsPluginUninstallAppsData *data
);
Free the given data
.
Since: 47
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.
Since: 44
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()
.
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 |
|
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 |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 44
void
gs_plugin_update_apps_data_free (GsPluginUpdateAppsData *data
);
Free the given data
.
Since: 44
GsPluginCancelOfflineUpdateData *
gs_plugin_cancel_offline_update_data_new
(GsPluginCancelOfflineUpdateFlags flags
);
Common context data for a call to GsPluginClass.cancel_offline_update_async.
Since: 47
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()
.
source_object |
task source object |
|
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_cancel_offline_update_data_free
(GsPluginCancelOfflineUpdateData *data
);
Free the given data
.
Since: 47
GsPluginDownloadUpgradeData * gs_plugin_download_upgrade_data_new (GsApp *app
,GsPluginDownloadUpgradeFlags flags
);
Common context data for a call to GsPluginClass.download_upgrade_async.
app |
a GsApp, with kind |
[not nullable][transfer none] |
flags |
operation flags |
Since: 47
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()
.
source_object |
task source object |
|
app |
a GsApp, with kind |
[not nullable][transfer none] |
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_download_upgrade_data_free (GsPluginDownloadUpgradeData *data
);
Free the given data
.
Since: 47
GsPluginTriggerUpgradeData * gs_plugin_trigger_upgrade_data_new (GsApp *app
,GsPluginTriggerUpgradeFlags flags
);
Common context data for a call to GsPluginClass.trigger_upgrade_async.
app |
a GsApp, with kind |
[not nullable][transfer none] |
flags |
operation flags |
Since: 47
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()
.
source_object |
task source object |
|
app |
a GsApp, with kind |
[not nullable][transfer none] |
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_trigger_upgrade_data_free (GsPluginTriggerUpgradeData *data
);
Free the given data
.
Since: 47
GsPluginLaunchData * gs_plugin_launch_data_new (GsApp *app
,GsPluginLaunchFlags flags
);
Common context data for a call to GsPluginClass.launch_async.
Since: 47
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()
.
source_object |
task source object |
|
app |
a GsApp. |
[not nullable][transfer none] |
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_launch_data_free (GsPluginLaunchData *data
);
Free the given data
.
Since: 47
GsPluginFileToAppData * gs_plugin_file_to_app_data_new (GFile *file
,GsPluginFileToAppFlags flags
);
Common context data for a call to GsPluginClass.file_to_app_async.
Since: 47
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()
.
source_object |
task source object |
|
file |
a GFile. |
[not nullable][transfer none] |
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_file_to_app_data_free (GsPluginFileToAppData *data
);
Free the given data
.
Since: 47
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.
Since: 47
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()
.
source_object |
task source object |
|
url |
a URL. |
[not nullable] |
flags |
operation flags |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
function to call once asynchronous operation is finished |
|
user_data |
data to pass to |
Since: 47
void
gs_plugin_url_to_app_data_free (GsPluginUrlToAppData *data
);
Free the given data
.
Since: 47
typedef struct { GsAppList *list; /* (owned) (not nullable) */ GsPluginRefineFlags flags; } GsPluginRefineData;
typedef struct { guint64 cache_age_secs; GsPluginRefreshMetadataFlags flags; } GsPluginRefreshMetadataData;
typedef struct { GsAppQuery *query; /* (owned) (nullable) */ GsPluginListAppsFlags flags; } GsPluginListAppsData;
typedef struct { GsApp *repository; /* (owned) (nullable) */ GsPluginManageRepositoryFlags flags; } GsPluginManageRepositoryData;
typedef struct { GPtrArray *list; /* (element-type GsCategory) (owned) (not nullable) */ GsPluginRefineCategoriesFlags flags; } GsPluginRefineCategoriesData;
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;
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;
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;
typedef struct { GsPluginCancelOfflineUpdateFlags flags; } GsPluginCancelOfflineUpdateData;
typedef struct { GsApp *app; /* (owned) (not nullable) */ GsPluginDownloadUpgradeFlags flags; } GsPluginDownloadUpgradeData;
typedef struct { GsApp *app; /* (owned) (not nullable) */ GsPluginTriggerUpgradeFlags flags; } GsPluginTriggerUpgradeData;
typedef struct { GsApp *app; /* (owned) (not nullable) */ GsPluginLaunchFlags flags; } GsPluginLaunchData;
typedef struct { GFile *file; /* (owned) */ GsPluginFileToAppFlags flags; } GsPluginFileToAppData;