[gnome-software] Add GsPluginFailureFlags to all plugin loader actions
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add GsPluginFailureFlags to all plugin loader actions
- Date: Thu, 24 Nov 2016 21:07:43 +0000 (UTC)
commit 2a4f32c98bd3bfdd836c6c6435cd7b820227c714
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 24 20:51:59 2016 +0000
Add GsPluginFailureFlags to all plugin loader actions
The plan here is to allow the application caller to decide what happens when
a plugin error occurs. This might be an in-app notification or just to ignore
it and print to the console.
src/gs-application.c | 3 ++
src/gs-auth-dialog.c | 1 +
src/gs-cmd.c | 18 ++++++++++++++++-
src/gs-page.c | 10 +++++++++
src/gs-plugin-loader-sync.c | 37 ++++++++++++++++++++++++++++++++--
src/gs-plugin-loader-sync.h | 15 ++++++++++++++
src/gs-plugin-loader.c | 40 ++++++++++++++++++++++++++++++++++++++
src/gs-plugin-loader.h | 20 +++++++++++++++++++
src/gs-plugin-types.h | 12 +++++++++++
src/gs-self-test.c | 42 +++++++++++++++++++++++++++++++++++++++-
src/gs-shell-category.c | 1 +
src/gs-shell-details.c | 6 +++++
src/gs-shell-extras.c | 3 ++
src/gs-shell-installed.c | 1 +
src/gs-shell-loading.c | 1 +
src/gs-shell-moderate.c | 3 ++
src/gs-shell-overview.c | 5 ++++
src/gs-shell-search-provider.c | 1 +
src/gs-shell-search.c | 1 +
src/gs-shell-updates.c | 8 +++++++
src/gs-sources-dialog.c | 4 +++
src/gs-update-dialog.c | 1 +
src/gs-update-monitor.c | 4 +++
23 files changed, 232 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index bc5bc5d..29bae74 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -177,6 +177,7 @@ gs_application_initialize_plugins (GsApplication *app)
if (!gs_plugin_loader_setup (app->plugin_loader,
plugin_whitelist,
plugin_blacklist,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error)) {
g_warning ("Failed to setup plugins: %s", error->message);
@@ -399,6 +400,7 @@ reboot_failed_cb (GObject *source, GAsyncResult *res, gpointer user_data)
gs_plugin_loader_app_action_async (app->plugin_loader,
NULL, /* everything! */
GS_PLUGIN_ACTION_UPDATE_CANCEL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
app->cancellable,
cancel_trigger_failed_cb,
app);
@@ -474,6 +476,7 @@ reboot_and_install (GSimpleAction *action,
gs_application_initialize_plugins (app);
gs_plugin_loader_update_async (app->plugin_loader,
NULL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
app->cancellable,
(GAsyncReadyCallback) offline_update_cb,
app);
diff --git a/src/gs-auth-dialog.c b/src/gs-auth-dialog.c
index 21743da..a1afdd6 100644
--- a/src/gs-auth-dialog.c
+++ b/src/gs-auth-dialog.c
@@ -172,6 +172,7 @@ gs_auth_dialog_continue_cb (GtkWidget *widget, GsAuthDialog *dialog)
gs_plugin_loader_auth_action_async (dialog->plugin_loader,
dialog->auth,
action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
gs_auth_dialog_authenticate_cb,
dialog);
diff --git a/src/gs-cmd.c b/src/gs-cmd.c
index b276e6d..bfdb57a 100644
--- a/src/gs-cmd.c
+++ b/src/gs-cmd.c
@@ -276,6 +276,7 @@ main (int argc, char **argv)
ret = gs_plugin_loader_setup (plugin_loader,
plugin_whitelist,
plugin_blacklist,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (!ret) {
@@ -291,6 +292,7 @@ main (int argc, char **argv)
g_object_unref (list);
list = gs_plugin_loader_get_installed (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -305,6 +307,7 @@ main (int argc, char **argv)
list = gs_plugin_loader_search (plugin_loader,
argv[2],
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -318,6 +321,7 @@ main (int argc, char **argv)
ret = gs_plugin_loader_app_action (plugin_loader,
app,
GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (ret)
@@ -328,6 +332,7 @@ main (int argc, char **argv)
ret = gs_plugin_loader_app_refine (plugin_loader,
app,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (!ret)
@@ -340,6 +345,7 @@ main (int argc, char **argv)
ret = gs_plugin_loader_app_action (plugin_loader,
app,
GS_PLUGIN_ACTION_LAUNCH,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (!ret)
@@ -350,6 +356,7 @@ main (int argc, char **argv)
app = gs_plugin_loader_file_to_app (plugin_loader,
file,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (app == NULL) {
@@ -364,6 +371,7 @@ main (int argc, char **argv)
g_object_unref (list);
list = gs_plugin_loader_get_updates (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -377,6 +385,7 @@ main (int argc, char **argv)
g_object_unref (list);
list = gs_plugin_loader_get_distro_upgrades (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -387,6 +396,7 @@ main (int argc, char **argv)
} else if (argc == 2 && g_strcmp0 (argv[1], "sources") == 0) {
list = gs_plugin_loader_get_sources (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL)
@@ -397,6 +407,7 @@ main (int argc, char **argv)
g_object_unref (list);
list = gs_plugin_loader_get_popular (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -410,6 +421,7 @@ main (int argc, char **argv)
g_object_unref (list);
list = gs_plugin_loader_get_featured (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -423,6 +435,7 @@ main (int argc, char **argv)
g_ptr_array_unref (categories);
categories = gs_plugin_loader_get_categories (plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (categories == NULL) {
@@ -448,6 +461,7 @@ main (int argc, char **argv)
list = gs_plugin_loader_get_category_apps (plugin_loader,
category,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
if (list == NULL) {
@@ -459,7 +473,9 @@ main (int argc, char **argv)
GsPluginRefreshFlags refresh_flags;
refresh_flags = gs_cmd_refresh_flag_from_string (argv[2]);
ret = gs_plugin_loader_refresh (plugin_loader, cache_age,
- refresh_flags, NULL, &error);
+ refresh_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
+ NULL, &error);
} else {
ret = FALSE;
g_set_error_literal (&error,
diff --git a/src/gs-page.c b/src/gs-page.c
index 5c21b0a..af4d2da 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -91,6 +91,7 @@ gs_page_install_authenticate_cb (GtkDialog *dialog,
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -118,6 +119,7 @@ gs_page_remove_authenticate_cb (GtkDialog *dialog,
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_removed_cb,
helper);
@@ -291,6 +293,7 @@ gs_page_install_app (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -315,6 +318,7 @@ gs_page_update_app_response_cb (GtkDialog *dialog,
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
GS_PLUGIN_ACTION_UPDATE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -410,6 +414,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_installed_cb,
helper);
@@ -434,6 +439,7 @@ gs_page_remove_app_response_cb (GtkDialog *dialog,
gs_plugin_loader_app_action_async (priv->plugin_loader,
helper->app,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_removed_cb,
helper);
@@ -459,6 +465,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->cancellable,
gs_page_app_removed_cb,
helper);
@@ -529,6 +536,7 @@ gs_page_launch_app (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
GS_PLUGIN_ACTION_LAUNCH,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
cancellable,
gs_page_app_launched_cb,
NULL);
@@ -554,6 +562,7 @@ gs_page_shortcut_add (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
GS_PLUGIN_ACTION_ADD_SHORTCUT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
cancellable,
gs_page_app_shortcut_added_cb,
NULL);
@@ -579,6 +588,7 @@ gs_page_shortcut_remove (GsPage *page, GsApp *app, GCancellable *cancellable)
gs_plugin_loader_app_action_async (priv->plugin_loader,
app,
GS_PLUGIN_ACTION_REMOVE_SHORTCUT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
cancellable,
gs_page_app_shortcut_removed_cb,
NULL);
diff --git a/src/gs-plugin-loader-sync.c b/src/gs-plugin-loader-sync.c
index 74d9de5..9c1cc24 100644
--- a/src/gs-plugin-loader-sync.c
+++ b/src/gs-plugin-loader-sync.c
@@ -35,6 +35,7 @@ gs_plugin_loader_get_app_by_id (GsPluginLoader *plugin_loader,
app = gs_app_new (id);
ret = gs_plugin_loader_app_refine (plugin_loader, app, refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
cancellable, error);
if (!ret)
g_clear_object (&app);
@@ -66,6 +67,7 @@ gs_plugin_loader_get_installed_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_installed (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -81,6 +83,7 @@ gs_plugin_loader_get_installed (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_installed_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback)
gs_plugin_loader_get_installed_finish_sync,
&helper);
@@ -109,6 +112,7 @@ GsAppList *
gs_plugin_loader_search (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -125,6 +129,7 @@ gs_plugin_loader_search (GsPluginLoader *plugin_loader,
gs_plugin_loader_search_async (plugin_loader,
value,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_search_finish_sync,
&helper);
@@ -152,6 +157,7 @@ gs_plugin_loader_get_updates_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_updates (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -167,6 +173,7 @@ gs_plugin_loader_get_updates (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_updates_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_get_updates_finish_sync,
&helper);
@@ -193,9 +200,10 @@ gs_plugin_loader_get_distro_upgrades_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_distro_upgrades (GsPluginLoader *plugin_loader,
- GsPluginRefineFlags refine_flags,
- GCancellable *cancellable,
- GError **error)
+ GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
+ GCancellable *cancellable,
+ GError **error)
{
GsPluginLoaderHelper helper;
@@ -209,6 +217,7 @@ gs_plugin_loader_get_distro_upgrades (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_distro_upgrades_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback)
gs_plugin_loader_get_distro_upgrades_finish_sync,
&helper);
@@ -236,6 +245,7 @@ gs_plugin_loader_get_sources_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_sources (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -251,6 +261,7 @@ gs_plugin_loader_get_sources (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_sources_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_get_sources_finish_sync,
&helper);
@@ -278,6 +289,7 @@ gs_plugin_loader_get_popular_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_popular (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -293,6 +305,7 @@ gs_plugin_loader_get_popular (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_popular_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_get_popular_finish_sync,
&helper);
@@ -320,6 +333,7 @@ gs_plugin_loader_get_featured_finish_sync (GsPluginLoader *plugin_loader,
GsAppList *
gs_plugin_loader_get_featured (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -335,6 +349,7 @@ gs_plugin_loader_get_featured (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_featured_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_get_featured_finish_sync,
&helper);
@@ -362,6 +377,7 @@ gs_plugin_loader_get_categories_finish_sync (GsPluginLoader *plugin_loader,
GPtrArray *
gs_plugin_loader_get_categories (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -377,6 +393,7 @@ gs_plugin_loader_get_categories (GsPluginLoader *plugin_loader,
/* run async method */
gs_plugin_loader_get_categories_async (plugin_loader,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback)
gs_plugin_loader_get_categories_finish_sync,
&helper);
@@ -405,6 +422,7 @@ GsAppList *
gs_plugin_loader_get_category_apps (GsPluginLoader *plugin_loader,
GsCategory *category,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -421,6 +439,7 @@ gs_plugin_loader_get_category_apps (GsPluginLoader *plugin_loader,
gs_plugin_loader_get_category_apps_async (plugin_loader,
category,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback)
gs_plugin_loader_get_category_apps_finish_sync,
&helper);
@@ -449,6 +468,7 @@ gboolean
gs_plugin_loader_app_refine (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -465,6 +485,7 @@ gs_plugin_loader_app_refine (GsPluginLoader *plugin_loader,
gs_plugin_loader_app_refine_async (plugin_loader,
app,
refine_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_app_refine_finish_sync,
&helper);
@@ -493,6 +514,7 @@ gboolean
gs_plugin_loader_app_action (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -509,6 +531,7 @@ gs_plugin_loader_app_action (GsPluginLoader *plugin_loader,
gs_plugin_loader_app_action_async (plugin_loader,
app,
action,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_app_action_finish_sync,
&helper);
@@ -538,6 +561,7 @@ gs_plugin_loader_review_action (GsPluginLoader *plugin_loader,
GsApp *app,
AsReview *review,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -555,6 +579,7 @@ gs_plugin_loader_review_action (GsPluginLoader *plugin_loader,
app,
review,
action,
+ failure_flags,
cancellable,
(GAsyncReadyCallback)
gs_plugin_loader_review_action_finish_sync,
&helper);
@@ -583,6 +608,7 @@ gboolean
gs_plugin_loader_auth_action (GsPluginLoader *plugin_loader,
GsAuth *auth,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -599,6 +625,7 @@ gs_plugin_loader_auth_action (GsPluginLoader *plugin_loader,
gs_plugin_loader_auth_action_async (plugin_loader,
auth,
action,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_auth_action_finish_sync,
&helper);
@@ -627,6 +654,7 @@ gboolean
gs_plugin_loader_refresh (GsPluginLoader *plugin_loader,
guint cache_age,
GsPluginRefreshFlags refresh_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -643,6 +671,7 @@ gs_plugin_loader_refresh (GsPluginLoader *plugin_loader,
gs_plugin_loader_refresh_async (plugin_loader,
cache_age,
refresh_flags,
+ failure_flags,
cancellable,
(GAsyncReadyCallback) gs_plugin_loader_refresh_finish_sync,
&helper);
@@ -673,6 +702,7 @@ GsApp *
gs_plugin_loader_file_to_app (GsPluginLoader *plugin_loader,
GFile *file,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -690,6 +720,7 @@ gs_plugin_loader_file_to_app (GsPluginLoader *plugin_loader,
gs_plugin_loader_file_to_app_async (plugin_loader,
file,
refine_flags,
+ failure_flags,
cancellable,
gs_plugin_loader_file_to_app_finish_sync,
&helper);
diff --git a/src/gs-plugin-loader-sync.h b/src/gs-plugin-loader-sync.h
index 361a433..d9e6836 100644
--- a/src/gs-plugin-loader-sync.h
+++ b/src/gs-plugin-loader-sync.h
@@ -30,66 +30,80 @@ G_BEGIN_DECLS
GsAppList *gs_plugin_loader_get_installed (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_search (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_updates (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_distro_upgrades (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_sources (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_popular (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_featured (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GPtrArray *gs_plugin_loader_get_categories (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsAppList *gs_plugin_loader_get_category_apps (GsPluginLoader *plugin_loader,
GsCategory *category,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
gboolean gs_plugin_loader_app_refine (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
gboolean gs_plugin_loader_app_action (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
gboolean gs_plugin_loader_review_action (GsPluginLoader *plugin_loader,
GsApp *app,
AsReview *review,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
gboolean gs_plugin_loader_auth_action (GsPluginLoader *plugin_loader,
GsAuth *auth,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
gboolean gs_plugin_loader_refresh (GsPluginLoader *plugin_loader,
guint cache_age,
GsPluginRefreshFlags refresh_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
GsApp *gs_plugin_loader_get_app_by_id (GsPluginLoader *plugin_loader,
@@ -100,6 +114,7 @@ GsApp *gs_plugin_loader_get_app_by_id (GsPluginLoader
*plugin_loader,
GsApp *gs_plugin_loader_file_to_app (GsPluginLoader *plugin_loader,
GFile *file,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 9fd10e1..8bd725e 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -161,6 +161,7 @@ typedef struct {
GPtrArray *catlist;
GsPluginRefineFlags refine_flags;
GsPluginRefreshFlags refresh_flags;
+ GsPluginFailureFlags failure_flags;
gchar *value;
GFile *file;
guint cache_age;
@@ -1349,6 +1350,7 @@ gs_plugin_loader_get_updates_thread_cb (GTask *task,
void
gs_plugin_loader_get_updates_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1362,6 +1364,7 @@ gs_plugin_loader_get_updates_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_UPDATES;
/* run in a thread */
@@ -1429,6 +1432,7 @@ gs_plugin_loader_get_distro_upgrades_thread_cb (GTask *task,
void
gs_plugin_loader_get_distro_upgrades_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1442,6 +1446,7 @@ gs_plugin_loader_get_distro_upgrades_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_DISTRO_UPDATES;
/* run in a thread */
@@ -1509,6 +1514,7 @@ gs_plugin_loader_get_unvoted_reviews_thread_cb (GTask *task,
void
gs_plugin_loader_get_unvoted_reviews_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1522,6 +1528,7 @@ gs_plugin_loader_get_unvoted_reviews_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_UNVOTED_REVIEWS;
/* run in a thread */
@@ -1592,6 +1599,7 @@ gs_plugin_loader_get_sources_thread_cb (GTask *task,
void
gs_plugin_loader_get_sources_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1605,6 +1613,7 @@ gs_plugin_loader_get_sources_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_SOURCES;
/* run in a thread */
@@ -1688,6 +1697,7 @@ gs_plugin_loader_get_installed_thread_cb (GTask *task,
void
gs_plugin_loader_get_installed_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1701,6 +1711,7 @@ gs_plugin_loader_get_installed_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_INSTALLED;
/* run in a thread */
@@ -1787,6 +1798,7 @@ gs_plugin_loader_get_popular_thread_cb (GTask *task,
void
gs_plugin_loader_get_popular_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1800,6 +1812,7 @@ gs_plugin_loader_get_popular_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_POPULAR;
/* run in a thread */
@@ -1900,6 +1913,7 @@ gs_plugin_loader_get_featured_thread_cb (GTask *task,
void
gs_plugin_loader_get_featured_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1913,6 +1927,7 @@ gs_plugin_loader_get_featured_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_GET_FEATURED;
/* run in a thread */
@@ -2127,6 +2142,7 @@ void
gs_plugin_loader_search_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2140,6 +2156,7 @@ gs_plugin_loader_search_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->list = gs_app_list_new ();
state->value = g_strdup (value);
state->action = GS_PLUGIN_ACTION_SEARCH;
@@ -2294,6 +2311,7 @@ void
gs_plugin_loader_search_files_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2307,6 +2325,7 @@ gs_plugin_loader_search_files_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->list = gs_app_list_new ();
state->value = g_strdup (value);
state->action = GS_PLUGIN_ACTION_SEARCH_FILES;
@@ -2461,6 +2480,7 @@ void
gs_plugin_loader_search_what_provides_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2646,6 +2666,7 @@ gs_plugin_loader_get_categories_thread_cb (GTask *task,
void
gs_plugin_loader_get_categories_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2659,6 +2680,7 @@ gs_plugin_loader_get_categories_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->catlist = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
state->action = GS_PLUGIN_ACTION_GET_CATEGORIES;
@@ -2804,6 +2826,7 @@ void
gs_plugin_loader_get_category_apps_async (GsPluginLoader *plugin_loader,
GsCategory *category,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2817,6 +2840,7 @@ gs_plugin_loader_get_category_apps_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->list = gs_app_list_new ();
state->category = g_object_ref (category);
state->action = GS_PLUGIN_ACTION_GET_CATEGORY_APPS;
@@ -2889,6 +2913,7 @@ void
gs_plugin_loader_app_refine_async (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -2904,6 +2929,7 @@ gs_plugin_loader_app_refine_async (GsPluginLoader *plugin_loader,
state = gs_plugin_loader_async_state_new (plugin_loader);
state->app = g_object_ref (app);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->action = GS_PLUGIN_ACTION_REFINE;
/* enforce this */
@@ -3277,6 +3303,7 @@ void
gs_plugin_loader_app_action_async (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -3294,6 +3321,7 @@ gs_plugin_loader_app_action_async (GsPluginLoader *plugin_loader,
g_autoptr(GsAppList) list = gs_app_list_new ();
gs_app_list_add (list, app);
gs_plugin_loader_update_async (plugin_loader, list,
+ failure_flags,
cancellable, callback,
user_data);
return;
@@ -3364,6 +3392,7 @@ gs_plugin_loader_review_action_async (GsPluginLoader *plugin_loader,
GsApp *app,
AsReview *review,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -3380,6 +3409,7 @@ gs_plugin_loader_review_action_async (GsPluginLoader *plugin_loader,
state->app = g_object_ref (app);
state->review = g_object_ref (review);
state->action = action;
+ state->failure_flags = failure_flags;
switch (action) {
case GS_PLUGIN_ACTION_REVIEW_SUBMIT:
@@ -3491,6 +3521,7 @@ void
gs_plugin_loader_auth_action_async (GsPluginLoader *plugin_loader,
GsAuth *auth,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -3506,6 +3537,7 @@ gs_plugin_loader_auth_action_async (GsPluginLoader *plugin_loader,
state = gs_plugin_loader_async_state_new (plugin_loader);
state->auth = g_object_ref (auth);
state->action = action;
+ state->failure_flags = failure_flags;
switch (action) {
case GS_PLUGIN_ACTION_AUTH_LOGIN:
@@ -3971,6 +4003,7 @@ gboolean
gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
gchar **whitelist,
gchar **blacklist,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error)
{
@@ -4528,6 +4561,7 @@ gs_plugin_loader_set_network_status (GsPluginLoader *plugin_loader,
gs_plugin_loader_app_action_async (plugin_loader,
app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
gs_plugin_loader_app_installed_cb,
g_object_ref (app));
@@ -4653,6 +4687,7 @@ void
gs_plugin_loader_refresh_async (GsPluginLoader *plugin_loader,
guint cache_age,
GsPluginRefreshFlags refresh_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -4666,6 +4701,7 @@ gs_plugin_loader_refresh_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refresh_flags = refresh_flags;
+ state->failure_flags = failure_flags;
state->cache_age = cache_age;
state->action = GS_PLUGIN_ACTION_REFRESH;
@@ -4852,6 +4888,7 @@ void
gs_plugin_loader_file_to_app_async (GsPluginLoader *plugin_loader,
GFile *file,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -4865,6 +4902,7 @@ gs_plugin_loader_file_to_app_async (GsPluginLoader *plugin_loader,
/* save state */
state = gs_plugin_loader_async_state_new (plugin_loader);
state->refine_flags = refine_flags;
+ state->failure_flags = failure_flags;
state->list = gs_app_list_new ();
state->file = g_object_ref (file);
state->action = GS_PLUGIN_ACTION_FILE_TO_APP;
@@ -5024,6 +5062,7 @@ gs_plugin_loader_update_thread_cb (GTask *task,
void
gs_plugin_loader_update_async (GsPluginLoader *plugin_loader,
GsAppList *apps,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -5038,6 +5077,7 @@ gs_plugin_loader_update_async (GsPluginLoader *plugin_loader,
state = gs_plugin_loader_async_state_new (plugin_loader);
state->list = gs_app_list_copy (apps);
state->action = GS_PLUGIN_ACTION_UPDATE;
+ state->failure_flags = failure_flags;
/* run in a thread */
task = g_task_new (plugin_loader, cancellable, callback, user_data);
diff --git a/src/gs-plugin-loader.h b/src/gs-plugin-loader.h
index d1c231e..bed8ecb 100644
--- a/src/gs-plugin-loader.h
+++ b/src/gs-plugin-loader.h
@@ -54,6 +54,7 @@ typedef void (*GsPluginLoaderFinishedFunc) (GsPluginLoader *plugin_loader,
GsPluginLoader *gs_plugin_loader_new (void);
void gs_plugin_loader_get_installed_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -62,6 +63,7 @@ GsAppList *gs_plugin_loader_get_installed_finish (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_get_updates_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -70,6 +72,7 @@ GsAppList *gs_plugin_loader_get_updates_finish (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_get_distro_upgrades_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -78,6 +81,7 @@ GsAppList *gs_plugin_loader_get_distro_upgrades_finish (GsPluginLoader *plugin_l
GError **error);
void gs_plugin_loader_get_unvoted_reviews_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -86,6 +90,7 @@ GsAppList *gs_plugin_loader_get_unvoted_reviews_finish (GsPluginLoader *plugin_l
GError **error);
void gs_plugin_loader_get_sources_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -94,6 +99,7 @@ GsAppList *gs_plugin_loader_get_sources_finish (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_get_popular_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -102,6 +108,7 @@ GsAppList *gs_plugin_loader_get_popular_finish (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_get_featured_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -110,6 +117,7 @@ GsAppList *gs_plugin_loader_get_featured_finish (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_get_categories_async (GsPluginLoader *plugin_loader,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -119,6 +127,7 @@ GPtrArray *gs_plugin_loader_get_categories_finish (GsPluginLoader *plugin_loader
void gs_plugin_loader_get_category_apps_async (GsPluginLoader *plugin_loader,
GsCategory *category,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -128,6 +137,7 @@ GsAppList *gs_plugin_loader_get_category_apps_finish (GsPluginLoader *plugin_loa
void gs_plugin_loader_search_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -137,6 +147,7 @@ GsAppList *gs_plugin_loader_search_finish (GsPluginLoader *plugin_loader,
void gs_plugin_loader_search_files_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -146,6 +157,7 @@ GsAppList *gs_plugin_loader_search_files_finish (GsPluginLoader *plugin_loader,
void gs_plugin_loader_search_what_provides_async (GsPluginLoader *plugin_loader,
const gchar *value,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -155,6 +167,7 @@ GsAppList *gs_plugin_loader_search_what_provides_finish (GsPluginLoader *plugin_
void gs_plugin_loader_file_to_app_async (GsPluginLoader *plugin_loader,
GFile *file,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -163,6 +176,7 @@ GsApp *gs_plugin_loader_file_to_app_finish (GsPluginLoader
*plugin_loader,
GError **error);
void gs_plugin_loader_update_async (GsPluginLoader *plugin_loader,
GsAppList *apps,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -172,6 +186,7 @@ gboolean gs_plugin_loader_update_finish (GsPluginLoader *plugin_loader,
gboolean gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
gchar **whitelist,
gchar **blacklist,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GError **error);
void gs_plugin_loader_dump_state (GsPluginLoader *plugin_loader);
@@ -187,6 +202,7 @@ void gs_plugin_loader_set_scale (GsPluginLoader
*plugin_loader,
void gs_plugin_loader_app_refine_async (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginRefineFlags refine_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -196,6 +212,7 @@ gboolean gs_plugin_loader_app_refine_finish (GsPluginLoader *plugin_loader,
void gs_plugin_loader_app_action_async (GsPluginLoader *plugin_loader,
GsApp *app,
GsPluginAction a,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -209,6 +226,7 @@ void gs_plugin_loader_review_action_async (GsPluginLoader
*plugin_loader,
GsApp *app,
AsReview *review,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -218,6 +236,7 @@ gboolean gs_plugin_loader_auth_action_finish (GsPluginLoader *plugin_loader,
void gs_plugin_loader_auth_action_async (GsPluginLoader *plugin_loader,
GsAuth *auth,
GsPluginAction action,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -227,6 +246,7 @@ gboolean gs_plugin_loader_refresh_finish (GsPluginLoader *plugin_loader,
void gs_plugin_loader_refresh_async (GsPluginLoader *plugin_loader,
guint cache_age,
GsPluginRefreshFlags refresh_flags,
+ GsPluginFailureFlags failure_flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/src/gs-plugin-types.h b/src/gs-plugin-types.h
index b4f6d42..64d399b 100644
--- a/src/gs-plugin-types.h
+++ b/src/gs-plugin-types.h
@@ -300,6 +300,18 @@ typedef enum {
GS_PLUGIN_ACTION_LAST
} GsPluginAction;
+/**
+ * GsPluginFailureFlags:
+ * @GS_PLUGIN_FAILURE_FLAGS_NONE: No flags set
+ *
+ * The failure flags for the plugin action.
+ **/
+typedef enum {
+ GS_PLUGIN_FAILURE_FLAGS_NONE = 0,
+ /*< private >*/
+ GS_PLUGIN_FAILURE_FLAGS_LAST
+} GsPluginFailureFlags;
+
G_END_DECLS
#endif /* __GS_PLUGIN_TYPES_H */
diff --git a/src/gs-self-test.c b/src/gs-self-test.c
index b52e9fb..25345b1 100644
--- a/src/gs-self-test.c
+++ b/src/gs-self-test.c
@@ -390,6 +390,7 @@ gs_plugin_loader_install_func (GsPluginLoader *plugin_loader)
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -400,6 +401,7 @@ gs_plugin_loader_install_func (GsPluginLoader *plugin_loader)
* but dummy::refine() sets it */
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -430,6 +432,7 @@ gs_plugin_loader_error_func (GsPluginLoader *plugin_loader)
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_UPDATE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -475,6 +478,7 @@ gs_plugin_loader_refine_func (GsPluginLoader *plugin_loader)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_URL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -498,6 +502,7 @@ gs_plugin_loader_key_colors_func (GsPluginLoader *plugin_loader)
app = gs_app_new ("zeus.desktop");
ret = gs_plugin_loader_app_refine (plugin_loader, app,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_KEY_COLORS,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -529,6 +534,7 @@ gs_plugin_loader_updates_func (GsPluginLoader *plugin_loader)
/* get the updates list */
list = gs_plugin_loader_get_updates (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -564,6 +570,7 @@ gs_plugin_loader_distro_upgrades_func (GsPluginLoader *plugin_loader)
/* get the updates list */
list = gs_plugin_loader_get_distro_upgrades (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -583,6 +590,7 @@ gs_plugin_loader_distro_upgrades_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_app_action (plugin_loader,
app,
GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -593,6 +601,7 @@ gs_plugin_loader_distro_upgrades_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_app_action (plugin_loader,
app,
GS_PLUGIN_ACTION_UPGRADE_TRIGGER,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -619,6 +628,7 @@ gs_plugin_loader_installed_func (GsPluginLoader *plugin_loader)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_MENU_PATH |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -677,6 +687,7 @@ gs_plugin_loader_search_func (GsPluginLoader *plugin_loader)
list = gs_plugin_loader_search (plugin_loader,
"spell",
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -701,6 +712,7 @@ gs_plugin_loader_modalias_func (GsPluginLoader *plugin_loader)
list = gs_plugin_loader_search (plugin_loader,
"colorhug2",
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -731,6 +743,7 @@ gs_plugin_loader_webapps_func (GsPluginLoader *plugin_loader)
gs_app_set_kind (app, AS_APP_KIND_WEB_APP);
ret = gs_plugin_loader_app_refine (plugin_loader, app,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -758,6 +771,7 @@ gs_plugin_loader_dpkg_func (GsPluginLoader *plugin_loader)
app = gs_plugin_loader_file_to_app (plugin_loader,
file,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -793,6 +807,7 @@ gs_plugin_loader_packagekit_local_func (GsPluginLoader *plugin_loader)
app = gs_plugin_loader_file_to_app (plugin_loader,
file,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -827,6 +842,7 @@ gs_plugin_loader_fwupd_func (GsPluginLoader *plugin_loader)
app = gs_plugin_loader_file_to_app (plugin_loader,
file,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -863,6 +879,7 @@ gs_plugin_loader_repos_func (GsPluginLoader *plugin_loader)
gs_app_set_origin (app, "utopia");
ret = gs_plugin_loader_app_refine (plugin_loader, app,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -896,6 +913,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
app = gs_plugin_loader_file_to_app (plugin_loader,
file,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -916,6 +934,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
/* now install the remote */
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -943,6 +962,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
app2 = gs_plugin_loader_file_to_app (plugin_loader,
file,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -952,6 +972,7 @@ gs_plugin_loader_flatpak_repo_func (GsPluginLoader *plugin_loader)
/* remove it */
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1020,6 +1041,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
gs_app_set_metadata (app_source, "flatpak::url", testdir_repourl);
ret = gs_plugin_loader_app_action (plugin_loader, app_source,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1037,6 +1059,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
/* check the source now exists */
sources = gs_plugin_loader_get_sources (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1050,6 +1073,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_refresh (plugin_loader,
G_MAXUINT,
GS_PLUGIN_REFRESH_FLAGS_METADATA,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1061,6 +1085,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1082,6 +1107,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
/* install, also installing runtime */
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1129,6 +1155,7 @@ gs_plugin_loader_flatpak_func (GsPluginLoader *plugin_loader)
/* remove the application */
ret = gs_plugin_loader_app_action (plugin_loader, app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1150,6 +1177,7 @@ gs_plugin_loader_plugin_cache_func (GsPluginLoader *plugin_loader)
/* ensure we get the same results back from calling the methods twice */
list1 = gs_plugin_loader_get_distro_upgrades (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1159,6 +1187,7 @@ gs_plugin_loader_plugin_cache_func (GsPluginLoader *plugin_loader)
list2 = gs_plugin_loader_get_distro_upgrades (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1189,6 +1218,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
/* do an action that returns a URL */
ret = gs_plugin_loader_auth_action (plugin_loader, auth,
GS_PLUGIN_ACTION_AUTH_REGISTER,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL, &error);
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_INVALID);
g_assert (!ret);
@@ -1200,6 +1230,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
review = as_review_new ();
ret = gs_plugin_loader_review_action (plugin_loader, app, review,
GS_PLUGIN_ACTION_REVIEW_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL, &error);
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_REQUIRED);
g_assert (!ret);
@@ -1208,6 +1239,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
/* pretend to auth with no credentials */
ret = gs_plugin_loader_auth_action (plugin_loader, auth,
GS_PLUGIN_ACTION_AUTH_LOGIN,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL, &error);
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_AUTH_INVALID);
g_assert (!ret);
@@ -1219,6 +1251,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
gs_auth_set_password (auth, "dummy");
ret = gs_plugin_loader_auth_action (plugin_loader, auth,
GS_PLUGIN_ACTION_AUTH_LOGIN,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL, &error);
g_assert_no_error (error);
g_assert (ret);
@@ -1228,6 +1261,7 @@ gs_plugin_loader_authentication_func (GsPluginLoader *plugin_loader)
review2 = as_review_new ();
ret = gs_plugin_loader_review_action (plugin_loader, app, review2,
GS_PLUGIN_ACTION_REVIEW_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL, &error);
g_assert_no_error (error);
g_assert (ret);
@@ -1280,6 +1314,7 @@ gs_plugin_loader_wildcard_func (GsPluginLoader *plugin_loader)
list = gs_plugin_loader_get_popular (plugin_loader,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
NULL,
&error);
g_assert_no_error (error);
@@ -1442,7 +1477,12 @@ main (int argc, char **argv)
g_signal_connect (plugin_loader, "status-changed",
G_CALLBACK (gs_plugin_loader_status_changed_cb), NULL);
gs_plugin_loader_set_location (plugin_loader, "./plugins/.libs");
- ret = gs_plugin_loader_setup (plugin_loader, (gchar**) whitelist, NULL, NULL, &error);
+ ret = gs_plugin_loader_setup (plugin_loader,
+ (gchar**) whitelist,
+ NULL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
+ NULL,
+ &error);
g_assert_no_error (error);
g_assert (ret);
g_assert (!gs_plugin_loader_get_enabled (plugin_loader, "notgoingtoexist"));
diff --git a/src/gs-shell-category.c b/src/gs-shell-category.c
index 1867c52..a6f2ced 100644
--- a/src/gs-shell-category.c
+++ b/src/gs-shell-category.c
@@ -150,6 +150,7 @@ gs_shell_category_reload (GsPage *page)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_category_get_apps_cb,
self);
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 29193d4..787afe3 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1102,6 +1102,7 @@ gs_shell_details_authenticate_cb (GtkDialog *dialog,
helper->app,
helper->review,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
helper->self->cancellable,
gs_shell_details_app_set_review_cb,
helper);
@@ -1158,6 +1159,7 @@ gs_shell_details_review_button_clicked_cb (GsReviewRow *row,
helper->app,
helper->review,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_details_app_set_review_cb,
helper);
@@ -1306,6 +1308,7 @@ gs_shell_details_app_refine2 (GsShellDetails *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_details_app_refine2_cb,
self);
@@ -1497,6 +1500,7 @@ gs_shell_details_set_filename (GsShellDetails *self, const gchar *filename)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_details_file_to_app_cb,
self);
@@ -1519,6 +1523,7 @@ gs_shell_details_load (GsShellDetails *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ADDONS,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_details_app_refine_cb,
self);
@@ -1729,6 +1734,7 @@ gs_shell_details_review_response_cb (GtkDialog *dialog,
helper->app,
helper->review,
helper->action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_details_app_set_review_cb,
helper);
diff --git a/src/gs-shell-extras.c b/src/gs-shell-extras.c
index d38d5cc..5f47fee 100644
--- a/src/gs-shell-extras.c
+++ b/src/gs-shell-extras.c
@@ -694,6 +694,7 @@ gs_shell_extras_load (GsShellExtras *self, GPtrArray *array_search_data)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->search_cancellable,
search_files_cb,
search_data);
@@ -706,6 +707,7 @@ gs_shell_extras_load (GsShellExtras *self, GPtrArray *array_search_data)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->search_cancellable,
file_to_app_cb,
search_data);
@@ -722,6 +724,7 @@ gs_shell_extras_load (GsShellExtras *self, GPtrArray *array_search_data)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->search_cancellable,
get_search_what_provides_cb,
search_data);
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 4bc49f9..ad75e22 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -248,6 +248,7 @@ gs_shell_installed_load (GsShellInstalled *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_installed_get_installed_cb,
self);
diff --git a/src/gs-shell-loading.c b/src/gs-shell-loading.c
index d9e4fb8..f99fe81 100644
--- a/src/gs-shell-loading.c
+++ b/src/gs-shell-loading.c
@@ -105,6 +105,7 @@ gs_shell_loading_load (GsShellLoading *self)
* spin up the plugins enough as to prime caches */
gs_plugin_loader_refresh_async (priv->plugin_loader, G_MAXUINT,
GS_PLUGIN_REFRESH_FLAGS_METADATA,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
gs_shell_loading_refresh_cb,
self);
diff --git a/src/gs-shell-moderate.c b/src/gs-shell-moderate.c
index 8b957e6..01d2f7f 100644
--- a/src/gs-shell-moderate.c
+++ b/src/gs-shell-moderate.c
@@ -75,6 +75,8 @@ gs_shell_moderate_review_clicked_cb (GsReviewRow *row,
app,
gs_review_row_get_review (row),
action,
+ GS_PLUGIN_FAILURE_FLAGS_NONE |
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_moderate_app_set_review_cb,
self);
@@ -188,6 +190,7 @@ gs_shell_moderate_load (GsShellModerate *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_moderate_get_unvoted_reviews_cb,
self);
diff --git a/src/gs-shell-overview.c b/src/gs-shell-overview.c
index eacfa74..534fb2f 100644
--- a/src/gs-shell-overview.c
+++ b/src/gs-shell-overview.c
@@ -491,6 +491,7 @@ gs_shell_overview_load (GsShellOverview *self)
priv->loading_featured = TRUE;
gs_plugin_loader_get_featured_async (priv->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
gs_shell_overview_get_featured_cb,
self);
@@ -502,6 +503,7 @@ gs_shell_overview_load (GsShellOverview *self)
gs_plugin_loader_get_popular_async (priv->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
gs_shell_overview_get_popular_cb,
self);
@@ -537,6 +539,7 @@ gs_shell_overview_load (GsShellOverview *self)
featured_category,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
gs_shell_overview_get_category_apps_cb,
load_data);
@@ -549,6 +552,7 @@ gs_shell_overview_load (GsShellOverview *self)
priv->loading_categories = TRUE;
gs_plugin_loader_get_categories_async (priv->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
gs_shell_overview_get_categories_cb,
self);
@@ -672,6 +676,7 @@ g_shell_overview_rescan_proprietary_sources (GsShellOverview *self)
GsShellOverviewPrivate *priv = gs_shell_overview_get_instance_private (self);
gs_plugin_loader_get_sources_async (priv->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
priv->cancellable,
(GAsyncReadyCallback) g_shell_overview_get_sources_cb,
self);
diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
index 85edb14..727429d 100644
--- a/src/gs-shell-search-provider.c
+++ b/src/gs-shell-search-provider.c
@@ -136,6 +136,7 @@ execute_search (GsShellSearchProvider *self,
gs_plugin_loader_search_async (self->plugin_loader,
string,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
search_done_cb,
pending_search);
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index cc6f5da..3727c67 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -198,6 +198,7 @@ gs_shell_search_load (GsShellSearch *self)
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->search_cancellable,
gs_shell_search_get_search_cb,
self);
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 51cc1ae..ec3ea7d 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -607,6 +607,7 @@ gs_shell_updates_load (GsShellUpdates *self)
self->action_cnt++;
gs_plugin_loader_get_updates_async (self->plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
(GAsyncReadyCallback) gs_shell_updates_get_updates_cb,
self);
@@ -616,6 +617,7 @@ gs_shell_updates_load (GsShellUpdates *self)
refine_flags |= GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPGRADE_REMOVED;
gs_plugin_loader_get_distro_upgrades_async (self->plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
gs_shell_updates_get_upgrades_cb,
self);
@@ -765,6 +767,7 @@ gs_shell_updates_get_new_updates (GsShellUpdates *self)
gs_plugin_loader_refresh_async (self->plugin_loader,
10 * 60,
refresh_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable_refresh,
(GAsyncReadyCallback) gs_shell_updates_refresh_cb,
self);
@@ -937,6 +940,7 @@ gs_shell_updates_reboot_failed_cb (GObject *source, GAsyncResult *res, gpointer
gs_plugin_loader_app_action_async (self->plugin_loader,
gs_app_list_index (apps, 0),
GS_PLUGIN_ACTION_UPDATE_CANCEL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
cancel_trigger_failed_cb,
self);
@@ -1002,6 +1006,7 @@ gs_shell_updates_button_update_all_cb (GtkButton *button,
apps = gs_update_list_get_apps (GS_UPDATE_LIST (self->list_box_updates));
gs_plugin_loader_update_async (self->plugin_loader,
apps,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
(GAsyncReadyCallback) gs_shell_updates_perform_update_cb,
self);
@@ -1064,6 +1069,7 @@ gs_shell_updates_upgrade_download_cb (GsUpgradeBanner *upgrade_banner,
gs_plugin_loader_app_action_async (self->plugin_loader,
app,
GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable_upgrade_download,
upgrade_download_finished_cb,
helper);
@@ -1099,6 +1105,7 @@ upgrade_reboot_failed_cb (GObject *source,
gs_plugin_loader_app_action_async (self->plugin_loader,
app,
GS_PLUGIN_ACTION_UPDATE_CANCEL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
cancel_trigger_failed_cb,
self);
@@ -1146,6 +1153,7 @@ trigger_upgrade (GsShellUpdates *self)
gs_plugin_loader_app_action_async (self->plugin_loader,
upgrade,
GS_PLUGIN_ACTION_UPGRADE_TRIGGER,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
self->cancellable,
upgrade_trigger_finished_cb,
self);
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index b201309..215086c 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -203,6 +203,7 @@ gs_sources_dialog_rescan_proprietary_sources (GsSourcesDialog *dialog)
gs_plugin_loader_app_action_async (dialog->plugin_loader,
app,
GS_PLUGIN_ACTION_INSTALL,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
source_modified_cb,
dialog);
@@ -212,6 +213,7 @@ gs_sources_dialog_rescan_proprietary_sources (GsSourcesDialog *dialog)
gs_plugin_loader_app_action_async (dialog->plugin_loader,
app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
source_modified_cb,
dialog);
@@ -365,6 +367,7 @@ reload_sources (GsSourcesDialog *dialog)
gs_plugin_loader_get_sources_async (dialog->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_RELATED,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
(GAsyncReadyCallback) get_sources_cb,
dialog);
@@ -512,6 +515,7 @@ remove_button_cb (GtkWidget *widget, GsSourcesDialog *dialog)
gs_plugin_loader_app_action_async (dialog->plugin_loader,
app,
GS_PLUGIN_ACTION_REMOVE,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
app_removed_cb,
dialog);
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 69e189c..2c2d1a3 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -246,6 +246,7 @@ gs_update_dialog_show_installed_updates (GsUpdateDialog *dialog)
gs_plugin_loader_get_updates_async (dialog->plugin_loader,
refine_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
dialog->cancellable,
(GAsyncReadyCallback) get_installed_updates_cb,
dialog);
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 99f5c7f..61e496e 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -288,6 +288,7 @@ get_updates (GsUpdateMonitor *monitor)
gs_plugin_loader_get_updates_async (monitor->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_SEVERITY,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
monitor->cancellable,
get_updates_finished_cb,
monitor);
@@ -302,6 +303,7 @@ get_upgrades (GsUpdateMonitor *monitor)
g_debug ("Getting upgrades");
gs_plugin_loader_get_distro_upgrades_async (monitor->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
monitor->cancellable,
get_upgrades_finished_cb,
monitor);
@@ -415,6 +417,7 @@ check_updates (GsUpdateMonitor *monitor)
gs_plugin_loader_refresh_async (monitor->plugin_loader,
60 * 60 * 24,
refresh_flags,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
monitor->cancellable,
refresh_cache_finished_cb,
monitor);
@@ -605,6 +608,7 @@ cleanup_notifications_cb (gpointer user_data)
g_debug ("getting historical updates for fresh session");
gs_plugin_loader_get_updates_async (monitor->plugin_loader,
GS_PLUGIN_REFINE_FLAGS_USE_HISTORY,
+ GS_PLUGIN_FAILURE_FLAGS_NONE,
monitor->cancellable,
get_updates_historical_cb,
monitor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]