Greenbone Vulnerability Management Libraries  21.4.2
prefs.h
Go to the documentation of this file.
1 /* Copyright (C) 2014-2021 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_PREFS_H
28 #define _GVM_PREFS_H
29 
30 #include <glib.h> /* for gchar */
31 
32 void
33 prefs_config (const char *);
34 const gchar *
35 prefs_get (const gchar *key);
36 int
37 prefs_get_bool (const gchar *key);
38 void
39 prefs_set (const gchar *, const gchar *);
40 void
41 prefs_dump (void);
42 int
43 prefs_nvt_timeout (const char *);
44 
45 GHashTable *
46 preferences_get (void);
47 
48 #endif /* not _GVM_PREFS_H */
void prefs_set(const gchar *, const gchar *)
Set a string preference value via a key.
Definition: prefs.c:153
int prefs_get_bool(const gchar *key)
Get a boolean expression of a preference value via a key.
Definition: prefs.c:130
void prefs_config(const char *)
Apply the configs from given file as preferences.
Definition: prefs.c:167
GHashTable * preferences_get(void)
Get the pointer to the global preferences structure. Eventually this function should not be used anyw...
Definition: prefs.c:92
const gchar * prefs_get(const gchar *key)
Get a string preference value via a key.
Definition: prefs.c:110
int prefs_nvt_timeout(const char *)
Returns the timeout defined by the client or 0 if none was set.
Definition: prefs.c:216
void prefs_dump(void)
Dump the preferences to stdout.
Definition: prefs.c:192