1 /* ide-build-manager.h
2  *
3  * Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  * SPDX-License-Identifier: GPL-3.0-or-later
19  */
20 
21 #pragma once
22 
23 #if !defined (IDE_FOUNDRY_INSIDE) && !defined (IDE_FOUNDRY_COMPILATION)
24 # error "Only <libide-foundry.h> can be included directly."
25 #endif
26 
27 #include <libide-core.h>
28 
29 #include "ide-pipeline.h"
30 
31 G_BEGIN_DECLS
32 
33 #define IDE_TYPE_BUILD_MANAGER (ide_build_manager_get_type())
34 
35 IDE_AVAILABLE_IN_3_32
36 G_DECLARE_FINAL_TYPE (IdeBuildManager, ide_build_manager, IDE, BUILD_MANAGER, IdeObject)
37 
38 IDE_AVAILABLE_IN_3_32
39 IdeBuildManager  *ide_build_manager_from_context        (IdeContext           *context);
40 IDE_AVAILABLE_IN_3_32
41 IdeBuildManager  *ide_build_manager_ref_from_context    (IdeContext           *context);
42 IDE_AVAILABLE_IN_3_32
43 gboolean          ide_build_manager_get_busy            (IdeBuildManager      *self);
44 IDE_AVAILABLE_IN_3_32
45 gboolean          ide_build_manager_get_can_build       (IdeBuildManager      *self);
46 IDE_AVAILABLE_IN_3_32
47 guint             ide_build_manager_get_error_count     (IdeBuildManager      *self);
48 IDE_AVAILABLE_IN_3_32
49 guint             ide_build_manager_get_warning_count   (IdeBuildManager      *self);
50 IDE_AVAILABLE_IN_3_32
51 gchar            *ide_build_manager_get_message         (IdeBuildManager      *self);
52 IDE_AVAILABLE_IN_3_32
53 GDateTime        *ide_build_manager_get_last_build_time (IdeBuildManager      *self);
54 IDE_AVAILABLE_IN_3_32
55 GTimeSpan         ide_build_manager_get_running_time    (IdeBuildManager      *self);
56 IDE_AVAILABLE_IN_3_32
57 void              ide_build_manager_invalidate          (IdeBuildManager      *self);
58 IDE_AVAILABLE_IN_3_32
59 void              ide_build_manager_cancel              (IdeBuildManager      *self);
60 IDE_AVAILABLE_IN_3_32
61 IdePipeline *ide_build_manager_get_pipeline        (IdeBuildManager      *self);
62 IDE_AVAILABLE_IN_3_32
63 IdePipeline *ide_build_manager_ref_pipeline        (IdeBuildManager      *self);
64 IDE_AVAILABLE_IN_3_32
65 void              ide_build_manager_rebuild_async       (IdeBuildManager      *self,
66                                                          IdePipelinePhase         phase,
67                                                          GPtrArray            *targets,
68                                                          GCancellable         *cancellable,
69                                                          GAsyncReadyCallback   callback,
70                                                          gpointer              user_data);
71 IDE_AVAILABLE_IN_3_32
72 gboolean          ide_build_manager_rebuild_finish      (IdeBuildManager      *self,
WriteFile(const char * path)73                                                          GAsyncResult         *result,
74                                                          GError              **error);
75 IDE_AVAILABLE_IN_3_32
76 void              ide_build_manager_build_async       (IdeBuildManager      *self,
77                                                          IdePipelinePhase         phase,
78                                                          GPtrArray            *targets,
79                                                          GCancellable         *cancellable,
80                                                          GAsyncReadyCallback   callback,
81                                                          gpointer              user_data);
82 IDE_AVAILABLE_IN_3_32
83 gboolean          ide_build_manager_build_finish      (IdeBuildManager      *self,
84                                                          GAsyncResult         *result,
85                                                          GError              **error);
86 IDE_AVAILABLE_IN_3_32
87 void              ide_build_manager_clean_async         (IdeBuildManager      *self,
88                                                          IdePipelinePhase         phase,
89                                                          GCancellable         *cancellable,
90                                                          GAsyncReadyCallback   callback,
91                                                          gpointer              user_data);
92 IDE_AVAILABLE_IN_3_32
93 gboolean          ide_build_manager_clean_finish        (IdeBuildManager      *self,
94                                                          GAsyncResult         *result,
95                                                          GError              **error);
96 
97 G_END_DECLS
98