Greenbone Vulnerability Management Libraries 22.4.1
settings.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2022 Greenbone Networks GmbH
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the 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 General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
27#ifndef _GVM_SETTINGS_H
28#define _GVM_SETTINGS_H
29
30#include <glib.h>
31
36typedef struct
37{
38 gchar *file_name;
39 gchar *group_name;
40 GKeyFile *key_file;
42
43void
45
49typedef struct
50{
51 gchar **keys;
53 gchar **current_key;
54 gchar **last_key;
56
57int
59 const gchar *);
60void
62int
64const gchar *
66const gchar *
68
69#endif /* not _GVM_SETTINGS_H */
void cleanup_settings_iterator(settings_iterator_t *)
Cleanup a settings iterator.
Definition: settings.c:150
int init_settings_iterator_from_file(settings_iterator_t *, const gchar *, const gchar *)
Initialise a settings iterator from a file.
Definition: settings.c:112
const gchar * settings_iterator_name(settings_iterator_t *)
Get the name from a settings iterator.
Definition: settings.c:180
const gchar * settings_iterator_value(settings_iterator_t *)
Get the value from a settings iterator.
Definition: settings.c:193
int settings_iterator_next(settings_iterator_t *)
Increment an iterator.
Definition: settings.c:164
void settings_cleanup(settings_t *)
Cleanup a settings structure.
Definition: settings.c:95
Struct holding options to iterate over a GKeyFile.
Definition: settings.h:50
gchar ** current_key
Definition: settings.h:53
settings_t settings
Definition: settings.h:52
gchar ** keys
Definition: settings.h:51
gchar ** last_key
Definition: settings.h:54
Struct holding options for settings taken from a key-value config file.
Definition: settings.h:37
GKeyFile * key_file
Definition: settings.h:40
gchar * group_name
Definition: settings.h:39
gchar * file_name
Definition: settings.h:38