OpenVAS Libraries
4.0+rc3.SVN
Main Page
Related Pages
Data Structures
Files
File List
Globals
base
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 modify
13
* it under the terms of the GNU General Public License version 2,
14
* or, at your option, any later version as published by the Free
15
* Software Foundation
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
46
int
settings_init
(
settings_t
*,
const
gchar *,
const
gchar *);
47
void
settings_cleanup
(
settings_t
*);
48
void
settings_set
(
settings_t
*,
const
gchar *,
const
gchar *);
49
int
settings_save
(
settings_t
*);
50
51
typedef
struct
52
{
53
gchar **keys;
54
settings_t
settings;
55
gchar **current_key;
56
gchar **last_key;
57
}
settings_iterator_t
;
58
59
int
init_settings_iterator
(
settings_iterator_t
*,
const
gchar *,
60
const
gchar *);
61
int
init_settings_iterator_from_file
(
settings_iterator_t
*,
const
gchar *,
62
const
gchar *);
63
void
cleanup_settings_iterator
(
settings_iterator_t
*);
64
int
settings_iterator_next
(
settings_iterator_t
*);
65
const
gchar *
settings_iterator_name
(
settings_iterator_t
*);
66
const
gchar *
settings_iterator_value
(
settings_iterator_t
*);
67
68
#endif
/* not _OPENVAS_LIBRARIES_BASE_SETTINGS_H */
Generated by
1.8.1.1