OpenVAS Libraries  4.0+rc3.SVN
Data Structures | Functions | Variables
hash_table_util.c File Reference
#include "hash_table_util.h"

Data Structures

struct  list_and_cmpfunc
 A List and a comparison function. More...

Functions

GSList * keys_as_string_list (GHashTable *hash_table, GCompareFunc cmp_func)
 Returns a list of keys (assumed to be strings) of a given GHashTable.

Variables

struct list_and_cmpfunc list_and_cmpfunc

Detailed Description

Convenience functions for GHashTables.

Todo:
Note that some of the code might get obsolete with future version of GLib.
Todo:
This module is a candidate for a util library (as it is not specific to OPENVAS).

Function Documentation

GSList* keys_as_string_list ( GHashTable *  hash_table,
GCompareFunc  cmp_func 
)

Returns a list of keys (assumed to be strings) of a given GHashTable.

that is optionally sorted.

Todo:
Note that with GLib 2.14 this function is obsolete, as Glib 2.14 defines g_hash_table_get_keys ().
Parameters:
hash_tableThe GHashTable whose keys to return.
cmp_func(can be NULL) String comparison function if the returned list shall be sorted.
Returns:
A GSList containing pointers to the keys of the given GHashTable.