XMMS2
|
Controls configuration for the server. More...
Macros | |
#define | XMMS_CONFIG_VERSION 2 |
Config file version. More... | |
Functions | |
const gchar * | xmms_config_property_lookup_get_string (xmms_config_t *conf, const gchar *key, xmms_error_t *err) |
Config functions. More... | |
xmms_config_property_t * | xmms_config_lookup (const gchar *path) |
Look up a config key from the global config. More... | |
const gchar * | xmms_config_property_get_name (const xmms_config_property_t *prop) |
Get the name of a config property. More... | |
void | xmms_config_property_set_data (xmms_config_property_t *prop, const gchar *data) |
Set the data of the config property to a new value. More... | |
const gchar * | xmms_config_property_get_string (const xmms_config_property_t *prop) |
Return the value of a config property as a string. More... | |
gint | xmms_config_property_get_int (const xmms_config_property_t *prop) |
Return the value of a config property as an int. More... | |
gfloat | xmms_config_property_get_float (const xmms_config_property_t *prop) |
Return the value of a config property as a float. More... | |
void | xmms_config_property_callback_set (xmms_config_property_t *prop, xmms_object_handler_t cb, gpointer userdata) |
Set a callback function for a config property. More... | |
void | xmms_config_property_callback_remove (xmms_config_property_t *prop, xmms_object_handler_t cb, gpointer userdata) |
Remove a callback from a config property. More... | |
xmms_config_property_t * | xmms_config_property_register (const gchar *path, const gchar *default_value, xmms_object_handler_t cb, gpointer userdata) |
Register a new config property. More... | |
Controls configuration for the server.
The configuration is saved to, and loaded from an XML file. It's split into plugin, client and core parts. This documents the configuration for parts inside the server. For plugin config see each server object's documentation.
xmms_config_property_t* xmms_config_lookup | ( | const gchar * | path | ) |
Look up a config key from the global config.
path | A configuration path. Could be core.myconfig or effect.foo.myconfig |
Definition at line 171 of file config.c.
Referenced by xmms_config_property_lookup_get_string(), xmms_plugin_config_lookup(), xmms_sqlite_create(), and xmms_sqlite_open().
void xmms_config_property_callback_remove | ( | xmms_config_property_t * | prop, |
xmms_object_handler_t | cb, | ||
gpointer | userdata | ||
) |
void xmms_config_property_callback_set | ( | xmms_config_property_t * | prop, |
xmms_object_handler_t | cb, | ||
gpointer | userdata | ||
) |
gfloat xmms_config_property_get_float | ( | const xmms_config_property_t * | prop | ) |
gint xmms_config_property_get_int | ( | const xmms_config_property_t * | prop | ) |
Return the value of a config property as an int.
prop | The config property |
Definition at line 255 of file config.c.
Referenced by xmms_xform_plugin_supports().
const gchar* xmms_config_property_get_name | ( | const xmms_config_property_t * | prop | ) |
const gchar* xmms_config_property_get_string | ( | const xmms_config_property_t * | prop | ) |
Return the value of a config property as a string.
prop | The config property |
Definition at line 243 of file config.c.
Referenced by on_config_ipcsocket_change(), xmms_sqlite_create(), and xmms_sqlite_open().
const gchar* xmms_config_property_lookup_get_string | ( | xmms_config_t * | conf, |
const gchar * | key, | ||
xmms_error_t * | err | ||
) |
Config functions.
Lookup config key and return its associated value as a string. This is a convenient function to make it easier to get a configuration value rather than having to call xmms_config_property_get_string separately.
conf | Global config |
key | Configuration property to lookup |
err | if error occurs this will be filled in |
xmms_config_property_t* xmms_config_property_register | ( | const gchar * | path, |
const gchar * | default_value, | ||
xmms_object_handler_t | cb, | ||
gpointer | userdata | ||
) |
Register a new config property.
This should be called from the init code as XMMS2 won't allow set/get on properties that haven't been registered.
path | The path in the config tree. |
default_value | If the value was not found in the configfile, what should we use? |
cb | A callback function that will be called if the value is changed by the client. Can be set to NULL. |
userdata | Data to pass to the callback function. |
Definition at line 334 of file config.c.
Referenced by xmms_plugin_config_property_register().
void xmms_config_property_set_data | ( | xmms_config_property_t * | prop, |
const gchar * | data | ||
) |