|
xine-lib
1.2.9
|
#include <errno.h>#include <time.h>#include <sys/stat.h>#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <pthread.h>#include <xine/configfile.h>#include "bswap.h"#include <xine/xineutils.h>#include <xine/xine_internal.h>Macros | |
| #define | LOG_MODULE "configfile" |
| #define | LOG_VERBOSE |
Functions | |
| static int | config_section_enum (const char *sect) |
| static void | config_key_split (const char *key, char **base, char **section, char **subsect, char **name) |
| static void | config_insert (config_values_t *this, cfg_entry_t *new_entry) |
| static cfg_entry_t * | config_add (config_values_t *this, const char *key, int exp_level) |
| static void | config_remove (config_values_t *this, cfg_entry_t *entry, cfg_entry_t *prev) |
| static const char * | config_xlate_internal (const char *key, const xine_config_entry_translation_t *trans) |
| static const char * | config_translate_key (const char *key, char **tmp) |
| static void | config_lookup_entry_int (config_values_t *this, const char *key, cfg_entry_t **entry, cfg_entry_t **prev) |
| static cfg_entry_t * | config_lookup_entry (config_values_t *this, const char *key) |
| static void | config_reset_value (cfg_entry_t *entry) |
| static void | config_shallow_copy (xine_cfg_entry_t *dest, const cfg_entry_t *src) |
| static cfg_entry_t * | config_register_key (config_values_t *this, const char *key, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static cfg_entry_t * | config_register_string_internal (config_values_t *this, const char *key, const char *def_value, int num_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static char * | config_register_string (config_values_t *this, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static char * | config_register_filename (config_values_t *this, const char *key, const char *def_value, int req_type, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static int | config_register_num (config_values_t *this, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static int | config_register_bool (config_values_t *this, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static int | config_register_range (config_values_t *this, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static int | config_parse_enum (const char *str, const char **values) |
| static int | config_register_enum (config_values_t *this, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data) |
| static void | config_update_num (config_values_t *this, const char *key, int value) |
| static void | config_update_string (config_values_t *this, const char *key, const char *value) |
| void | xine_config_set_translation_user (const xine_config_entry_translation_t *xlate) |
| void | xine_config_load (xine_t *xine, const char *filename) |
| void | xine_config_save (xine_t *xine, const char *filename) |
| static void | config_dispose (config_values_t *this) |
| static void | config_unregister_cb (config_values_t *this, const char *key) |
| void | _x_config_unregister_cb_class_d (config_values_t *this, void *callback_data) |
| static void | config_set_new_entry_callback (config_values_t *this, xine_config_cb_t new_entry_cb, void *cbdata) |
| static void | config_unset_new_entry_callback (config_values_t *this) |
| static int | put_int (uint8_t *buffer, int pos, int value) |
| static int | put_string (uint8_t *buffer, int pos, const char *value, int value_len) |
| static char * | config_get_serialized_entry (config_values_t *this, const char *key) |
| static size_t | get_int (uint8_t *buffer, size_t buffer_size, size_t pos, int *value) |
| static size_t | get_string (uint8_t *buffer, int buffer_size, size_t pos, char **value) |
| static char * | config_register_serialized_entry (config_values_t *this, const char *value) |
| config_values_t * | _x_config_init (void) |
| allocate and init a new xine config object More... | |
| int | _x_config_change_opt (config_values_t *config, const char *opt) |
| interpret stream_setup part of mrls for config value changes More... | |
Variables | |
| static const xine_config_entry_translation_t * | config_entry_translation_user = NULL |
| static const xine_config_entry_translation_t | config_entry_translation [] |
| #define LOG_MODULE "configfile" |
| #define LOG_VERBOSE |
| int _x_config_change_opt | ( | config_values_t * | config, |
| const char * | opt | ||
| ) |
interpret stream_setup part of mrls for config value changes
References _, cfg_entry_s::exp_level, key, config_values_s::lookup_entry, cfg_entry_s::num_value, cfg_entry_s::type, cfg_entry_s::unknown_value, config_values_s::update_num, config_values_s::update_string, XINE_CONFIG_SECURITY, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_CONFIG_TYPE_STRING, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by open_internal().
| config_values_t* _x_config_init | ( | void | ) |
allocate and init a new xine config object
References config_dispose(), config_get_serialized_entry(), config_lookup_entry(), config_parse_enum(), config_register_bool(), config_register_enum(), config_register_filename(), config_register_num(), config_register_range(), config_register_serialized_entry(), config_register_string(), config_set_new_entry_callback(), config_unregister_cb(), config_unset_new_entry_callback(), config_update_num(), config_update_string(), and NULL.
Referenced by xine_new().
| void _x_config_unregister_cb_class_d | ( | config_values_t * | this, |
| void * | callback_data | ||
| ) |
References _x_assert, cfg_entry_s::callback, cfg_entry_s::callback_data, cfg_entry_s::next, and NULL.
Referenced by _x_dispose_plugins().
|
static |
References cfg_entry_s::config, config_insert(), cfg_entry_s::exp_level, cfg_entry_s::key, key, lprintf, NULL, cfg_entry_s::str_value, cfg_entry_s::type, cfg_entry_s::unknown_value, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by config_register_key(), and xine_config_load().
|
static |
References _x_freep(), config_reset_value(), cfg_entry_s::key, lprintf, cfg_entry_s::next, and cfg_entry_s::unknown_value.
Referenced by _x_config_init().
|
static |
References config_lookup_entry_int(), cfg_entry_s::description, cfg_entry_s::enum_values, cfg_entry_s::exp_level, cfg_entry_s::help, cfg_entry_s::key, key, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, put_int(), put_string(), cfg_entry_s::range_max, cfg_entry_s::range_min, cfg_entry_s::str_default, cfg_entry_s::type, and xine_base64_encode().
Referenced by _x_config_init().
|
static |
References _x_freep(), config_key_split(), config_section_enum(), cfg_entry_s::exp_level, cfg_entry_s::key, cfg_entry_s::next, and NULL.
Referenced by config_add(), and config_register_key().
|
static |
References key, name, and NULL.
Referenced by config_insert().
|
static |
References config_lookup_entry_int(), and key.
Referenced by _x_config_init(), config_unregister_cb(), and xine_config_load().
|
static |
References config_translate_key(), key, cfg_entry_s::next, and NULL.
Referenced by config_get_serialized_entry(), config_lookup_entry(), and config_register_key().
|
static |
References lprintf.
Referenced by _x_config_init(), config_register_enum(), and config_update_string().
|
static |
References _x_assert, config_register_key(), config_reset_value(), cfg_entry_s::description, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_BOOL, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init().
|
static |
References _x_assert, config_parse_enum(), config_register_key(), config_reset_value(), cfg_entry_s::description, cfg_entry_s::enum_values, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_ENUM, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init().
|
static |
References config_register_string_internal(), key, and cfg_entry_s::str_value.
Referenced by _x_config_init().
|
static |
References _x_assert, cfg_entry_s::callback, cfg_entry_s::callback_data, config_add(), config_insert(), config_lookup_entry_int(), config_remove(), config_shallow_copy(), cfg_entry_s::exp_level, key, and lprintf.
Referenced by config_register_bool(), config_register_enum(), config_register_num(), config_register_range(), and config_register_string_internal().
|
static |
References _x_assert, config_register_key(), config_reset_value(), cfg_entry_s::description, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_NUM, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init().
|
static |
References _x_assert, config_register_key(), config_reset_value(), cfg_entry_s::description, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_RANGE, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init().
|
static |
References get_int(), get_string(), key, NULL, xine_base64_decode(), XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_CONFIG_TYPE_STRING, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init().
|
static |
References config_register_string_internal(), key, and cfg_entry_s::str_value.
Referenced by _x_config_init().
|
static |
References _x_assert, config_register_key(), config_reset_value(), cfg_entry_s::description, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::num_value, cfg_entry_s::str_default, cfg_entry_s::str_value, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_STRING, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by config_register_filename(), and config_register_string().
|
static |
References cfg_entry_s::next.
Referenced by config_register_key().
|
static |
References _x_freep(), cfg_entry_s::description, cfg_entry_s::enum_values, cfg_entry_s::help, cfg_entry_s::num_value, cfg_entry_s::str_default, and cfg_entry_s::str_value.
Referenced by config_dispose(), config_register_bool(), config_register_enum(), config_register_num(), config_register_range(), and config_register_string_internal().
|
static |
References NULL.
Referenced by config_insert().
|
static |
Referenced by _x_config_init().
|
static |
References cfg_entry_s::callback, xine_cfg_entry_s::callback, cfg_entry_s::callback_data, xine_cfg_entry_s::callback_data, cfg_entry_s::description, xine_cfg_entry_s::description, cfg_entry_s::enum_values, xine_cfg_entry_s::enum_values, cfg_entry_s::exp_level, xine_cfg_entry_s::exp_level, cfg_entry_s::help, xine_cfg_entry_s::help, cfg_entry_s::key, xine_cfg_entry_s::key, cfg_entry_s::num_default, xine_cfg_entry_s::num_default, cfg_entry_s::num_value, xine_cfg_entry_s::num_value, cfg_entry_s::range_max, xine_cfg_entry_s::range_max, cfg_entry_s::range_min, xine_cfg_entry_s::range_min, cfg_entry_s::str_default, xine_cfg_entry_s::str_default, cfg_entry_s::str_value, xine_cfg_entry_s::str_value, cfg_entry_s::type, xine_cfg_entry_s::type, cfg_entry_s::unknown_value, and xine_cfg_entry_s::unknown_value.
Referenced by config_register_key(), config_update_num(), and config_update_string().
|
static |
References _x_asprintf(), config_entry_translation, config_entry_translation_user, config_xlate_internal(), key, and NULL.
Referenced by config_lookup_entry_int(), and xine_config_load().
|
static |
References _x_assert, cfg_entry_s::callback, cfg_entry_s::callback_data, config_lookup_entry(), key, and NULL.
Referenced by _x_config_init().
|
static |
References NULL.
Referenced by _x_config_init().
|
static |
References cfg_entry_s::callback, cfg_entry_s::callback_data, config_shallow_copy(), cfg_entry_s::key, key, lprintf, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::type, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_STRING, and XINE_CONFIG_TYPE_UNKNOWN.
Referenced by _x_config_init(), config_update_string(), and xine_config_load().
|
static |
References cfg_entry_s::callback, cfg_entry_s::callback_data, config_parse_enum(), config_shallow_copy(), config_update_num(), cfg_entry_s::enum_values, cfg_entry_s::key, key, lprintf, NULL, cfg_entry_s::str_value, cfg_entry_s::type, XINE_CONFIG_TYPE_ENUM, and XINE_CONFIG_TYPE_STRING.
Referenced by _x_config_init(), and xine_config_load().
|
static |
References key, xine_config_entry_translation_t::new_name, NULL, and xine_config_entry_translation_t::old_name.
Referenced by config_translate_key().
|
static |
References _X_LE_32.
Referenced by config_register_serialized_entry(), and get_string().
|
static |
References get_int(), and NULL.
Referenced by config_register_serialized_entry().
|
static |
Referenced by config_get_serialized_entry(), and put_string().
|
static |
References put_int().
Referenced by config_get_serialized_entry().
| void xine_config_load | ( | xine_t * | xine, |
| const char * | filename | ||
| ) |
References _, _x_abort, xine_s::config, config_add(), CONFIG_FILE_VERSION, config_lookup_entry(), config_translate_key(), config_update_num(), config_update_string(), cfg_entry_s::key, key, lprintf, NULL, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_CONFIG_TYPE_STRING, XINE_CONFIG_TYPE_UNKNOWN, xine_log(), and XINE_LOG_MSG.
| void xine_config_save | ( | xine_t * | xine, |
| const char * | filename | ||
| ) |
References _, xine_s::config, CONFIG_FILE_VERSION, cfg_entry_s::description, cfg_entry_s::enum_values, cfg_entry_s::key, lprintf, cfg_entry_s::next, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, cfg_entry_s::str_default, cfg_entry_s::str_value, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_CONFIG_TYPE_STRING, XINE_CONFIG_TYPE_UNKNOWN, XINE_PATH_MAX, XINE_VERBOSITY_LOG, and xprintf.
| void xine_config_set_translation_user | ( | const xine_config_entry_translation_t * | xlate | ) |
References config_entry_translation_user.
|
static |
Referenced by config_translate_key().
|
static |
Referenced by config_translate_key(), and xine_config_set_translation_user().
1.8.14