![]() |
![]() |
![]() |
libaudacious SDK Reference Manual | ![]() |
---|---|---|---|---|
ConfigDb; ConfigDb* bmp_cfg_db_open ();void bmp_cfg_db_close (ConfigDb *db);gboolean bmp_cfg_db_get_string (ConfigDb *db, constgchar *section, constgchar *key,gchar **value);gboolean bmp_cfg_db_get_int (ConfigDb *db, constgchar *section, constgchar *key,gint *value);gboolean bmp_cfg_db_get_bool (ConfigDb *db, constgchar *section, constgchar *key,gboolean *value);gboolean bmp_cfg_db_get_float (ConfigDb *db, constgchar *section, constgchar *key,gfloat *value);gboolean bmp_cfg_db_get_double (ConfigDb *db, constgchar *section, constgchar *key,gdouble *value);void bmp_cfg_db_set_string (ConfigDb *db, constgchar *section, constgchar *key, constgchar *value);void bmp_cfg_db_set_int (ConfigDb *db, constgchar *section, constgchar *key,gint value);void bmp_cfg_db_set_bool (ConfigDb *db, constgchar *section, constgchar *key,gboolean value);void bmp_cfg_db_set_float (ConfigDb *db, constgchar *section, constgchar *key,gfloat value);void bmp_cfg_db_set_double (ConfigDb *db, constgchar *section, constgchar *key,gdouble value);void bmp_cfg_db_unset_key (ConfigDb *db, constgchar *section, constgchar *key);
The configuration database is used to store settings used by Audacious and it's plugins.
typedef struct _ConfigDb ConfigDb;
A configuration database handle, opened with bmp_cfg_db_open()
.
ConfigDb* bmp_cfg_db_open ();
Opens the configuration database.
Returns : |
A configuration database handle. |
void bmp_cfg_db_close (ConfigDb *db);
Closes the configuration database.
|
A configuration database handle. |
gboolean bmp_cfg_db_get_string (ConfigDb *db, constgchar *section, constgchar *key,gchar **value);
Searches the configuration database for a value.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to look up. |
|
Pointer to a buffer to put the data in. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean bmp_cfg_db_get_int (ConfigDb *db, constgchar *section, constgchar *key,gint *value);
Searches the configuration database for a value.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to look up. |
|
Pointer to an integer to put the data in. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean bmp_cfg_db_get_bool (ConfigDb *db, constgchar *section, constgchar *key,gboolean *value);
Searches the configuration database for a value.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to look up. |
|
Pointer to a boolean to put the data in. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean bmp_cfg_db_get_float (ConfigDb *db, constgchar *section, constgchar *key,gfloat *value);
Searches the configuration database for a value.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to look up. |
|
Pointer to a floating point integer to put the data in. |
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean bmp_cfg_db_get_double (ConfigDb *db, constgchar *section, constgchar *key,gdouble *value);
Searches the configuration database for a value.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to look up. |
|
Pointer to a double-precision floating point integer to put the data in. |
Returns : |
TRUE if successful, FALSE otherwise. |
void bmp_cfg_db_set_string (ConfigDb *db, constgchar *section, constgchar *key, constgchar *value);
Sets a value in the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |
|
Pointer to a buffer containing the data. |
void bmp_cfg_db_set_int (ConfigDb *db, constgchar *section, constgchar *key,gint value);
Sets a value in the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |
|
Pointer to an integer containing the data. |
void bmp_cfg_db_set_bool (ConfigDb *db, constgchar *section, constgchar *key,gboolean value);
Sets a value in the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |
|
Pointer to a boolean containing the data. |
void bmp_cfg_db_set_float (ConfigDb *db, constgchar *section, constgchar *key,gfloat value);
Sets a value in the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |
|
Pointer to a floating point integer containing the data. |
void bmp_cfg_db_set_double (ConfigDb *db, constgchar *section, constgchar *key,gdouble value);
Sets a value in the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |
|
Pointer to a double precision floating point integer containing the data. |
void bmp_cfg_db_unset_key (ConfigDb *db, constgchar *section, constgchar *key);
Removes a value from the configuration database.
|
A configuration database handle. |
|
The section of the configuration database to search. |
|
The name of the field in the configuration database to set. |