settings.h File Reference

Protos and data structures for configuration file management. More...

`#include <glib.h>`

Go to the source code of this file.

## Data Structures

struct | settings_t
| Struct holding options for settings taken from a key-value config file. More...
struct | settings_iterator_t
| Struct holding options to iterate over a GKeyFile. More...

## Functions

void | settings_cleanup (settings_t *)
| Cleanup a settings structure.
int | init_settings_iterator_from_file (settings_iterator_t *, const gchar *, const gchar *)
| Initialise a settings iterator from a file.
void | cleanup_settings_iterator (settings_iterator_t *)
| Cleanup a settings iterator.
int | settings_iterator_next (settings_iterator_t *)
| Increment an iterator.
const gchar * | settings_iterator_name (settings_iterator_t *)
| Get the name from a settings iterator.
const gchar * | settings_iterator_value (settings_iterator_t *)
| Get the value from a settings iterator.

## Detailed Description

Protos and data structures for configuration file management.

This file contains the protos for settings.c

## Function Documentation

## cleanup_settings_iterator()

void cleanup_settings_iterator | ( | settings_iterator_t * | iterator | ) |

Cleanup a settings iterator.

Parameters

  [in] | iterator | Settings iterator.

## init_settings_iterator_from_file()

int init_settings_iterator_from_file | ( | settings_iterator_t * | iterator,
|  | const gchar * | filename,
|  | const gchar * | group
| ) |  |

Initialise a settings iterator from a file.

Parameters

  [in] | iterator | Settings iterator.
  [in] | filename | Complete name of the configuration file.
  [in] | group | Name of the group in the file.

Returns
  0 success, -1 error.

## settings_cleanup()

void settings_cleanup | ( | settings_t * | settings | ) |

Cleanup a settings structure.

Parameters

  [in] | settings | Settings structure.

## settings_iterator_name()

const gchar * settings_iterator_name | ( | settings_iterator_t * | iterator | ) |

Get the name from a settings iterator.

Parameters

  [in] | iterator | Settings iterator.

Returns
  Name of current key.

## settings_iterator_next()

int settings_iterator_next | ( | settings_iterator_t * | iterator | ) |

Increment an iterator.

Parameters

  [in] | iterator | Settings iterator.

Returns
  TRUE if there was a next item, else FALSE.

## settings_iterator_value()

const gchar * settings_iterator_value | ( | settings_iterator_t * | iterator | ) |

Get the value from a settings iterator.

Parameters

  [in] | iterator | Settings iterator.

Returns
  Value of current key.