[gnome-builder] pipeline: add helper to get runtime
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] pipeline: add helper to get runtime
- Date: Mon, 16 Oct 2017 09:51:08 +0000 (UTC)
commit 9a9de225ecf244453e779414490192a783a6232e
Author: Christian Hergert <chergert redhat com>
Date: Mon Oct 16 02:31:39 2017 -0700
pipeline: add helper to get runtime
src/libide/buildsystem/ide-build-pipeline.c | 18 ++++++++++++++++++
src/libide/buildsystem/ide-build-pipeline.h | 2 ++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index c1ed12d..b1e0725 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -2057,6 +2057,24 @@ ide_build_pipeline_get_stage_by_id (IdeBuildPipeline *self,
}
/**
+ * ide_build_pipeline_get_runtime:
+ * @self: An #IdeBuildPipeline
+ *
+ * A convenience function to get the runtime for a build pipeline.
+ *
+ * Returns: (transfer none) (nullable): An #IdeRuntime or %NULL
+ *
+ * Since: 3.28
+ */
+IdeRuntime *
+ide_build_pipeline_get_runtime (IdeBuildPipeline *self)
+{
+ g_return_val_if_fail (IDE_IS_BUILD_PIPELINE (self), NULL);
+
+ return ide_configuration_get_runtime (self->configuration);
+}
+
+/**
* ide_build_pipeline_create_launcher:
* @self: An #IdeBuildPipeline
*
diff --git a/src/libide/buildsystem/ide-build-pipeline.h b/src/libide/buildsystem/ide-build-pipeline.h
index d3a305d..f77e42a 100644
--- a/src/libide/buildsystem/ide-build-pipeline.h
+++ b/src/libide/buildsystem/ide-build-pipeline.h
@@ -25,6 +25,7 @@
#include "buildsystem/ide-build-log.h"
#include "buildsystem/ide-build-stage.h"
#include "buildsystem/ide-configuration.h"
+#include "runtimes/ide-runtime.h"
#include "subprocess/ide-subprocess-launcher.h"
G_BEGIN_DECLS
@@ -55,6 +56,7 @@ G_DECLARE_FINAL_TYPE (IdeBuildPipeline, ide_build_pipeline, IDE, BUILD_PIPELINE,
gboolean ide_build_pipeline_get_busy (IdeBuildPipeline *self);
IdeConfiguration *ide_build_pipeline_get_configuration (IdeBuildPipeline *self);
+IdeRuntime *ide_build_pipeline_get_runtime (IdeBuildPipeline *self);
const gchar *ide_build_pipeline_get_builddir (IdeBuildPipeline *self);
const gchar *ide_build_pipeline_get_srcdir (IdeBuildPipeline *self);
gchar *ide_build_pipeline_get_message (IdeBuildPipeline *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]