gw_settings_new
Creates a new settings list.
GWSettings * gw_settings_new ( void);
This function creates a new settings list. It's an allocation function.
Result: a pointer to the settings structure. Returns NULL when an error occured. .
gw_settings_display
Displays a settings list.
gint gw_settings_display ( GWSettings *p);
This function diplays a settings list.
Result: a error code. Returns 0 when it's done. Returns -1 when an error occured. .
gw_settings_add_pair
Adds a key/value pair.
gint gw_settings_add_pair ( GWSettings *p, gchar *key, gchar *value);
This function adds a key/value pair.
Parameters
p | settings where add |
key | the key to add |
value | the value to add |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
gw_settings_get_value
Gets the value of a pair.
gchar * gw_settings_get_value ( GWSettings *p, gchar *key);
This function gets the value of the pair designed by a key.
Parameters
p | settings to get value |
key | the key |
Result: the value Returns NULL when an error occured. .
gw_settings_free
Frees datas structure.
gint gw_settings_free ( GWSettings *p);
This function frees the settings data structure. Frees all variables in the list.
Parameters
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
gw_settings_pair_display
Displays a key/value pair.
gint gw_settings_pair_display ( gchar * key, gchar *value, gpointer data);
This function diplays a key/value pair.
Parameters
key | the key to display |
value | the value to display |
data | user data (not used at time). |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
gw_settings_pair_free
Frees a key/value pair.
gboolean gw_settings_pair_free ( gchar * key, gchar *value, gpointer data);
This function frees a key/value pair.
Parameters
key | the key to free |
value | the value to free |
data | user data (not used at time). |
Result: an error code. Returns TRUE when it's done. Returns FALSE when an error occured. .
gw_settings_to_line
Stores in a string the pair key/value.
gint gw_settings_to_line ( gchar * key, gchar *value, gchar **line);
This function stores in a string the pair key/value.
Parameters
key | the key to free |
value | the value to free |
line | a pointer to store the pair (the format is "key=valuen"). |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
gw_settings_to_file
Stores in a string all pairs key/value.
gint gw_settings_to_file ( GWSettings *p, gchar **file);
This function stores in a string all pairs key/value.
Parameters
key | the key to free |
value | the value to free |
file | a pointer to store all pairs (the format is "key1=value1nkey2=value2nkey3=value3n"). |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
|