OpenVAS Libraries
4.0+rc3.SVN
|
Defines | |
#define | GROUP_NONE "GHashTableGKeyFile" |
Groupname placeholder. So far, no further order (like groups) is supported. | |
Functions | |
gboolean | hash_table_file_write (GHashTable *ghashtable, const char *filename) |
Writes key/value pairs from a g_hash_table into a key/value file. | |
GHashTable * | hash_table_file_read_text (const char *text, gsize length) |
Reads key/value pairs (strings) from a text into a GHashtable. | |
GHashTable * | hash_table_file_read (const char *filename) |
Reads key/value pairs (strings) from a file back into a GHashtable. |
Functions to create a GKeyFile from a GHashTable and vice versa. Both are assumed to contain strings only. Key-value pairs are 'flat', the structuring group- elements of an GKeyFile are not used. Instead, all pairs are written added to the group "GHashTableGKeyFile" (defined in GROUP_NONE).
GHashTable* hash_table_file_read | ( | const char * | filename | ) |
Reads key/value pairs (strings) from a file back into a GHashtable.
The file has to follow freedesktop.org specifications.
filename | The filename to read from. |
GHashTable* hash_table_file_read_text | ( | const char * | text, |
gsize | length | ||
) |
Reads key/value pairs (strings) from a text into a GHashtable.
The text has to follow freedesktop.org specifications (e.g. be the text of a ini- file).
text | The text to use. |
length | Lenght of text. |
gboolean hash_table_file_write | ( | GHashTable * | ghashtable, |
const char * | filename | ||
) |
Writes key/value pairs from a g_hash_table into a key/value file.
The procedure will only work with string keys and string values. The file format follows freedesktop.org specifications, the group will be GROUP_NONE (define).
ghashtable | The hashtable to read key/value pairs from. |
filename | The filename for the key/value file. |