1 /*
2  * This file is part of libmodulemd
3  * Copyright (C) 2018 Red Hat, Inc.
4  *
5  * Fedora-License-Identifier: MIT
6  * SPDX-2.0-License-Identifier: MIT
7  * SPDX-3.0-License-Identifier: MIT
8  *
9  * This program is free software.
10  * For more information on the license, see COPYING.
11  * For more information on free software, see <https://www.gnu.org/philosophy/free-sw.en.html>.
12  */
13 
14 #pragma once
15 
16 #include "modulemd-buildopts.h"
17 #include "modulemd-component-module.h"
18 #include "modulemd-component-rpm.h"
19 #include "modulemd-component.h"
20 #include "modulemd-deprecated.h"
21 #include "modulemd-module-stream.h"
22 #include "modulemd-profile.h"
23 #include "modulemd-service-level.h"
24 #include <glib-object.h>
25 
26 G_BEGIN_DECLS
27 
28 /**
29  * SECTION: modulemd-module-stream-v1
30  * @title: Modulemd.ModuleStreamV1
31  * @stability: stable
32  * @short_description: The data to represent a stream of a module as described
33  * by a modulemd YAML document of version 1.
34  */
35 
36 #define MODULEMD_TYPE_MODULE_STREAM_V1 (modulemd_module_stream_v1_get_type ())
37 
38 G_DECLARE_FINAL_TYPE (ModulemdModuleStreamV1,
39                       modulemd_module_stream_v1,
40                       MODULEMD,
41                       MODULE_STREAM_V1,
42                       ModulemdModuleStream)
43 
44 
45 /**
46  * modulemd_module_stream_v1_new:
47  * @module_name: (in) (nullable): The name of this module.
48  * @module_stream: (in) (nullable): The name of this module stream.
49  *
50  * Returns: (transfer full): A newly-allocated #ModulemdModuleStreamV1 object,
51  * with the specified module and stream names, if provided.
52  *
53  * Since: 2.0
54  */
55 ModulemdModuleStreamV1 *
56 modulemd_module_stream_v1_new (const gchar *module_name,
57                                const gchar *module_stream);
58 
59 
60 /* ===== Properties ====== */
61 
62 
63 /**
64  * modulemd_module_stream_v1_set_arch:
65  * @self: (in): This #ModulemdModuleStreamV1 object.
66  * @arch: (in): The module artifact architecture.
67  *
68  * Set the module artifact architecture.
69  *
70  * Since: 2.0
71  */
72 void
73 modulemd_module_stream_v1_set_arch (ModulemdModuleStreamV1 *self,
74                                     const gchar *arch);
75 
76 
77 /**
78  * modulemd_module_stream_v1_get_arch:
79  * @self: (in): This #ModulemdModuleStreamV1 object.
80  *
81  * Returns: (transfer none): The module artifact architecture.
82  *
83  * Since: 2.0
84  */
85 const gchar *
86 modulemd_module_stream_v1_get_arch (ModulemdModuleStreamV1 *self);
87 
88 
89 /**
90  * modulemd_module_stream_v1_set_buildopts:
91  * @self: (in): This #ModulemdModuleStreamV1 object.
92  * @buildopts: (in) (transfer none): A #ModulemdBuildopts object describing
93  * build options that apply globally to components in this module.
94  *
95  * Set build options for this module's components.
96  *
97  * Since: 2.0
98  */
99 void
100 modulemd_module_stream_v1_set_buildopts (ModulemdModuleStreamV1 *self,
101                                          ModulemdBuildopts *buildopts);
102 
103 
104 /**
105  * modulemd_module_stream_v1_get_buildopts:
106  * @self: (in): This #ModulemdModuleStreamV1 object.
107  *
108  * Returns: (transfer none): The build options for this module's components.
109  *
110  * Since: 2.0
111  */
112 ModulemdBuildopts *
113 modulemd_module_stream_v1_get_buildopts (ModulemdModuleStreamV1 *self);
114 
115 
116 /**
117  * modulemd_module_stream_v1_set_community:
118  * @self: (in): This #ModulemdModuleStreamV1 object.
119  * @community: (in): The upstream community website for this module.
120  *
121  * Set the module community website address.
122  *
123  * Since: 2.0
124  */
125 void
126 modulemd_module_stream_v1_set_community (ModulemdModuleStreamV1 *self,
127                                          const gchar *community);
128 
129 
130 /**
131  * modulemd_module_stream_v1_get_community:
132  * @self: (in): This #ModulemdModuleStreamV1 object.
133  *
134  * Returns: (transfer none): The module community website address.
135  *
136  * Since: 2.0
137  */
138 const gchar *
139 modulemd_module_stream_v1_get_community (ModulemdModuleStreamV1 *self);
140 
141 
142 /**
143  * modulemd_module_stream_v1_set_description:
144  * @self: (in): This #ModulemdModuleStreamV1 object.
145  * @description: (in) (nullable): The untranslated description of this module.
146  *
147  * Set the module description.
148  *
149  * Since: 2.0
150  */
151 void
152 modulemd_module_stream_v1_set_description (ModulemdModuleStreamV1 *self,
153                                            const gchar *description);
154 
155 
156 /**
157  * modulemd_module_stream_v1_get_description:
158  * @self: (in): This #ModulemdModuleStreamV1 object.
159  * @locale: (in) (nullable): The name of the locale to use when translating
160  * the string. If NULL, it will determine the locale with a system call to
161  * `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the
162  * untranslated string, they should pass `"C"` for the locale.
163  *
164  * Returns: (transfer none): The module description, translated to the
165  * requested locale if available. Translation information is managed by the
166  * #ModulemdTranslation and #ModulemdTranslationEntry objects.
167  *
168  * Since: 2.0
169  */
170 const gchar *
171 modulemd_module_stream_v1_get_description (ModulemdModuleStreamV1 *self,
172                                            const gchar *locale);
173 
174 
175 /**
176  * modulemd_module_stream_v1_set_documentation:
177  * @self: (in): This #ModulemdModuleStreamV1 object.
178  * @documentation: (in): The upstream documentation website for this module.
179  *
180  * Set the module documentation website address.
181  *
182  * Since: 2.0
183  */
184 void
185 modulemd_module_stream_v1_set_documentation (ModulemdModuleStreamV1 *self,
186                                              const gchar *documentation);
187 
188 
189 /**
190  * modulemd_module_stream_v1_get_documentation:
191  * @self: (in): This #ModulemdModuleStreamV1 object.
192  *
193  * Returns: (transfer none): The module documentation website address.
194  *
195  * Since: 2.0
196  */
197 const gchar *
198 modulemd_module_stream_v1_get_documentation (ModulemdModuleStreamV1 *self);
199 
200 
201 /**
202  * modulemd_module_stream_v1_set_summary:
203  * @self: (in): This #ModulemdModuleStreamV1 object.
204  * @summary: (in) (nullable): The untranslated summary of this module.
205  *
206  * Set the module summary.
207  *
208  * Since: 2.0
209  */
210 void
211 modulemd_module_stream_v1_set_summary (ModulemdModuleStreamV1 *self,
212                                        const gchar *summary);
213 
214 
215 /**
216  * modulemd_module_stream_v1_get_summary:
217  * @self: (in): This #ModulemdModuleStreamV1 object.
218  * @locale: (in) (nullable): The name of the locale to use when translating
219  * the string. If NULL, it will determine the locale with a system call to
220  * `setlocale(LC_MESSAGES, NULL)` and return that. If the caller wants the
221  * untranslated string, they should pass `"C"` for the locale.
222  *
223  * Returns: (transfer none): The module summary, translated to the requested
224  * locale if available. Translation information is managed by the
225  * #ModulemdTranslation and #ModulemdTranslationEntry objects.
226  *
227  * Since: 2.0
228  */
229 const gchar *
230 modulemd_module_stream_v1_get_summary (ModulemdModuleStreamV1 *self,
231                                        const gchar *locale);
232 
233 
234 /**
235  * modulemd_module_stream_v1_set_tracker:
236  * @self: (in): This #ModulemdModuleStreamV1 object.
237  * @tracker: (in): The upstream bug tracker website for this module.
238  *
239  * Set the module bug tracker website address.
240  *
241  * Since: 2.0
242  */
243 void
244 modulemd_module_stream_v1_set_tracker (ModulemdModuleStreamV1 *self,
245                                        const gchar *tracker);
246 
247 
248 /**
249  * modulemd_module_stream_v1_get_tracker:
250  * @self: (in): This #ModulemdModuleStreamV1 object.
251  *
252  * Returns: (transfer none): The module bug tracker website address.
253  *
254  * Since: 2.0
255  */
256 const gchar *
257 modulemd_module_stream_v1_get_tracker (ModulemdModuleStreamV1 *self);
258 
259 
260 /* ===== Non-property Methods ===== */
261 
262 
263 /**
264  * modulemd_module_stream_v1_add_component:
265  * @self: (in): This #ModulemdModuleStreamV1 object.
266  * @component: (in) (transfer none): A #ModulemdComponent to be added to this
267  * module stream.
268  *
269  * Add a component definition to the module.
270  *
271  * Since: 2.0
272  */
273 void
274 modulemd_module_stream_v1_add_component (ModulemdModuleStreamV1 *self,
275                                          ModulemdComponent *component);
276 
277 
278 /**
279  * modulemd_module_stream_v1_remove_module_component:
280  * @self: (in): This #ModulemdModuleStreamV1 object.
281  * @component_name: (in): The name of the component to remove from the module
282  * stream.
283  *
284  * Remove a component from this module stream.
285  *
286  * Since: 2.0
287  */
288 void
289 modulemd_module_stream_v1_remove_module_component (
290   ModulemdModuleStreamV1 *self, const gchar *component_name);
291 
292 
293 /**
294  * modulemd_module_stream_v1_clear_module_components:
295  * @self: (in): This #ModulemdModuleStreamV1 object.
296  *
297  * Remove all module components from this module stream.
298  *
299  * Since: 2.5
300  */
301 void
302 modulemd_module_stream_v1_clear_module_components (
303   ModulemdModuleStreamV1 *self);
304 
305 
306 /**
307  * modulemd_module_stream_v1_remove_rpm_component:
308  * @self: (in): This #ModulemdModuleStreamV1 object.
309  * @component_name: (in): The name of the component to remove from the module
310  * stream.
311  *
312  * Remove a component from this module stream.
313  *
314  * Since: 2.0
315  */
316 void
317 modulemd_module_stream_v1_remove_rpm_component (ModulemdModuleStreamV1 *self,
318                                                 const gchar *component_name);
319 
320 
321 /**
322  * modulemd_module_stream_v1_clear_rpm_components:
323  * @self: (in): This #ModulemdModuleStreamV1 object.
324  *
325  * Remove all RPM components from this module stream.
326  *
327  * Since: 2.5
328  */
329 void
330 modulemd_module_stream_v1_clear_rpm_components (ModulemdModuleStreamV1 *self);
331 
332 
333 /**
334  * modulemd_module_stream_v1_get_module_component_names_as_strv: (rename-to modulemd_module_stream_v1_get_module_component_names)
335  * @self: (in): This #ModulemdModuleStreamV1 object.
336  *
337  * Returns: (transfer full): An ordered #GStrv list of module component names
338  * included in this stream.
339  *
340  * Since: 2.0
341  */
342 GStrv
343 modulemd_module_stream_v1_get_module_component_names_as_strv (
344   ModulemdModuleStreamV1 *self);
345 
346 /**
347  * modulemd_module_stream_v1_get_rpm_component_names_as_strv: (rename-to modulemd_module_stream_v1_get_rpm_component_names)
348  * @self: (in): This #ModulemdModuleStreamV1 object.
349  *
350  * Returns: (transfer full): An ordered #GStrv list of RPM component names
351  * included in this stream.
352  *
353  * Since: 2.0
354  */
355 GStrv
356 modulemd_module_stream_v1_get_rpm_component_names_as_strv (
357   ModulemdModuleStreamV1 *self);
358 
359 
360 /**
361  * modulemd_module_stream_v1_get_module_component:
362  * @self: (in): This #ModulemdModuleStreamV1 object.
363  * @component_name: (in): The name of the component to retrieve.
364  *
365  * Returns: (transfer none): The module component matching @component_name if
366  * it exists, else NULL.
367  *
368  * Since: 2.0
369  */
370 ModulemdComponentModule *
371 modulemd_module_stream_v1_get_module_component (ModulemdModuleStreamV1 *self,
372                                                 const gchar *component_name);
373 
374 
375 /**
376  * modulemd_module_stream_v1_get_rpm_component:
377  * @self: (in): This #ModulemdModuleStreamV1 object.
378  * @component_name: (in): The name of the component to retrieve.
379  *
380  * Returns: (transfer none): The RPM component matching @component_name if it
381  * exists, else NULL.
382  *
383  * Since: 2.0
384  */
385 ModulemdComponentRpm *
386 modulemd_module_stream_v1_get_rpm_component (ModulemdModuleStreamV1 *self,
387                                              const gchar *component_name);
388 
389 
390 /**
391  * modulemd_module_stream_v1_add_content_license:
392  * @self: (in): This #ModulemdModuleStreamV1 object.
393  * @license: (in): A license under which one or more of the components of this
394  * module stream are distributed.
395  *
396  * Since: 2.0
397  */
398 void
399 modulemd_module_stream_v1_add_content_license (ModulemdModuleStreamV1 *self,
400                                                const gchar *license);
401 
402 
403 /**
404  * modulemd_module_stream_v1_add_module_license:
405  * @self: (in): This #ModulemdModuleStreamV1 object.
406  * @license: (in): A license under which this module stream is distributed.
407  *
408  * Since: 2.0
409  */
410 void
411 modulemd_module_stream_v1_add_module_license (ModulemdModuleStreamV1 *self,
412                                               const gchar *license);
413 
414 
415 /**
416  * modulemd_module_stream_v1_remove_content_license:
417  * @self: (in): This #ModulemdModuleStreamV1 object.
418  * @license: (in): A license to remove from the list. Has no effect if the
419  * license is not present.
420  *
421  * Since: 2.0
422  */
423 void
424 modulemd_module_stream_v1_remove_content_license (ModulemdModuleStreamV1 *self,
425                                                   const gchar *license);
426 
427 
428 /**
429  * modulemd_module_stream_v1_clear_content_licenses:
430  * @self: (in): This #ModulemdModuleStreamV1 object.
431  *
432  * Remove all content licenses.
433  *
434  * Since: 2.5
435  */
436 void
437 modulemd_module_stream_v1_clear_content_licenses (
438   ModulemdModuleStreamV1 *self);
439 
440 
441 /**
442  * modulemd_module_stream_v1_remove_module_license:
443  * @self: (in): This #ModulemdModuleStreamV1 object.
444  * @license: (in): A license to remove from the list. Has no effect if the
445  * license is not present.
446  *
447  * Since: 2.0
448  */
449 void
450 modulemd_module_stream_v1_remove_module_license (ModulemdModuleStreamV1 *self,
451                                                  const gchar *license);
452 
453 
454 /**
455  * modulemd_module_stream_v1_clear_module_licenses:
456  * @self: (in): This #ModulemdModuleStreamV1 object.
457  *
458  * Remove all module licenses.
459  *
460  * Since: 2.5
461  */
462 void
463 modulemd_module_stream_v1_clear_module_licenses (ModulemdModuleStreamV1 *self);
464 
465 
466 /**
467  * modulemd_module_stream_v1_get_content_licenses_as_strv: (rename-to modulemd_module_stream_v1_get_content_licenses)
468  * @self: (in): This #ModulemdModuleStreamV1 object.
469  *
470  * Returns: (transfer full): An ordered #GStrv list of licenses under which one
471  * or more components of this module stream are released.
472  *
473  * Since: 2.0
474  */
475 GStrv
476 modulemd_module_stream_v1_get_content_licenses_as_strv (
477   ModulemdModuleStreamV1 *self);
478 
479 
480 /**
481  * modulemd_module_stream_v1_get_module_licenses_as_strv: (rename-to modulemd_module_stream_v1_get_module_licenses)
482  * @self: (in): This #ModulemdModuleStreamV1 object.
483  *
484  * Returns: (transfer full): An ordered #GStrv list of licenses under which
485  * this module stream is released.
486  *
487  * Since: 2.0
488  */
489 GStrv
490 modulemd_module_stream_v1_get_module_licenses_as_strv (
491   ModulemdModuleStreamV1 *self);
492 
493 
494 /**
495  * modulemd_module_stream_v1_add_profile:
496  * @self: (in): This #ModulemdModuleStreamV1 object.
497  * @profile: (in) (transfer none): A #ModulemdProfile for this module stream.
498  *
499  * Adds a profile definition to this module stream.
500  *
501  * Since: 2.0
502  */
503 void
504 modulemd_module_stream_v1_add_profile (ModulemdModuleStreamV1 *self,
505                                        ModulemdProfile *profile);
506 
507 
508 /**
509  * modulemd_module_stream_v1_clear_profiles:
510  * @self: (in): This #ModulemdModuleStreamV1 object.
511  *
512  * Remove all profiles from this module stream.
513  *
514  * Since: 2.0
515  */
516 void
517 modulemd_module_stream_v1_clear_profiles (ModulemdModuleStreamV1 *self);
518 
519 
520 /**
521  * modulemd_module_stream_v1_get_profile_names_as_strv: (rename-to modulemd_module_stream_v1_get_profile_names)
522  * @self: (in): This #ModulemdModuleStreamV1 object.
523  *
524  * Returns: (transfer full): An ordered #GStrv list of profile names associated
525  * with this module stream.
526  *
527  * Since: 2.0
528  */
529 GStrv
530 modulemd_module_stream_v1_get_profile_names_as_strv (
531   ModulemdModuleStreamV1 *self);
532 
533 
534 /**
535  * modulemd_module_stream_v1_get_profile:
536  * @self: (in): This #ModulemdModuleStreamV1 object.
537  * @profile_name: (in): The name of a profile to retrieve.
538  *
539  * Returns: (transfer none): The requested profile definition if present in the
540  * module stream. NULL otherwise.
541  *
542  * Since: 2.0
543  */
544 ModulemdProfile *
545 modulemd_module_stream_v1_get_profile (ModulemdModuleStreamV1 *self,
546                                        const gchar *profile_name);
547 
548 
549 /**
550  * modulemd_module_stream_v1_add_rpm_api:
551  * @self: (in): This #ModulemdModuleStreamV1 object.
552  * @rpm: (in): The name of a binary RPM present in this module that is
553  * considered stable public API.
554  *
555  * Since: 2.0
556  */
557 void
558 modulemd_module_stream_v1_add_rpm_api (ModulemdModuleStreamV1 *self,
559                                        const gchar *rpm);
560 
561 
562 /**
563  * modulemd_module_stream_v1_remove_rpm_api:
564  * @self: (in): This #ModulemdModuleStreamV1 object.
565  * @rpm: (in): A binary RPM name to remove from the list of stable public API.
566  *
567  * Since: 2.0
568  */
569 void
570 modulemd_module_stream_v1_remove_rpm_api (ModulemdModuleStreamV1 *self,
571                                           const gchar *rpm);
572 
573 
574 /**
575  * modulemd_module_stream_v1_clear_rpm_api:
576  * @self: (in): This #ModulemdModuleStreamV1 object.
577  *
578  * Remove all RPMs from the list of stable public API.
579  *
580  * Since: 2.5
581  */
582 void
583 modulemd_module_stream_v1_clear_rpm_api (ModulemdModuleStreamV1 *self);
584 
585 
586 /**
587  * modulemd_module_stream_v1_get_rpm_api_as_strv: (rename-to modulemd_module_stream_v1_get_rpm_api)
588  * @self: (in): This #ModulemdModuleStreamV1 object.
589  *
590  * Returns: (transfer full): An ordered #GStrv list of binary RPM names that
591  * forms the public API of this module stream.
592  *
593  * Since: 2.0
594  */
595 GStrv
596 modulemd_module_stream_v1_get_rpm_api_as_strv (ModulemdModuleStreamV1 *self);
597 
598 
599 /**
600  * modulemd_module_stream_v1_add_rpm_artifact:
601  * @self: (in): This #ModulemdModuleStreamV1 object.
602  * @nevr: (in): The NEVR of a binary RPM present in this module stream.
603  *
604  * Since: 2.0
605  */
606 void
607 modulemd_module_stream_v1_add_rpm_artifact (ModulemdModuleStreamV1 *self,
608                                             const gchar *nevr);
609 
610 
611 /**
612  * modulemd_module_stream_v1_remove_rpm_artifact:
613  * @self: (in): This #ModulemdModuleStreamV1 object.
614  * @nevr: (in): An RPM NEVR to remove from the list of artifacts.
615  *
616  * Since: 2.0
617  */
618 void
619 modulemd_module_stream_v1_remove_rpm_artifact (ModulemdModuleStreamV1 *self,
620                                                const gchar *nevr);
621 
622 
623 /**
624  * modulemd_module_stream_v1_clear_rpm_artifacts:
625  * @self: (in): This #ModulemdModuleStreamV1 object.
626  *
627  * Remove all RPM NEVRs from the list of artifacts.
628  *
629  * Since: 2.5
630  */
631 void
632 modulemd_module_stream_v1_clear_rpm_artifacts (ModulemdModuleStreamV1 *self);
633 
634 
635 /**
636  * modulemd_module_stream_v1_get_rpm_artifacts_as_strv: (rename-to modulemd_module_stream_v1_get_rpm_artifacts)
637  * @self: (in): This #ModulemdModuleStreamV1 object.
638  *
639  * Returns: (transfer full): An ordered #GStrv list of RPM NEVRs are included
640  * in this module stream.
641  *
642  * Since: 2.0
643  */
644 GStrv
645 modulemd_module_stream_v1_get_rpm_artifacts_as_strv (
646   ModulemdModuleStreamV1 *self);
647 
648 
649 /**
650  * modulemd_module_stream_v1_add_rpm_filter:
651  * @self: (in): This #ModulemdModuleStreamV1 object.
652  * @rpm: (in): The name of a binary RPM to filter out of this module stream.
653  *
654  * Since: 2.0
655  */
656 void
657 modulemd_module_stream_v1_add_rpm_filter (ModulemdModuleStreamV1 *self,
658                                           const gchar *rpm);
659 
660 
661 /**
662  * modulemd_module_stream_v1_remove_rpm_filter:
663  * @self: (in): This #ModulemdModuleStreamV1 object.
664  * @rpm: (in): A binary RPM name to remove from the filter list.
665  *
666  * Since: 2.0
667  */
668 void
669 modulemd_module_stream_v1_remove_rpm_filter (ModulemdModuleStreamV1 *self,
670                                              const gchar *rpm);
671 
672 
673 /**
674  * modulemd_module_stream_v1_clear_rpm_filters:
675  * @self: (in): This #ModulemdModuleStreamV1 object.
676  *
677  * Remove all RPMs from the filter list.
678  *
679  * Since: 2.5
680  */
681 void
682 modulemd_module_stream_v1_clear_rpm_filters (ModulemdModuleStreamV1 *self);
683 
684 
685 /**
686  * modulemd_module_stream_v1_get_rpm_filters_as_strv: (rename-to modulemd_module_stream_v1_get_rpm_filters)
687  * @self: (in): This #ModulemdModuleStreamV1 object.
688  *
689  * Returns: (transfer full): An ordered #GStrv list of binary RPM names that
690  * are filtered out of this module stream.
691  *
692  * Since: 2.0
693  */
694 GStrv
695 modulemd_module_stream_v1_get_rpm_filters_as_strv (
696   ModulemdModuleStreamV1 *self);
697 
698 
699 /**
700  * modulemd_module_stream_v1_add_servicelevel:
701  * @self: (in): This #ModulemdModuleStreamV1 object.
702  * @servicelevel: (in) (transfer none): A #ModulemdServiceLevel for this module stream.
703  *
704  * Adds a servicelevel definition to this module stream.
705  *
706  * Since: 2.0
707  */
708 void
709 modulemd_module_stream_v1_add_servicelevel (
710   ModulemdModuleStreamV1 *self, ModulemdServiceLevel *servicelevel);
711 
712 
713 /**
714  * modulemd_module_stream_v1_clear_servicelevels:
715  * @self: (in): This #ModulemdModuleStreamV1 object.
716  *
717  * Remove all servicelevels from this module stream.
718  *
719  * Since: 2.0
720  */
721 void
722 modulemd_module_stream_v1_clear_servicelevels (ModulemdModuleStreamV1 *self);
723 
724 
725 /**
726  * modulemd_module_stream_v1_get_servicelevel_names_as_strv: (rename-to modulemd_module_stream_v1_get_servicelevel_names)
727  * @self: (in): This #ModulemdModuleStreamV1 object.
728  *
729  * Returns: (transfer full): An ordered #GStrv list of servicelevel names
730  * associated with this module stream.
731  *
732  * Since: 2.0
733  */
734 GStrv
735 modulemd_module_stream_v1_get_servicelevel_names_as_strv (
736   ModulemdModuleStreamV1 *self);
737 
738 
739 /**
740  * modulemd_module_stream_v1_get_servicelevel:
741  * @self: (in): This #ModulemdModuleStreamV1 object.
742  * @servicelevel_name: (in): The name of a servicelevel to retrieve.
743  *
744  * Returns: (transfer none): The requested servicelevel definition if present in the
745  * module stream. NULL otherwise.
746  *
747  * Since: 2.0
748  */
749 ModulemdServiceLevel *
750 modulemd_module_stream_v1_get_servicelevel (ModulemdModuleStreamV1 *self,
751                                             const gchar *servicelevel_name);
752 
753 
754 /**
755  * modulemd_module_stream_v1_set_eol:
756  * @self: (in): This #ModulemdModuleStreamV1 object.
757  * @eol: (in): The end-of-life date for the "rawhide" service level.
758  *
759  * Comptibility function with early iterations of modulemd v1. This function is
760  * a wrapper for `modulemd_module_stream_v1_add_servicelevel("rawhide", eol)`.
761  *
762  * Since: 2.0
763  * Deprecated: 2.0: Use modulemd_module_stream_v1_add_servicelevel() instead.
764  */
765 MMD_DEPRECATED_FOR (modulemd_module_stream_v1_add_servicelevel)
766 void
767 modulemd_module_stream_v1_set_eol (ModulemdModuleStreamV1 *self, GDate *eol);
768 
769 
770 /**
771  * modulemd_module_stream_v1_get_eol:
772  * @self: (in): This #ModulemdModuleStreamV1 object.
773  *
774  * Compatibility function with early iterations of modulemd v1. This function
775  * is a wrapper for `modulemd_module_stream_v1_get_servicelevel("rawhide")`.
776  *
777  * Returns: (transfer none): The end-of-life date for the "rawhide" service
778  * level.
779  *
780  * Since: 2.0
781  * Deprecated: 2.0: Use modulemd_module_stream_v1_get_servicelevel() instead.
782  */
783 MMD_DEPRECATED_FOR (modulemd_module_stream_v1_get_servicelevel)
784 GDate *
785 modulemd_module_stream_v1_get_eol (ModulemdModuleStreamV1 *self);
786 
787 
788 /**
789  * modulemd_module_stream_v1_add_buildtime_requirement:
790  * @self: (in): This #ModulemdModuleStreamV1 object.
791  * @module_name: (in): The name of the module to depend on.
792  * @module_stream: (in): The name of the module stream to depend on.
793  *
794  * Add a build-time dependency for this module.
795  *
796  * Since: 2.0
797  */
798 void
799 modulemd_module_stream_v1_add_buildtime_requirement (
800   ModulemdModuleStreamV1 *self,
801   const gchar *module_name,
802   const gchar *module_stream);
803 
804 /**
805  * modulemd_module_stream_v1_add_runtime_requirement:
806  * @self: (in): This #ModulemdModuleStreamV1 object.
807  * @module_name: (in): The name of the module to depend on.
808  * @module_stream: (in): The name of the module stream to depend on.
809  *
810  * Add a runtime dependency for this module.
811  *
812  * Since: 2.0
813  */
814 void
815 modulemd_module_stream_v1_add_runtime_requirement (
816   ModulemdModuleStreamV1 *self,
817   const gchar *module_name,
818   const gchar *module_stream);
819 
820 
821 /**
822  * modulemd_module_stream_v1_remove_buildtime_requirement:
823  * @self: (in): This #ModulemdModuleStreamV1 object.
824  * @module_name: (in): The name of the module to be removed.
825  *
826  * Remove a build-time dependency for this module.
827  *
828  * Since: 2.0
829  */
830 void
831 modulemd_module_stream_v1_remove_buildtime_requirement (
832   ModulemdModuleStreamV1 *self, const gchar *module_name);
833 
834 
835 /**
836  * modulemd_module_stream_v1_remove_runtime_requirement:
837  * @self: (in): This #ModulemdModuleStreamV1 object.
838  * @module_name: (in): The name of the module to be removed.
839  *
840  * Remove a runtime dependency for this module.
841  *
842  * Since: 2.0
843  */
844 void
845 modulemd_module_stream_v1_remove_runtime_requirement (
846   ModulemdModuleStreamV1 *self, const gchar *module_name);
847 
848 
849 /**
850  * modulemd_module_stream_v1_clear_buildtime_requirements
851  * @self: (in): This #ModulemdModuleStreamV1 object.
852  *
853  * Remove all buildtime dependencies for this module.
854  *
855  * Since: 2.5
856  */
857 void
858 modulemd_module_stream_v1_clear_buildtime_requirements (
859   ModulemdModuleStreamV1 *self);
860 
861 
862 /**
863  * modulemd_module_stream_v1_clear_runtime_requirements
864  * @self: (in): This #ModulemdModuleStreamV1 object.
865  *
866  * Remove all runtime dependencies for this module.
867  *
868  * Since: 2.5
869  */
870 void
871 modulemd_module_stream_v1_clear_runtime_requirements (
872   ModulemdModuleStreamV1 *self);
873 
874 
875 /**
876  * modulemd_module_stream_v1_get_buildtime_modules_as_strv: (rename-to modulemd_module_stream_v1_get_buildtime_modules)
877  * @self: (in): This #ModulemdModuleStreamV1 object.
878  *
879  * Returns: (transfer full): An ordered #GStrv list of module names that this
880  * module depends on at build-time.
881  *
882  * Since: 2.0
883  */
884 GStrv
885 modulemd_module_stream_v1_get_buildtime_modules_as_strv (
886   ModulemdModuleStreamV1 *self);
887 
888 
889 /**
890  * modulemd_module_stream_v1_get_runtime_modules_as_strv: (rename-to modulemd_module_stream_v1_get_runtime_modules)
891  * @self: (in): This #ModulemdModuleStreamV1 object.
892  *
893  * Returns: (transfer full): An ordered #GStrv list of module names that this
894  * module depends on at runtime.
895  *
896  * Since: 2.0
897  */
898 GStrv
899 modulemd_module_stream_v1_get_runtime_modules_as_strv (
900   ModulemdModuleStreamV1 *self);
901 
902 
903 /**
904  * modulemd_module_stream_v1_get_buildtime_requirement_stream:
905  * @self: (in): This #ModulemdModuleStreamV1 object.
906  * @module_name: (in): The name of the module this module depends on.
907  *
908  * Returns: (transfer none): The name of the stream matching this module name
909  * in the build-time dependencies.
910  *
911  * Since: 2.0
912  */
913 const gchar *
914 modulemd_module_stream_v1_get_buildtime_requirement_stream (
915   ModulemdModuleStreamV1 *self, const gchar *module_name);
916 
917 
918 /**
919  * modulemd_module_stream_get_runtime_requirement_stream:
920  * @self: (in): This #ModulemdModuleStreamV1 object.
921  * @module_name: (in): The name of the module this module depends on.
922  *
923  * Returns: (transfer none): The name of the stream matching this module name
924  * in the runtime dependencies.
925  *
926  * Since: 2.0
927  */
928 const gchar *
929 modulemd_module_stream_v1_get_runtime_requirement_stream (
930   ModulemdModuleStreamV1 *self, const gchar *module_name);
931 
932 
933 /**
934  * modulemd_module_stream_v1_set_xmd:
935  * @self: (in): This #ModulemdModuleStreamV1 object.
936  * @xmd: (in) (transfer none): A #GVariant representing arbitrary YAML.
937  *
938  * Sets the eXtensible MetaData (XMD) for this module. XMD is arbitrary YAML
939  * data that will be set and returned as-is (with the exception that the
940  * ordering of mapping keys is not defined). Useful for carrying private data.
941  *
942  * This function assumes ownership of the XMD #GVariant and thus should not be
943  * freed by the caller.
944  *
945  * Since: 2.0
946  */
947 void
948 modulemd_module_stream_v1_set_xmd (ModulemdModuleStreamV1 *self,
949                                    GVariant *xmd);
950 
951 
952 /**
953  * modulemd_module_stream_v1_get_xmd:
954  * @self: (in): This #ModulemdModuleStreamV1 object.
955  *
956  * Returns: (transfer none): The extensible metadata block as a #GVariant.
957  */
958 GVariant *
959 modulemd_module_stream_v1_get_xmd (ModulemdModuleStreamV1 *self);
960 
961 
962 G_END_DECLS
963