File: modulemd-component-rpm.h

package info (click to toggle)
libmodulemd 2.15.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,592 kB
  • sloc: ansic: 38,286; python: 3,263; xml: 1,739; sh: 389; makefile: 42
file content (281 lines) | stat: -rw-r--r-- 7,210 bytes parent folder | download | duplicates (4)
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
/*
 * 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 "modulemd-component.h"
#include "modulemd-deprecated.h"
#include <glib-object.h>

G_BEGIN_DECLS

/**
 * SECTION: modulemd-component-rpm
 * @title: Modulemd.ComponentRpm
 * @stability: stable
 * @short_description: An rpm component that goes into a module stream.
 */
#define MODULEMD_TYPE_COMPONENT_RPM (modulemd_component_rpm_get_type ())

G_DECLARE_FINAL_TYPE (ModulemdComponentRpm,
                      modulemd_component_rpm,
                      MODULEMD,
                      COMPONENT_RPM,
                      ModulemdComponent)


/**
 * modulemd_component_rpm_new:
 * @key: (not nullable): The key of this module component. Used when looking up
 * components from a #ModulemdModuleStream.
 *
 * Returns: (transfer full): A newly-allocated #ModulemdComponentRpm object.
 *
 * Since: 2.0
 */
ModulemdComponentRpm *
modulemd_component_rpm_new (const gchar *key);


/**
 * modulemd_component_rpm_add_restricted_arch:
 * @self: This #ModulemdComponentRpm object.
 * @arch: An architecture on which this package should be available.
 *
 * Restrict the list of architectures on which this RPM will be available. It
 * may be called any number of times to indicate support on additional
 * architectures. Use modulemd_component_rpm_clear_arches() to return to "all
 * architectures".
 *
 * Since: 2.0
 */
void
modulemd_component_rpm_add_restricted_arch (ModulemdComponentRpm *self,
                                            const gchar *arch);


/**
 * modulemd_component_rpm_reset_arches:
 * @self: This #ModulemdComponentRpm object.
 *
 * Indicate that this RPM component is available on all arches.
 *
 * Since: 2.0
 * Deprecated: 2.9: Use modulemd_component_rpm_clear_arches() instead.
 */
MMD_DEPRECATED_FOR (modulemd_component_rpm_clear_arches)
void
modulemd_component_rpm_reset_arches (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_clear_arches:
 * @self: This #ModulemdComponentRpm object.
 *
 * Indicate that this RPM component is available on all arches.
 *
 * Since: 2.9
 */
void
modulemd_component_rpm_clear_arches (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_get_arches_as_strv: (rename-to modulemd_component_rpm_get_arches)
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: (transfer full): A #GStrv list of architectures on which this RPM
 * should be available.
 *
 * Since: 2.0
 */
GStrv
modulemd_component_rpm_get_arches_as_strv (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_add_multilib_arch:
 * @self: This #ModulemdComponentRpm object.
 * @arch: An architecture on which this package should be multilib.
 *
 * Add an architecture on which this RPM will be multilib. It may be called
 * any number of times. Use modulemd_component_rpm_clear_multilib_arches() to
 * return to "no architectures".
 *
 * Since: 2.0
 */
void
modulemd_component_rpm_add_multilib_arch (ModulemdComponentRpm *self,
                                          const gchar *arch);


/**
 * modulemd_component_rpm_reset_multilib_arches:
 * @self: This #ModulemdComponentRpm object.
 *
 * Indicate that this RPM component is multilib on no architectures.
 *
 * Since: 2.0
 * Deprecated: 2.9: Use modulemd_component_rpm_clear_multilib_arches() instead.
 */
MMD_DEPRECATED_FOR (modulemd_component_rpm_clear_multilib_arches)
void
modulemd_component_rpm_reset_multilib_arches (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_clear_multilib_arches:
 * @self: This #ModulemdComponentRpm object.
 *
 * Indicate that this RPM component is multilib on no architectures.
 *
 * Since: 2.9
 */
void
modulemd_component_rpm_clear_multilib_arches (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_get_multilib_arches_as_strv: (rename-to modulemd_component_rpm_get_multilib_arches)
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: (transfer full): A #GStrv list of architectures on which multilib
 * should be available.
 *
 * Since: 2.0
 */
GStrv
modulemd_component_rpm_get_multilib_arches_as_strv (
  ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_set_cache:
 * @self: This #ModulemdComponentRpm object.
 * @cache: (in) (nullable): The lookaside cache URL.
 *
 * Since: 2.0
 */
void
modulemd_component_rpm_set_cache (ModulemdComponentRpm *self,
                                  const gchar *cache);


/**
 * modulemd_component_rpm_get_cache:
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: (transfer none): The lookaside cache URL.
 *
 * Since: 2.0
 */
const gchar *
modulemd_component_rpm_get_cache (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_set_ref:
 * @self: This #ModulemdComponentRpm object.
 * @ref: (in) (nullable): The commit ID in the SCM repository.
 *
 * Since: 2.0
 */
void
modulemd_component_rpm_set_ref (ModulemdComponentRpm *self, const gchar *ref);


/**
 * modulemd_component_rpm_get_ref:
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: (transfer none): The commit ID in the SCM repository.
 *
 * Since: 2.0
 */
const gchar *
modulemd_component_rpm_get_ref (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_set_repository:
 * @self: This #ModulemdComponentRpm object.
 * @repository: (in) (nullable): The URI of the SCM repository.
 *
 * Since: 2.0
 */
void
modulemd_component_rpm_set_repository (ModulemdComponentRpm *self,
                                       const gchar *repository);


/**
 * modulemd_component_rpm_get_repository:
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: (transfer none): The URI of the SCM repository.
 *
 * Since: 2.0
 */
const gchar *
modulemd_component_rpm_get_repository (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_set_buildroot:
 * @self: This #ModulemdComponentRpm object.
 * @buildroot: (in): The #ModulemdComponentRpm:buildroot flag to set for @self.
 *
 * Since: 2.7
 */
void
modulemd_component_rpm_set_buildroot (ModulemdComponentRpm *self,
                                      gboolean buildroot);


/**
 * modulemd_component_rpm_get_buildroot:
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: The #ModulemdComponentRpm:buildroot flag.
 *
 * Since: 2.7
 */
gboolean
modulemd_component_rpm_get_buildroot (ModulemdComponentRpm *self);


/**
 * modulemd_component_rpm_set_srpm_buildroot:
 * @self: This #ModulemdComponentRpm object.
 * @srpm_buildroot: (in): The #ModulemdComponentRpm:srpm_buildroot flag to set
 * for @self.
 *
 * Since: 2.7
 */
void
modulemd_component_rpm_set_srpm_buildroot (ModulemdComponentRpm *self,
                                           gboolean srpm_buildroot);


/**
 * modulemd_component_rpm_get_srpm_buildroot:
 * @self: This #ModulemdComponentRpm object.
 *
 * Returns: The #ModulemdComponentRpm:srpm_buildroot flag.
 *
 * Since: 2.7
 */
gboolean
modulemd_component_rpm_get_srpm_buildroot (ModulemdComponentRpm *self);

G_END_DECLS