1 /* ide-build-target.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-foundry-types.h"
30 
31 G_BEGIN_DECLS
32 
33 #define IDE_TYPE_BUILD_TARGET (ide_build_target_get_type())
34 
35 IDE_AVAILABLE_IN_3_32
36 G_DECLARE_INTERFACE (IdeBuildTarget, ide_build_target, IDE, BUILD_TARGET, IdeObject)
37 
38 typedef enum
39 {
40   IDE_ARTIFACT_KIND_NONE,
41   IDE_ARTIFACT_KIND_EXECUTABLE,
42   IDE_ARTIFACT_KIND_SHARED_LIBRARY,
43   IDE_ARTIFACT_KIND_STATIC_LIBRARY,
44   IDE_ARTIFACT_KIND_FILE,
45 } IdeArtifactKind;
46 
47 struct _IdeBuildTargetInterface
48 {
49   GTypeInterface parent_iface;
50 
51   GFile            *(*get_install_directory) (IdeBuildTarget *self);
52   gchar            *(*get_name)              (IdeBuildTarget *self);
53   gchar            *(*get_display_name)      (IdeBuildTarget *self);
54   gint              (*get_priority)          (IdeBuildTarget *self);
55   gchar           **(*get_argv)              (IdeBuildTarget *self);
56   gchar            *(*get_cwd)               (IdeBuildTarget *self);
57   gchar            *(*get_language)          (IdeBuildTarget *self);
58   IdeArtifactKind   (*get_kind)              (IdeBuildTarget *self);
59 };
60 
61 IDE_AVAILABLE_IN_3_32
62 GFile            *ide_build_target_get_install_directory (IdeBuildTarget       *self);
63 IDE_AVAILABLE_IN_3_32
64 gchar            *ide_build_target_get_name              (IdeBuildTarget       *self);
65 IDE_AVAILABLE_IN_3_32
66 gchar            *ide_build_target_get_display_name      (IdeBuildTarget       *self);
67 IDE_AVAILABLE_IN_3_32
68 gint              ide_build_target_get_priority          (IdeBuildTarget       *self);
69 IDE_AVAILABLE_IN_3_32
70 gchar           **ide_build_target_get_argv              (IdeBuildTarget       *self);
71 IDE_AVAILABLE_IN_3_32
72 gchar            *ide_build_target_get_cwd               (IdeBuildTarget       *self);
73 IDE_AVAILABLE_IN_3_32
74 gchar            *ide_build_target_get_language          (IdeBuildTarget       *self);
75 IDE_AVAILABLE_IN_3_32
76 gboolean          ide_build_target_get_install           (IdeBuildTarget       *self);
77 IDE_AVAILABLE_IN_3_32
78 IdeArtifactKind   ide_build_target_get_kind              (IdeBuildTarget       *self);
79 IDE_AVAILABLE_IN_3_32
80 gboolean          ide_build_target_compare               (const IdeBuildTarget *left,
81                                                           const IdeBuildTarget *right);
82 
83 G_END_DECLS
84