[gnome-software] Remove online-update functionality



commit 46eca30b6786b66af9c8eeac1f64f1ffdd6fbc0b
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 22 13:38:26 2013 +0100

    Remove online-update functionality

 src/gs-plugin-loader.c             |   16 ----------
 src/gs-plugin-loader.h             |    4 --
 src/plugins/gs-plugin-packagekit.c |   58 ------------------------------------
 3 files changed, 0 insertions(+), 78 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index bf73b67..26c46c5 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -883,22 +883,6 @@ out:
 }
 
 /**
- * gs_plugin_loader_app_update:
- **/
-gboolean
-gs_plugin_loader_app_update (GsPluginLoader *plugin_loader,
-                            GsApp *app,
-                            GCancellable *cancellable,
-                            GError **error)
-{
-       return gs_plugin_loader_run_action (plugin_loader,
-                                           app,
-                                           "gs_plugin_app_update",
-                                           cancellable,
-                                           error);
-}
-
-/**
  * gs_plugin_loader_app_install:
  **/
 gboolean
diff --git a/src/gs-plugin-loader.h b/src/gs-plugin-loader.h
index 586f1e4..3c3c888 100644
--- a/src/gs-plugin-loader.h
+++ b/src/gs-plugin-loader.h
@@ -110,10 +110,6 @@ gboolean    gs_plugin_loader_app_install           (GsPluginLoader *plugin_loader,
                                                         GsApp          *app,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
-gboolean        gs_plugin_loader_app_update            (GsPluginLoader *plugin_loader,
-                                                        GsApp          *app,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
 gboolean        gs_plugin_loader_app_remove            (GsPluginLoader *plugin_loader,
                                                         GsApp          *app,
                                                         GCancellable   *cancellable,
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index ca65c16..db248db 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -491,61 +491,3 @@ out:
                g_object_unref (results);
        return ret;
 }
-
-/**
- * gs_plugin_app_update:
- */
-gboolean
-gs_plugin_app_update (GsPlugin *plugin,
-                     GsApp *app,
-                     GCancellable *cancellable,
-                     GError **error)
-{
-       const gchar *package_id;
-       const gchar *to_array[] = { NULL, NULL };
-       gboolean ret = TRUE;
-       GPtrArray *array = NULL;
-       PkError *error_code = NULL;
-       PkResults *results = NULL;
-
-       package_id = gs_app_get_metadata_item (app, "package-id");
-       if (package_id == NULL) {
-               ret = FALSE;
-               g_set_error_literal (error,
-                                    GS_PLUGIN_ERROR,
-                                    GS_PLUGIN_ERROR_NOT_SUPPORTED,
-                                    "installing not supported");
-               goto out;
-       }
-       to_array[0] = package_id;
-       results = pk_task_update_packages_sync (plugin->priv->task,
-                                               (gchar **) to_array,
-                                               cancellable,
-                                               gs_plugin_packagekit_progress_cb, plugin,
-                                               error);
-       if (results == NULL) {
-               ret = FALSE;
-               goto out;
-       }
-
-       /* check error code */
-       error_code = pk_results_get_error_code (results);
-       if (error_code != NULL) {
-               ret = FALSE;
-               g_set_error (error,
-                            GS_PLUGIN_ERROR,
-                            GS_PLUGIN_ERROR_FAILED,
-                            "failed to updayte package: %s, %s",
-                            pk_error_enum_to_string (pk_error_get_code (error_code)),
-                            pk_error_get_details (error_code));
-               goto out;
-       }
-out:
-       if (error_code != NULL)
-               g_object_unref (error_code);
-       if (array != NULL)
-               g_ptr_array_unref (array);
-       if (results != NULL)
-               g_object_unref (results);
-       return ret;
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]