1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
/*
* This file is part of libmodulemd
* Copyright (C) 2018 Red Hat, Inc.
*
* Fedora-License-Identifier: MIT
* SPDX-2.0-License-Identifier: MIT
* SPDX-3.0-License-Identifier: MIT
*
* This program is free software.
* For more information on the license, see COPYING.
* For more information on free software, see <https://www.gnu.org/philosophy/free-sw.en.html>.
*/
#pragma once
#include <glib-object.h>
G_BEGIN_DECLS
/**
* SECTION: modulemd-buildopts
* @title: Modulemd.Buildopts
* @stability: stable
* @short_description: Provides hints to the build-system on how to build this module.
*/
#define MODULEMD_TYPE_BUILDOPTS (modulemd_buildopts_get_type ())
G_DECLARE_FINAL_TYPE (
ModulemdBuildopts, modulemd_buildopts, MODULEMD, BUILDOPTS, GObject)
/**
* modulemd_buildopts_new:
*
* Returns: (transfer full): A newly-allocated #ModulemdBuildopts object. This
* object must be freed with g_object_unref().
*
* Since: 2.0
*/
ModulemdBuildopts *
modulemd_buildopts_new (void);
/**
* modulemd_buildopts_equals:
* @self_1: A #ModulemdBuildopts object.
* @self_2: A #ModulemdBuildopts object.
*
* Check for equality for two #ModulemdBuildopts objects.
*
* Returns: TRUE if both objects are equal, FALSE otherwise.
*
* Since: 2.2
*/
gboolean
modulemd_buildopts_equals (ModulemdBuildopts *self_1,
ModulemdBuildopts *self_2);
/**
* modulemd_buildopts_copy:
* @self: This #ModulemdBuildopts object.
*
* Create a copy of this #ModulemdBuildopts object.
*
* Returns: (transfer full): A newly-allocated #ModulemdBuildopts object that
* is a copy of @self.
*
* Since: 2.0
*/
ModulemdBuildopts *
modulemd_buildopts_copy (ModulemdBuildopts *self);
/**
* modulemd_buildopts_set_rpm_macros:
* @self: This #ModulemdBuildopts object.
* @rpm_macros: A string containing RPM build macros in the form that they
* would appear in an RPM macros file on-disk.
*
* Since: 2.0
*/
void
modulemd_buildopts_set_rpm_macros (ModulemdBuildopts *self,
const gchar *rpm_macros);
/**
* modulemd_buildopts_get_rpm_macros:
* @self: This #ModulemdBuildopts object.
*
* Returns: (transfer none): A string containing RPM build macros in the form
* that they would appear in an RPM macros file on-disk.
*
* Since: 2.0
*/
const gchar *
modulemd_buildopts_get_rpm_macros (ModulemdBuildopts *self);
/**
* modulemd_buildopts_add_rpm_to_whitelist:
* @self: This #ModulemdBuildopts object.
* @rpm: An RPM name to add to the whitelist.
*
* Since: 2.0
*/
void
modulemd_buildopts_add_rpm_to_whitelist (ModulemdBuildopts *self,
const gchar *rpm);
/**
* modulemd_buildopts_remove_rpm_from_whitelist:
* @self: This #ModulemdBuildopts object.
* @rpm: An RPM name to remove from the whitelist.
*
* Since: 2.0
*/
void
modulemd_buildopts_remove_rpm_from_whitelist (ModulemdBuildopts *self,
const gchar *rpm);
/**
* modulemd_buildopts_clear_rpm_whitelist:
* @self: This #ModulemdBuildopts object.
*
* Remove all RPMs from the whitelist.
*
* Since: 2.5
*/
void
modulemd_buildopts_clear_rpm_whitelist (ModulemdBuildopts *self);
/**
* modulemd_buildopts_get_rpm_whitelist_as_strv: (rename-to modulemd_buildopts_get_rpm_whitelist)
* @self: This #ModulemdBuildopts object.
*
* Returns: (transfer full): An ordered #GStrv list of all RPMs in the whitelist.
*
* Since: 2.0
*/
GStrv
modulemd_buildopts_get_rpm_whitelist_as_strv (ModulemdBuildopts *self);
/**
* modulemd_buildopts_add_arch:
* @self: This #ModulemdBuildopts object.
* @arch: An architecture for which to build this module.
*
* Restrict the list of architectures for which to build this module. It may be
* called any number of times to indicate support on additional architectures.
* Use modulemd_buildopts_clear_arches() to return to "all architectures".
*
* Since: 2.9
*/
void
modulemd_buildopts_add_arch (ModulemdBuildopts *self, const gchar *arch);
/**
* modulemd_buildopts_remove_arch:
* @self: This #ModulemdBuildopts object.
* @arch: An architecture to remove from the list of architectures for which to
* build this module.
*
* Since: 2.9
*/
void
modulemd_buildopts_remove_arch (ModulemdBuildopts *self, const gchar *arch);
/**
* modulemd_buildopts_clear_arches:
* @self: This #ModulemdBuildopts object.
*
* Indicate that this module should be built for all architectures.
*
* Since: 2.9
*/
void
modulemd_buildopts_clear_arches (ModulemdBuildopts *self);
/**
* modulemd_buildopts_get_arches_as_strv: (rename-to modulemd_buildopts_get_arches)
* @self: This #ModulemdBuildopts object.
*
* Returns: (transfer full): A #GStrv list of architectures for which this
* module should be built. If empty, this module should be built for all
* architectures.
*
* Since: 2.9
*/
GStrv
modulemd_buildopts_get_arches_as_strv (ModulemdBuildopts *self);
G_END_DECLS
|