File: modulemd-component-private.h

package info (click to toggle)
libmodulemd 2.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,152 kB
  • sloc: ansic: 37,845; python: 3,236; xml: 1,739; sh: 377; makefile: 42
file content (134 lines) | stat: -rw-r--r-- 4,075 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
/*
 * 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>
#include <yaml.h>

#include "modulemd-component.h"

/**
 * SECTION: modulemd-component-private
 * @title: Modulemd.Component (Private)
 * @stability: Private
 * @short_description: #ModulemdComponent methods that should be used only
 * by internal consumers.
 */


/**
 * modulemd_component_parse_buildafter:
 * @self: This #ModulemdComponent object.
 * @parser: (inout): A libyaml parser object positioned just after the
 * "buildafter" key in a Component section of a YAML document.
 * @error: (out): A #GError that will return the reason for a parse failure.
 *
 * Returns: TRUE if the buildafter list could be parsed successfully.
 *
 * Since: 2.2
 */
gboolean
modulemd_component_parse_buildafter (ModulemdComponent *self,
                                     yaml_parser_t *parser,
                                     GError **error);

/**
 * modulemd_component_parse_buildonly:
 * @self: This #ModulemdComponent object.
 * @parser: (inout): A libyaml parser object positioned just after the
 * "buildonly" key in a Component section of a YAML document.
 * @error: (out): A #GError that will return the reason for a parse failure.
 *
 * Returns: TRUE if the buildonly list could be parsed successfully.
 *
 * Since: 2.2
 */
gboolean
modulemd_component_parse_buildonly (ModulemdComponent *self,
                                    yaml_parser_t *parser,
                                    GError **error);

/**
 * modulemd_component_has_buildafter:
 * @self: This #ModulemdComponent object.
 *
 * Returns: TRUE if one or more buildafter entries have been added to this
 * component.
 *
 * Since: 2.2
 */
gboolean
modulemd_component_has_buildafter (ModulemdComponent *self);


/**
 * modulemd_component_get_buildafter_internal:
 * @self: This #ModulemdComponent object.
 *
 * Returns: The internal hash table representing the set of buildafter
 * dependencies.
 *
 * Since: 2.2
 */
GHashTable *
modulemd_component_get_buildafter_internal (ModulemdComponent *self);


/**
 * modulemd_component_emit_yaml_start:
 * @self: This #ModulemdComponent object.
 * @emitter: (inout): A libyaml emitter object positioned where Component start
 * belongs in the YAML document.
 * @error: (out): A #GError that will return the reason for an emission error.
 *
 * Returns: TRUE if the component header was emitted successfully. FALSE and sets
 * @error appropriately if the YAML could not be emitted.
 *
 * Since: 2.0
 */
gboolean
modulemd_component_emit_yaml_start (ModulemdComponent *self,
                                    yaml_emitter_t *emitter,
                                    GError **error);

/**
 * modulemd_component_emit_yaml_build_common:
 * @self: This #ModulemdComponent object.
 * @emitter: (inout): A libyaml emitter object positioned where a Component's
 * buildorder, buildafter and/or buildonly item(s) should appear in the YAML
 * document.
 * @error: (out): A #GError that will return the reason for an emission error.
 *
 * Returns: TRUE if the component buildorder, buildafter and/or buildonly
 * item(s) were emitted successfully. FALSE and sets @error appropriately if
 * the YAML could not be emitted.
 *
 * Since: 2.2
 */
gboolean
modulemd_component_emit_yaml_build_common (ModulemdComponent *self,
                                           yaml_emitter_t *emitter,
                                           GError **error);

/**
 * modulemd_component_equals_wrapper:
 * @a: A void pointer
 * @b: A void pointer
 *
 * Returns: TRUE, if both pointers are pointers to #ModulemdComponent objects and both objects are equal. FALSE, otherwise.
 *
 * Since: 2.5
 */
gboolean
modulemd_component_equals_wrapper (const void *a, const void *b);