[gnome-builder] buildsystem: remove get_build_targets_async()



commit 0c8185eef06256faef9b52395e401911c0a6a524
Author: Christian Hergert <chergert redhat com>
Date:   Sun Nov 19 22:32:59 2017 -0800

    buildsystem: remove get_build_targets_async()
    
    This removes the vfunc from our interface to get the build targets for
    a particular build system. We are using the build targets provider instead
    so that we can prioritize targets coming from different plugin components.

 src/libide/buildsystem/ide-build-system.c |   64 -----------------------------
 src/libide/buildsystem/ide-build-system.h |   16 -------
 2 files changed, 0 insertions(+), 80 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-system.c b/src/libide/buildsystem/ide-build-system.c
index 75d09f7..0355333 100644
--- a/src/libide/buildsystem/ide-build-system.c
+++ b/src/libide/buildsystem/ide-build-system.c
@@ -195,37 +195,12 @@ ide_build_system_real_get_build_flags_for_files_finish (IdeBuildSystem       *se
 }
 
 static void
-ide_build_system_real_get_build_targets_async (IdeBuildSystem      *self,
-                                               GCancellable        *cancellable,
-                                               GAsyncReadyCallback  callback,
-                                               gpointer             user_data)
-{
-  g_task_report_new_error (self,
-                           callback,
-                           user_data,
-                           ide_build_system_real_get_build_targets_async,
-                           G_IO_ERROR,
-                           G_IO_ERROR_NOT_SUPPORTED,
-                           "Fetching build targets is not supported");
-}
-
-static GPtrArray *
-ide_build_system_real_get_build_targets_finish (IdeBuildSystem  *self,
-                                                GAsyncResult    *result,
-                                                GError         **error)
-{
-  return g_task_propagate_pointer (G_TASK (result), error);
-}
-
-static void
 ide_build_system_default_init (IdeBuildSystemInterface *iface)
 {
   iface->get_build_flags_async = ide_build_system_real_get_build_flags_async;
   iface->get_build_flags_finish = ide_build_system_real_get_build_flags_finish;
   iface->get_build_flags_for_files_async = ide_build_system_real_get_build_flags_for_files_async;
   iface->get_build_flags_for_files_finish = ide_build_system_real_get_build_flags_for_files_finish;
-  iface->get_build_targets_async = ide_build_system_real_get_build_targets_async;
-  iface->get_build_targets_finish = ide_build_system_real_get_build_targets_finish;
 
   properties [PROP_PROJECT_FILE] =
     g_param_spec_object ("project-file",
@@ -523,45 +498,6 @@ ide_build_system_get_build_flags_for_files_finish (IdeBuildSystem       *self,
   IDE_RETURN (ret);
 }
 
-void
-ide_build_system_get_build_targets_async (IdeBuildSystem      *self,
-                                          GCancellable        *cancellable,
-                                          GAsyncReadyCallback  callback,
-                                          gpointer             user_data)
-{
-  IDE_ENTRY;
-
-  g_return_if_fail (IDE_IS_BUILD_SYSTEM (self));
-  g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
-
-  IDE_BUILD_SYSTEM_GET_IFACE (self)->get_build_targets_async (self, cancellable, callback, user_data);
-
-  IDE_EXIT;
-}
-
-/**
- * ide_build_system_get_build_targets_finish:
- *
- * Returns: (transfer container) (element-type Ide.BuildTarget): An array
- *   of #IdeBuildTarget or %NULL and @error is set.
- */
-GPtrArray *
-ide_build_system_get_build_targets_finish (IdeBuildSystem  *self,
-                                           GAsyncResult    *result,
-                                           GError         **error)
-{
-  GPtrArray *ret;
-
-  IDE_ENTRY;
-
-  g_return_val_if_fail (IDE_IS_BUILD_SYSTEM (self), NULL);
-  g_return_val_if_fail (G_IS_TASK (result), NULL);
-
-  ret = IDE_BUILD_SYSTEM_GET_IFACE (self)->get_build_targets_finish (self, result, error);
-
-  IDE_RETURN (ret);
-}
-
 gchar *
 ide_build_system_get_builddir (IdeBuildSystem   *self,
                                IdeConfiguration *configuration)
diff --git a/src/libide/buildsystem/ide-build-system.h b/src/libide/buildsystem/ide-build-system.h
index c3a8e16..913ed82 100644
--- a/src/libide/buildsystem/ide-build-system.h
+++ b/src/libide/buildsystem/ide-build-system.h
@@ -51,13 +51,6 @@ struct _IdeBuildSystemInterface
   GHashTable *(*get_build_flags_for_files_finish)  (IdeBuildSystem       *self,
                                                     GAsyncResult         *result,
                                                     GError              **error);
-  void        (*get_build_targets_async)           (IdeBuildSystem       *self,
-                                                    GCancellable         *cancellable,
-                                                    GAsyncReadyCallback   callback,
-                                                    gpointer              user_data);
-  GPtrArray  *(*get_build_targets_finish)          (IdeBuildSystem       *self,
-                                                    GAsyncResult         *result,
-                                                    GError              **error);
   gchar      *(*get_builddir)                      (IdeBuildSystem       *self,
                                                     IdeConfiguration     *configuration);
   gchar      *(*get_id)                            (IdeBuildSystem       *self);
@@ -103,15 +96,6 @@ IDE_AVAILABLE_IN_ALL
 GHashTable     *ide_build_system_get_build_flags_for_files_finish  (IdeBuildSystem       *self,
                                                                     GAsyncResult         *result,
                                                                     GError              **error);
-IDE_AVAILABLE_IN_ALL
-void            ide_build_system_get_build_targets_async           (IdeBuildSystem       *self,
-                                                                    GCancellable         *cancellable,
-                                                                    GAsyncReadyCallback   callback,
-                                                                    gpointer              user_data);
-IDE_AVAILABLE_IN_ALL
-GPtrArray      *ide_build_system_get_build_targets_finish          (IdeBuildSystem       *self,
-                                                                    GAsyncResult         *result,
-                                                                    GError              **error);
 void            _ide_build_system_set_project_file                 (IdeBuildSystem       *self,
                                                                     GFile                *project_file) 
G_GNUC_INTERNAL;
 


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