[gnome-software: 11/16] lib: Drop GsPluginJobListInstalledApps in favour of GsPluginJobListApps
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 11/16] lib: Drop GsPluginJobListInstalledApps in favour of GsPluginJobListApps
- Date: Sun, 22 May 2022 13:39:43 +0000 (UTC)
commit 29626b900ae993ee0b69de485dbc4167a16068fa
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon May 9 11:25:33 2022 +0100
lib: Drop GsPluginJobListInstalledApps in favour of GsPluginJobListApps
There was a lot of code duplication between the two.
`GsPluginJobListInstalledApps` was useful as a prototype of
`GsPluginJobListApps` in the end.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
doc/api/gnome-software-docs.xml | 1 -
lib/gnome-software.h | 1 -
lib/gs-plugin-job-list-installed-apps.c | 574 --------------------------------
lib/gs-plugin-job-list-installed-apps.h | 32 --
lib/gs-plugin-loader.c | 4 -
lib/gs-plugin-types.h | 14 -
lib/gs-plugin.h | 14 -
lib/meson.build | 2 -
8 files changed, 642 deletions(-)
---
diff --git a/doc/api/gnome-software-docs.xml b/doc/api/gnome-software-docs.xml
index 9581f8ffc..d324d08a5 100644
--- a/doc/api/gnome-software-docs.xml
+++ b/doc/api/gnome-software-docs.xml
@@ -728,7 +728,6 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
<xi:include href="xml/gs-plugin-helpers.xml"/>
<xi:include href="xml/gs-plugin-job-list-apps.xml"/>
<xi:include href="xml/gs-plugin-job-list-distro-upgrades.xml"/>
- <xi:include href="xml/gs-plugin-job-list-installed-apps.xml"/>
<xi:include href="xml/gs-plugin-job-refine.xml"/>
<xi:include href="xml/gs-plugin-job-refresh-metadata.xml"/>
<xi:include href="xml/gs-plugin-job.xml"/>
diff --git a/lib/gnome-software.h b/lib/gnome-software.h
index cbbd215ac..a78b767c9 100644
--- a/lib/gnome-software.h
+++ b/lib/gnome-software.h
@@ -30,7 +30,6 @@
#include <gs-plugin-job.h>
#include <gs-plugin-job-list-apps.h>
#include <gs-plugin-job-list-distro-upgrades.h>
-#include <gs-plugin-job-list-installed-apps.h>
#include <gs-plugin-job-refine.h>
#include <gs-plugin-job-refresh-metadata.h>
#include <gs-plugin-vfuncs.h>
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index dffe7d762..669cdb260 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3808,10 +3808,6 @@ run_job_cb (GObject *source_object,
GsAppList *list = gs_plugin_job_refine_get_result_list (GS_PLUGIN_JOB_REFINE (plugin_job));
g_task_return_pointer (task, g_object_ref (list), (GDestroyNotify) g_object_unref);
return;
- } else if (GS_IS_PLUGIN_JOB_LIST_INSTALLED_APPS (plugin_job)) {
- GsAppList *list = gs_plugin_job_list_installed_apps_get_result_list
(GS_PLUGIN_JOB_LIST_INSTALLED_APPS (plugin_job));
- g_task_return_pointer (task, g_object_ref (list), (GDestroyNotify) g_object_unref);
- return;
} else if (GS_IS_PLUGIN_JOB_LIST_APPS (plugin_job)) {
GsAppList *list = gs_plugin_job_list_apps_get_result_list (GS_PLUGIN_JOB_LIST_APPS
(plugin_job));
g_task_return_pointer (task, g_object_ref (list), (GDestroyNotify) g_object_unref);
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index 56e4ce233..137e6501f 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -184,20 +184,6 @@ typedef enum {
GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE = 1 << 0,
} GsPluginListAppsFlags;
-/**
- * GsPluginListInstalledAppsFlags:
- * @GS_PLUGIN_LIST_INSTALLED_APPS_FLAGS_NONE: No flags set.
- * @GS_PLUGIN_LIST_INSTALLED_APPS_FLAGS_INTERACTIVE: User initiated the job.
- *
- * Flags for an operation to list installed apps.
- *
- * Since: 42
- */
-typedef enum {
- GS_PLUGIN_LIST_INSTALLED_APPS_FLAGS_NONE = 0,
- GS_PLUGIN_LIST_INSTALLED_APPS_FLAGS_INTERACTIVE = 1 << 0,
-} GsPluginListInstalledAppsFlags;
-
/**
* GsPluginRefreshMetadataFlags:
* @GS_PLUGIN_REFRESH_METADATA_FLAGS_NONE: No flags set.
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index 973002c91..709819799 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -55,11 +55,6 @@ G_DECLARE_DERIVABLE_TYPE (GsPlugin, gs_plugin, GS, PLUGIN, GObject)
* @list_apps_async: (nullable): List apps matching a given query. (Since: 43)
* @list_apps_finish: (nullable): Finish method for @list_apps_async. Must be
* implemented if @list_apps_async is implemented. (Since: 43)
- * @list_installed_apps_async: (nullable): Get the list of installed apps
- * belonging to this plugin.
- * @list_installed_apps_finish: (nullable): Finish method for
- * @list_installed_apps_async. Must be implemented if
- * @list_installed_apps_async is implemented.
* @refresh_metadata_async: (nullable): Refresh plugin metadata.
* @refresh_metadata_finish: (nullable): Finish method for
* @refresh_metadata_async. Must be implemented if @refresh_metadata_async is
@@ -134,15 +129,6 @@ struct _GsPluginClass
GAsyncResult *result,
GError **error);
- void (*list_installed_apps_async) (GsPlugin *plugin,
- GsPluginListInstalledAppsFlags flags,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GsAppList * (*list_installed_apps_finish) (GsPlugin *plugin,
- GAsyncResult *result,
- GError **error);
-
void (*refresh_metadata_async) (GsPlugin *plugin,
guint64 cache_age_secs,
GsPluginRefreshMetadataFlags flags,
diff --git a/lib/meson.build b/lib/meson.build
index 34c9ba946..69746c062 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -25,7 +25,6 @@ libgnomesoftware_public_headers = [
'gs-plugin-job.h',
'gs-plugin-job-list-apps.h',
'gs-plugin-job-list-distro-upgrades.h',
- 'gs-plugin-job-list-installed-apps.h',
'gs-plugin-job-refine.h',
'gs-plugin-job-refresh-metadata.h',
'gs-plugin-loader.h',
@@ -107,7 +106,6 @@ libgnomesoftware = library(
'gs-plugin-job.c',
'gs-plugin-job-list-apps.c',
'gs-plugin-job-list-distro-upgrades.c',
- 'gs-plugin-job-list-installed-apps.c',
'gs-plugin-job-refine.c',
'gs-plugin-job-refresh-metadata.c',
'gs-plugin-loader.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]