OpenVAS Libraries  8.0.3
settings.h
Go to the documentation of this file.
1 /* openvas-libraries/base
2  * $Id$
3  * Description: API (structs and protos) for configuration file management
4  *
5  * Authors:
6  * Matthew Mundell <matthew.mundell@intevation.de>
7  * Michael Wiegand <michael.wiegand@intevation.de>
8  *
9  * Copyright:
10  * Copyright (C) 2010 Greenbone Networks GmbH
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25  */
26 
34 #ifndef _OPENVAS_LIBRARIES_BASE_SETTINGS_H
35 #define _OPENVAS_LIBRARIES_BASE_SETTINGS_H
36 
37 #include <glib.h>
38 
39 typedef struct
40 {
41  gchar *file_name;
42  gchar *group_name;
43  GKeyFile *key_file;
44 } settings_t;
45 
47 
48 typedef struct
49 {
50  gchar **keys;
52  gchar **current_key;
53  gchar **last_key;
55 
57  const gchar *);
62 
63 #endif /* not _OPENVAS_LIBRARIES_BASE_SETTINGS_H */
GKeyFile * key_file
Definition: settings.h:43
int settings_iterator_next(settings_iterator_t *)
Increment an iterator.
Definition: settings.c:168
Definition: settings.h:39
const gchar * settings_iterator_name(settings_iterator_t *)
Get the name from a settings iterator.
Definition: settings.c:184
gchar ** current_key
Definition: settings.h:52
Definition: settings.h:48
gchar ** last_key
Definition: settings.h:53
void cleanup_settings_iterator(settings_iterator_t *)
Cleanup a settings iterator.
Definition: settings.c:154
gchar * file_name
Definition: settings.h:41
const gchar * settings_iterator_value(settings_iterator_t *)
Get the value from a settings iterator.
Definition: settings.c:197
gchar * group_name
Definition: settings.h:42
gchar ** keys
Definition: settings.h:50
settings_t settings
Definition: settings.h:51
int init_settings_iterator_from_file(settings_iterator_t *, const gchar *, const gchar *)
Initialise a settings iterator from a file.
Definition: settings.c:115
void settings_cleanup(settings_t *)
Cleanup a settings structure.
Definition: settings.c:98