Greenbone Vulnerability Management Libraries
21.4.2
|
Implementation of API to handle globally stored preferences. More...
Macros | |
#define | G_LOG_DOMAIN "libgvm base" |
GLib log domain. More... | |
Functions | |
void | prefs_set (const gchar *key, const gchar *value) |
Set a string preference value via a key. More... | |
static void | prefs_init (void) |
Initializes the preferences structure. If it was already initialized, remove old settings and start from scratch. More... | |
GHashTable * | preferences_get (void) |
Get the pointer to the global preferences structure. Eventually this function should not be used anywhere. More... | |
const gchar * | prefs_get (const gchar *key) |
Get a string preference value via a key. More... | |
int | prefs_get_bool (const gchar *key) |
Get a boolean expression of a preference value via a key. More... | |
void | prefs_config (const char *config) |
Apply the configs from given file as preferences. More... | |
void | prefs_dump (void) |
Dump the preferences to stdout. More... | |
int | prefs_nvt_timeout (const char *oid) |
Returns the timeout defined by the client or 0 if none was set. More... | |
Variables | |
static GHashTable * | global_prefs = NULL |
Implementation of API to handle globally stored preferences.
A global store of preferences to scanner and NVTs is handled by this module.
#define G_LOG_DOMAIN "libgvm base" |
GLib log domain.
GHashTable* preferences_get | ( | void | ) |
Get the pointer to the global preferences structure. Eventually this function should not be used anywhere.
void prefs_config | ( | const char * | config | ) |
Apply the configs from given file as preferences.
config | Filename of the configuration file. |
void prefs_dump | ( | void | ) |
Dump the preferences to stdout.
const gchar* prefs_get | ( | const gchar * | key | ) |
Get a string preference value via a key.
key | The identifier for the preference. |
int prefs_get_bool | ( | const gchar * | key | ) |
Get a boolean expression of a preference value via a key.
key | The identifier for the preference. |
|
static |
Initializes the preferences structure. If it was already initialized, remove old settings and start from scratch.
int prefs_nvt_timeout | ( | const char * | oid | ) |
Returns the timeout defined by the client or 0 if none was set.
oid | OID of NVT to ask timeout value of. |
void prefs_set | ( | const gchar * | key, |
const gchar * | value | ||
) |
Set a string preference value via a key.
key | The identifier for the preference. A copy of this will be created if necessary. |
value | The value to set. A copy of this will be created. |
|
static |