ConfigDB

ConfigDB — The audacious configuration database.

Synopsis




                    ConfigDb;
ConfigDb*           bmp_cfg_db_open                     ();
void                bmp_cfg_db_close                    (ConfigDb *db);
gboolean            bmp_cfg_db_get_string               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gchar **value);
gboolean            bmp_cfg_db_get_int                  (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gint *value);
gboolean            bmp_cfg_db_get_bool                 (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gboolean *value);
gboolean            bmp_cfg_db_get_float                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gfloat *value);
gboolean            bmp_cfg_db_get_double               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gdouble *value);
void                bmp_cfg_db_set_string               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         const gchar *value);
void                bmp_cfg_db_set_int                  (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gint value);
void                bmp_cfg_db_set_bool                 (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gboolean value);
void                bmp_cfg_db_set_float                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gfloat value);
void                bmp_cfg_db_set_double               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gdouble value);
void                bmp_cfg_db_unset_key                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key);

Description

The configuration database is used to store settings used by Audacious and it's plugins.

Details

ConfigDb

typedef struct _ConfigDb ConfigDb;

A configuration database handle, opened with bmp_cfg_db_open().


bmp_cfg_db_open ()

ConfigDb*           bmp_cfg_db_open                     ();

Opens the configuration database.

Returns :

A configuration database handle.

bmp_cfg_db_close ()

void                bmp_cfg_db_close                    (ConfigDb *db);

Closes the configuration database.

db :

A configuration database handle.

bmp_cfg_db_get_string ()

gboolean            bmp_cfg_db_get_string               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gchar **value);

Searches the configuration database for a value.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to look up.

value :

Pointer to a buffer to put the data in.

Returns :

TRUE if successful, FALSE otherwise.

bmp_cfg_db_get_int ()

gboolean            bmp_cfg_db_get_int                  (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gint *value);

Searches the configuration database for a value.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to look up.

value :

Pointer to an integer to put the data in.

Returns :

TRUE if successful, FALSE otherwise.

bmp_cfg_db_get_bool ()

gboolean            bmp_cfg_db_get_bool                 (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gboolean *value);

Searches the configuration database for a value.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to look up.

value :

Pointer to a boolean to put the data in.

Returns :

TRUE if successful, FALSE otherwise.

bmp_cfg_db_get_float ()

gboolean            bmp_cfg_db_get_float                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gfloat *value);

Searches the configuration database for a value.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to look up.

value :

Pointer to a floating point integer to put the data in.

Returns :

TRUE if successful, FALSE otherwise.

bmp_cfg_db_get_double ()

gboolean            bmp_cfg_db_get_double               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gdouble *value);

Searches the configuration database for a value.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to look up.

value :

Pointer to a double-precision floating point integer to put the data in.

Returns :

TRUE if successful, FALSE otherwise.

bmp_cfg_db_set_string ()

void                bmp_cfg_db_set_string               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         const gchar *value);

Sets a value in the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.

value :

Pointer to a buffer containing the data.

bmp_cfg_db_set_int ()

void                bmp_cfg_db_set_int                  (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gint value);

Sets a value in the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.

value :

Pointer to an integer containing the data.

bmp_cfg_db_set_bool ()

void                bmp_cfg_db_set_bool                 (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gboolean value);

Sets a value in the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.

value :

Pointer to a boolean containing the data.

bmp_cfg_db_set_float ()

void                bmp_cfg_db_set_float                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gfloat value);

Sets a value in the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.

value :

Pointer to a floating point integer containing the data.

bmp_cfg_db_set_double ()

void                bmp_cfg_db_set_double               (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gdouble value);

Sets a value in the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.

value :

Pointer to a double precision floating point integer containing the data.

bmp_cfg_db_unset_key ()

void                bmp_cfg_db_unset_key                (ConfigDb *db,
                                                         const gchar *section,
                                                         const gchar *key);

Removes a value from the configuration database.

db :

A configuration database handle.

section :

The section of the configuration database to search.

key :

The name of the field in the configuration database to set.