OpenVAS Libraries  8.0.3
prefs.h
Go to the documentation of this file.
1 /* openvas-libraries/misc
2  * $Id$
3  * Description: API (protos) for globally stored preferences
4  *
5  * Authors:
6  * Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>
7  *
8  * Copyright:
9  * Copyright (C) 2014 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
33 #ifndef _OPENVAS_PREFS_H
34 #define _OPENVAS_PREFS_H
35 
36 #include <glib.h> /* for gchar */
37 
38 void prefs_init (void);
39 void prefs_config (const char *);
40 const gchar * prefs_get (const gchar * key);
41 int prefs_get_bool (const gchar * key);
42 void prefs_set (const gchar *, const gchar *);
43 void prefs_dump (void);
44 int prefs_nvt_timeout (const char *);
45 
46 struct arglist * preferences_get (void);
47 
48 #endif /* not _OPENVAS_PREFS_H */
int prefs_nvt_timeout(const char *)
Returns the timeout defined by the client or 0 if none was set.
Definition: prefs.c:186
void prefs_set(const gchar *, const gchar *)
Set a string preference value via a key.
Definition: prefs.c:110
void prefs_dump(void)
Dump the preferences to stdout.
Definition: prefs.c:166
void prefs_init(void)
Initializes the preferences structure. If it was already initialized, remove old settings and start f...
Definition: prefs.c:129
Definition: arglists.h:29
void prefs_config(const char *)
Apply the configs from given file as preferences.
Definition: prefs.c:143
const gchar * prefs_get(const gchar *key)
Get a string preference value via a key.
Definition: prefs.c:69
struct arglist * preferences_get(void)
Get the pointer to the global preferences structure. Eventually this function should not be used anyw...
Definition: prefs.c:54
int prefs_get_bool(const gchar *key)
Get a boolean expression of a preference value via a key.
Definition: prefs.c:89