Protos and data structures for NVT Information data sets.
More...
#include <glib.h>
Go to the source code of this file.
|
| void | prefs_config (const char *) |
| | Apply the configs from given file as preferences. 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_set (const gchar *, const gchar *) |
| | Set a string preference value via a key. More...
|
| |
| void | prefs_dump (void) |
| | Dump the preferences to stdout. More...
|
| |
| int | prefs_nvt_timeout (const char *) |
| | Returns the timeout defined by the client or 0 if none was set. More...
|
| |
| GHashTable * | preferences_get (void) |
| | Get the pointer to the global preferences structure. Eventually this function should not be used anywhere. More...
|
| |
Protos and data structures for NVT Information data sets.
This file contains the protos for prefs.c
◆ preferences_get()
| GHashTable * preferences_get |
( |
void |
| ) |
|
Get the pointer to the global preferences structure. Eventually this function should not be used anywhere.
- Returns
- Pointer to the global preferences structure.
◆ prefs_config()
| void prefs_config |
( |
const char * |
config | ) |
|
Apply the configs from given file as preferences.
- Parameters
-
| config | Filename of the configuration file. |
◆ prefs_dump()
Dump the preferences to stdout.
◆ prefs_get()
| const gchar * prefs_get |
( |
const gchar * |
key | ) |
|
Get a string preference value via a key.
- Parameters
-
| key | The identifier for the preference. |
- Returns
- A pointer to a string with the value for the preference. NULL in case for the key no preference was found or the preference is not of type string.
◆ prefs_get_bool()
| int prefs_get_bool |
( |
const gchar * |
key | ) |
|
Get a boolean expression of a preference value via a key.
- Parameters
-
| key | The identifier for the preference. |
- Returns
- 1 if the value is considered to represent "true" and 0 if the value is considered to represent "false". If the preference is of type string, value "yes" is true, anything else is false. Any other type or non-existing key is false.
◆ prefs_nvt_timeout()
| int prefs_nvt_timeout |
( |
const char * |
oid | ) |
|
Returns the timeout defined by the client or 0 if none was set.
- Parameters
-
| oid | OID of NVT to ask timeout value of. |
- Returns
- 0 if no timeout for the NVT oid was found, timeout in seconds otherwise.
◆ prefs_set()
| void prefs_set |
( |
const gchar * |
key, |
|
|
const gchar * |
value |
|
) |
| |
Set a string preference value via a key.
- Parameters
-
| 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. |