Greenbone Vulnerability Manager 22.5.2
gmp_configs.h
1/* Copyright (C) 2019-2022 Greenbone AG
2 *
3 * SPDX-License-Identifier: AGPL-3.0-or-later
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (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 Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _GVMD_GMP_CONFIGS_H
20#define _GVMD_GMP_CONFIGS_H
21
22#include "gmp_base.h"
23
24#include <gvm/base/array.h>
25#include <gvm/util/xmlutils.h>
26
27/* create_config */
28
29void
30create_config_start (gmp_parser_t *, const gchar **, const gchar **);
31
32void
33create_config_element_start (gmp_parser_t *, const gchar *, const gchar **,
34 const gchar **);
35
36int
37create_config_element_end (gmp_parser_t *, GError **error, const gchar *);
38
39void
40create_config_element_text (const gchar *, gsize);
41
42int
43parse_config_entity (entity_t, const char **, char **, char **,
44 char **, int *, array_t **, array_t **);
45
46/* modify_config */
47
48void
49modify_config_start (gmp_parser_t *, const gchar **, const gchar **);
50
51void
52modify_config_element_start (gmp_parser_t *, const gchar *, const gchar **,
53 const gchar **);
54
55int
56modify_config_element_end (gmp_parser_t *, GError **error, const gchar *);
57
58void
59modify_config_element_text (const gchar *, gsize);
60
61#endif /* not _GVMD_GMP_CONFIGS_H */
void modify_config_element_text(const gchar *text, gsize text_len)
Add text to element.
Definition: gmp_configs.c:1177
void create_config_element_start(gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
Start element.
Definition: gmp_configs.c:132
void modify_config_start(gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
Start a command.
Definition: gmp_configs.c:665
void modify_config_element_start(gmp_parser_t *gmp_parser, const gchar *name, const gchar **attribute_names, const gchar **attribute_values)
Start element.
Definition: gmp_configs.c:684
void create_config_start(gmp_parser_t *gmp_parser, const gchar **attribute_names, const gchar **attribute_values)
Start a command.
Definition: gmp_configs.c:113
int parse_config_entity(entity_t config, const char **config_id, char **name, char **comment, char **usage_type, int *all_selector, array_t **import_nvt_selectors, array_t **import_preferences)
Get creation data from a config entity.
Definition: gmp_configs.c:189
void create_config_element_text(const gchar *text, gsize text_len)
Add text to element.
Definition: gmp_configs.c:619
int modify_config_element_end(gmp_parser_t *gmp_parser, GError **error, const gchar *name)
End element.
Definition: gmp_configs.c:1158
int create_config_element_end(gmp_parser_t *gmp_parser, GError **error, const gchar *name)
End element.
Definition: gmp_configs.c:600
A handle on a GMP parser.
Definition: gmp_base.h:28