xine-lib: xine-lib-1.2.13/src/xine-engine/configfile.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
configfile.c File Reference
`#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/sorted_array.h>`
`#include <xine/xine_internal.h>`
`#include "xine_private.h"`

## Data Structures
struct | fat_cfg_entry_t
struct | very_fat_cfg_entry_t
struct | fat_config_values_t
struct | _cfg_cb_info_t
struct | _cfg_cb_relay_t

## Macros
#define | LOG_MODULE "configfile"
#define | LOG_VERBOSE
#define | SINGLE_CHUNK_ENUMS
#define | MAX_SORT_KEY 320
#define | PSEP '/'
#define | STRING_BACKLOG_LD 2
#define | _CFG_DUMMY_DATA (void *)1
#define | _CFG_BIT_HAS_CALLBACKS 30
#define | FIND_ONLY 0x7fffffff
#define | _MAX_CFG_KEY 320
#define | XCF_HAVE_BACKUP 1
#define | XCF_HAVE_FILE 2
#define | XCF_HAVE_TFILE 4
#define | XCF_HAVE_ITEMS 8
#define | XCS_BUF_SIZE 4096
#define | get_string(s, len)

## Functions
static void | _config_set_fat_entry (fat_cfg_entry_t *entry)
static int | _config_is_fat_entry (fat_cfg_entry_t *entry)
static void | _cfg_relay (void *data, xine_cfg_entry_t *e)
static int | _cfg_cb_clear (cfg_entry_t *entry)
static int | _cfg_cb_clear_report (xine_t *xine, cfg_entry_t *entry)
static int | _cfg_cb_d_rem (cfg_entry_t *entry, xine_config_cb_t callback, void *data, size_t data_size)
static int | _cfg_cb_rem (cfg_entry_t *entry, xine_config_cb_t callback)
static int | _cfg_d_rem (cfg_entry_t *entry, void *data, size_t data_size)
static int | _cfg_any_rem (cfg_entry_t *entry, xine_config_cb_t callback, void *data, size_t data_size)
static void | _cfg_cb_add (cfg_entry_t *entry, xine_config_cb_t callback, void *data)
static const char * | config_xlate_old (const char *s)
static int | config_section_enum (const uint8_t *s, uint32_t l)
static size_t | config_make_sort_key (char *dest, const char *key, int *klen, int exp_level)
static int | config_validate (config_values_t *this_gen)
static fat_cfg_entry_t * | config_insert (config_values_t *this_gen, const char *key, int exp_level)
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, size_t klen)
static cfg_entry_t * | config_lookup_entry_int (config_values_t *this, const char *key)
static char ** | str_array_dup (const char *const *from, uint32_t *n)
static char ** | str_array_ldup (const char *const *from, const uint32_t *len, uint32_t n)
static void | str_array_free (char **a)
static cfg_entry_t * | config_lookup_entry (config_values_t *this, const char *key)
static cfg_entry_t * | config_lookup_entry_safe (config_values_t *this, const char *key)
static char * | config_lookup_string (config_values_t *this, const char *key)
static void | config_free_string (config_values_t *this, char **str)
static int | config_lookup_num (config_values_t *this, const char *key, int def_value)
static void | config_reset_value (fat_cfg_entry_t *entry)
static void | config_shallow_copy (xine_cfg_entry_t *dest, const cfg_entry_t *src)
static void | config_new_entry (config_values_t *this, cfg_entry_t *entry)
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, const char *description, const char *help)
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 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 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_e (cfg_entry_t *entry, int value)
static void | config_update_num (config_values_t *this, const char *key, int value)
static void | config_update_string_e (cfg_entry_t *entry, const char *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)
static size_t | xine_realpath (char *buf, const char *filename, size_t bsize, int *num_links)
void | xine_config_save (xine_t *xine, const char *filename)
static void | config_dispose (config_values_t *this_gen)
static void | config_unregister_cb (config_values_t *this, const char *key)
static int | config_unregister_callbacks (config_values_t *this, const char *key, xine_config_cb_t changed_cb, void *cb_data, size_t cb_data_size)
void | _x_config_unregister_cb_class_d (config_values_t *this, void *callback_data)
void | _x_config_unregister_cb_class_p (config_values_t *this, xine_config_cb_t callback)
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 void | put_int (uint8_t **dest, int value)
static void | put_string (uint8_t **dest, const char *value, uint32_t value_len)
static char * | config_get_serialized_entry (config_values_t *this, const char *key)
static char * | config_register_serialized_entry (config_values_t *this, const char *value)
static unsigned int | _config_fat_entry_hash (void *a)
static int | _config_fat_entry_cmp (void *a, void *b)
config_values_t * | _x_config_init (void)
| allocate and init a new xine config object
int | _x_config_change_opt (config_values_t *config, const char *opt)
| interpret stream_setup part of mrls for config value changes

## Variables
static const xine_config_entry_translation_t * | config_entry_translation_user = NULL

## Macro Definition Documentation

## ◆ _CFG_BIT_HAS_CALLBACKS

#define _CFG_BIT_HAS_CALLBACKS 30

Referenced by config_get_serialized_entry(), and config_register_serialized_entry().

## ◆ _CFG_DUMMY_DATA

#define _CFG_DUMMY_DATA (void *)1

Referenced by _cfg_cb_clear(), _cfg_cb_clear_report(), _cfg_cb_d_rem(), _cfg_cb_rem(), and _cfg_d_rem().

## ◆ _MAX_CFG_KEY

#define _MAX_CFG_KEY 320

Referenced by config_lookup_entry_int(), config_translate_key(), and xine_config_load().

## ◆ FIND_ONLY

#define FIND_ONLY 0x7fffffff

Referenced by config_insert(), config_lookup_entry_int(), config_register_key(), config_register_serialized_entry(), and xine_config_load().

## ◆ get_string

#define get_string | ( |  | s,
|  |  | len )

Value:
{ \
len = _X_LE_32 (p); p[0] = 0; p += 4; \
if (len > left) \
break; \
left -= len; \
s = (char *)p; p += len; \
}
_X_LE_32
#define _X_LE_32(x)
Definition bswap.h:63

Referenced by config_register_serialized_entry().

## ◆ LOG_MODULE

#define LOG_MODULE "configfile"

Referenced by config_validate(), and xine_config_save().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ MAX_SORT_KEY

#define MAX_SORT_KEY 320

Referenced by _config_fat_entry_cmp(), and config_make_sort_key().

## ◆ PSEP

#define PSEP '/'

Referenced by xine_realpath().

## ◆ SINGLE_CHUNK_ENUMS

#define SINGLE_CHUNK_ENUMS

## ◆ STRING_BACKLOG_LD

#define STRING_BACKLOG_LD 2

<< xine_fast_string_t *

Referenced by config_insert(), config_reset_value(), and config_update_string_e().

## ◆ XCF_HAVE_BACKUP

#define XCF_HAVE_BACKUP 1

Referenced by xine_config_save().

## ◆ XCF_HAVE_FILE

#define XCF_HAVE_FILE 2

Referenced by xine_config_save().

## ◆ XCF_HAVE_ITEMS

#define XCF_HAVE_ITEMS 8

Referenced by xine_config_save().

## ◆ XCF_HAVE_TFILE

#define XCF_HAVE_TFILE 4

Referenced by xine_config_save().

## ◆ XCS_BUF_SIZE

#define XCS_BUF_SIZE 4096

Referenced by xine_config_save().

## Function Documentation

## ◆ _cfg_any_rem()

static int _cfg_any_rem | ( | cfg_entry_t * | entry,
|  | xine_config_cb_t | callback,
|  | void * | data,
|  | size_t | data_size )
| static

References _cfg_cb_clear(), _cfg_cb_d_rem(), _cfg_cb_rem(), and _cfg_d_rem().

Referenced by config_unregister_callbacks().

## ◆ _cfg_cb_add()

static void _cfg_cb_add | ( | cfg_entry_t * | entry,
|  | xine_config_cb_t | callback,
|  | void * | data )
| static

References _cfg_relay(), _cfg_cb_info_t::callback, cfg_entry_s::callback, cfg_entry_s::callback_data, _cfg_cb_info_t::data, _cfg_cb_relay_t::items, _cfg_cb_relay_t::size, and _cfg_cb_relay_t::used.

Referenced by config_register_key().

## ◆ _cfg_cb_clear()

static int _cfg_cb_clear | ( | cfg_entry_t * | entry | ) |
| static

References _CFG_DUMMY_DATA, _cfg_relay(), cfg_entry_s::callback, cfg_entry_s::callback_data, cfg_entry_s::next, NULL, and _cfg_cb_relay_t::used.

Referenced by _cfg_any_rem(), and config_unregister_cb().

## ◆ _cfg_cb_clear_report()

static int _cfg_cb_clear_report | ( | xine_t * | xine,
|  | cfg_entry_t * | entry )
| static

References _CFG_DUMMY_DATA, _cfg_relay(), cfg_entry_s::callback, cfg_entry_s::callback_data, cfg_entry_s::key, cfg_entry_s::next, NULL, _cfg_cb_relay_t::used, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by config_dispose().

## ◆ _cfg_cb_d_rem()

static int _cfg_cb_d_rem | ( | cfg_entry_t * | entry,
|  | xine_config_cb_t | callback,
|  | void * | data,
|  | size_t | data_size )
| static

References _CFG_DUMMY_DATA, _cfg_relay(), _cfg_cb_info_t::callback, cfg_entry_s::callback, cfg_entry_s::callback_data, _cfg_cb_info_t::data, _cfg_cb_relay_t::items, cfg_entry_s::next, NULL, PTR_IN_RANGE, and _cfg_cb_relay_t::used.

Referenced by _cfg_any_rem().

## ◆ _cfg_cb_rem()

static int _cfg_cb_rem | ( | cfg_entry_t * | entry,
|  | xine_config_cb_t | callback )
| static

References _CFG_DUMMY_DATA, _cfg_relay(), _cfg_cb_info_t::callback, cfg_entry_s::callback, cfg_entry_s::callback_data, _cfg_cb_info_t::data, _cfg_cb_relay_t::items, cfg_entry_s::next, NULL, and _cfg_cb_relay_t::used.

Referenced by _cfg_any_rem(), and _x_config_unregister_cb_class_p().

## ◆ _cfg_d_rem()

static int _cfg_d_rem | ( | cfg_entry_t * | entry,
|  | void * | data,
|  | size_t | data_size )
| static

References _CFG_DUMMY_DATA, _cfg_relay(), _cfg_cb_info_t::callback, cfg_entry_s::callback, cfg_entry_s::callback_data, _cfg_cb_info_t::data, _cfg_cb_relay_t::items, cfg_entry_s::next, NULL, PTR_IN_RANGE, and _cfg_cb_relay_t::used.

Referenced by _cfg_any_rem(), and _x_config_unregister_cb_class_d().

## ◆ _cfg_relay()

static void _cfg_relay | ( | void * | data,
|  | xine_cfg_entry_t * | e )
| static

References _cfg_cb_info_t::callback, _cfg_cb_info_t::data, _cfg_cb_relay_t::items, and _cfg_cb_relay_t::used.

Referenced by _cfg_cb_add(), _cfg_cb_clear(), _cfg_cb_clear_report(), _cfg_cb_d_rem(), _cfg_cb_rem(), and _cfg_d_rem().

## ◆ _config_fat_entry_cmp()

static int _config_fat_entry_cmp | ( | void * | a,
|  | void * | b )
| static

References _config_is_fat_entry(), config_make_sort_key(), fat_cfg_entry_t::entry, cfg_entry_s::exp_level, fat_cfg_entry_t::internal_key, cfg_entry_s::key, MAX_SORT_KEY, NULL, xine_fast_string_cmp(), xine_fast_string_init(), and xine_fast_string_set().

Referenced by _x_config_init().

## ◆ _config_fat_entry_hash()

static unsigned int _config_fat_entry_hash | ( | void * | a | ) |
| static

References _config_is_fat_entry(), config_section_enum(), fat_cfg_entry_t::entry, hash(), fat_cfg_entry_t::internal_key, and cfg_entry_s::key.

Referenced by _x_config_init().

## ◆ _config_is_fat_entry()

static int _config_is_fat_entry | ( | fat_cfg_entry_t * | entry | ) |
| static

References fat_cfg_entry_t::entry, fat_cfg_entry_t::magic, and cfg_entry_s::range_min.

Referenced by _config_fat_entry_cmp(), _config_fat_entry_hash(), config_reset_value(), config_update_string_e(), and config_validate().

## ◆ _config_set_fat_entry()

static void _config_set_fat_entry | ( | fat_cfg_entry_t * | entry | ) |
| static

References fat_cfg_entry_t::entry, fat_cfg_entry_t::magic, and cfg_entry_s::range_min.

Referenced by config_insert().

## ◆ _x_config_change_opt()

int _x_config_change_opt | ( | config_values_t * | config,
|  | const char * | opt )

interpret stream_setup part of mrls for config value changes

References _, config_values_s::config_lock, config_lookup_entry_safe(), config_update_string_e(), cfg_entry_s::exp_level, key, config_values_s::lookup_entry, cfg_entry_s::num_value, cfg_entry_s::type, config_values_s::xine, XINE_CONFIG_SECURITY, 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_VERBOSITY_LOG, and xprintf.

Referenced by open_internal().

## ◆ _x_config_init()

config_values_t * _x_config_init | ( | void |  | ) |

allocate and init a new xine config object

References _config_fat_entry_cmp(), _config_fat_entry_hash(), config_dispose(), config_free_string(), config_get_serialized_entry(), config_lookup_entry(), config_lookup_num(), config_lookup_string(), 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_callbacks(), config_unregister_cb(), config_unset_new_entry_callback(), config_update_num(), config_update_string(), NULL, XINE_SARRAY_MODE_UNIQUE, xine_sarray_new(), xine_sarray_set_hash(), and xine_sarray_set_mode().

Referenced by xine_new().

## ◆ _x_config_unregister_cb_class_d()

void _x_config_unregister_cb_class_d | ( | config_values_t * | config,
|  | void * | callback_data )

deprecated in favour of config_values_t->unregister_callbacks ().

References _cfg_d_rem(), and _x_assert.

## ◆ _x_config_unregister_cb_class_p()

void _x_config_unregister_cb_class_p | ( | config_values_t * | this,
|  | xine_config_cb_t | callback )

References _cfg_cb_rem(), and _x_assert.

## ◆ config_dispose()

static void config_dispose | ( | config_values_t * | this_gen | ) |
| static

References _cfg_cb_clear_report(), _x_freep(), config_reset_value(), fat_cfg_entry_t::entry, cfg_entry_s::key, lprintf, cfg_entry_s::next, NULL, cfg_entry_s::unknown_value, xine_sarray_delete(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init().

## ◆ config_free_string()

static void config_free_string | ( | config_values_t * | this,
|  | char ** | str )
| static

References _x_freep().

Referenced by _x_config_init().

## ◆ config_get_serialized_entry()

static char * config_get_serialized_entry | ( | config_values_t * | this,
|  | const char * | key )
| static

References _CFG_BIT_HAS_CALLBACKS, cfg_entry_s::callback, cfg_entry_s::callback_data, config_lookup_entry(), 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, xine_base64_encode(), xine_find_byte(), and xine_ref_string_len().

Referenced by _x_config_init().

## ◆ config_insert()

static fat_cfg_entry_t * config_insert | ( | config_values_t * | this_gen,
|  | const char * | key,
|  | int | exp_level )
| static

References _config_set_fat_entry(), very_fat_cfg_entry_t::buf, cfg_entry_s::callback, cfg_entry_s::callback_data, cfg_entry_s::config, config_make_sort_key(), config_validate(), cfg_entry_s::description, fat_cfg_entry_t::entry, very_fat_cfg_entry_t::entry, cfg_entry_s::enum_values, cfg_entry_s::exp_level, FIND_ONLY, cfg_entry_s::help, fat_cfg_entry_t::internal_key, cfg_entry_s::key, key, 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, fat_cfg_entry_t::sb_index, cfg_entry_s::str_default, cfg_entry_s::str_value, fat_cfg_entry_t::string_backlog, STRING_BACKLOG_LD, cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_UNKNOWN, xine_fast_string_init(), xine_fast_string_set(), xine_sarray_add(), xine_sarray_binary_search(), xine_sarray_get(), xine_sarray_move_location(), xine_sarray_size(), and xine_small_memcpy.

Referenced by config_lookup_entry_int(), config_register_key(), config_register_serialized_entry(), and xine_config_load().

## ◆ config_lookup_entry()

static cfg_entry_t * config_lookup_entry | ( | config_values_t * | this,
|  | const char * | key )
| static

References config_lookup_entry_int(), and key.

Referenced by _x_config_init(), config_get_serialized_entry(), and config_lookup_entry_safe().

## ◆ config_lookup_entry_int()

static cfg_entry_t * config_lookup_entry_int | ( | config_values_t * | this,
|  | const char * | key )
| static

References _MAX_CFG_KEY, config_insert(), config_translate_key(), FIND_ONLY, key, NULL, and xine_find_byte().

Referenced by config_get_serialized_entry(), config_lookup_entry(), and config_lookup_entry_safe().

## ◆ config_lookup_entry_safe()

static cfg_entry_t * config_lookup_entry_safe | ( | config_values_t * | this,
|  | const char * | key )
| static

References config_lookup_entry(), config_lookup_entry_int(), and key.

Referenced by _x_config_change_opt(), config_lookup_num(), config_lookup_string(), config_unregister_callbacks(), config_unregister_cb(), config_update_num(), and config_update_string().

## ◆ config_lookup_num()

static int config_lookup_num | ( | config_values_t * | this,
|  | const char * | key,
|  | int | def_value )
| static

References config_lookup_entry_safe(), key, cfg_entry_s::num_value, cfg_entry_s::type, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _x_config_init().

## ◆ config_lookup_string()

static char * config_lookup_string | ( | config_values_t * | this,
|  | const char * | key )
| static

References config_lookup_entry_safe(), key, NULL, cfg_entry_s::str_value, cfg_entry_s::type, XINE_CONFIG_TYPE_STRING, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _x_config_init().

## ◆ config_make_sort_key()

static size_t config_make_sort_key | ( | char * | dest,
|  | const char * | key,
|  | int * | klen,
|  | int | exp_level )
| static

References config_section_enum(), key, MAX_SORT_KEY, xine_find_byte(), and xine_small_memcpy.

Referenced by _config_fat_entry_cmp(), and config_insert().

## ◆ config_new_entry()

static void config_new_entry | ( | config_values_t * | this,
|  | cfg_entry_t * | entry )
| static

References config_shallow_copy(), and NULL.

Referenced by config_register_bool(), config_register_enum(), config_register_filename(), config_register_num(), config_register_range(), and config_register_serialized_entry().

## ◆ config_parse_enum()

static int config_parse_enum | ( | const char * | str,
|  | const char ** | values )
| static

References xine_str2int32().

Referenced by _x_config_init(), config_register_enum(), config_register_serialized_entry(), and config_update_string_e().

## ◆ config_register_bool()

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

References _x_freep(), config_new_entry(), config_register_key(), key, 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_BOOL, XINE_CONFIG_TYPE_UNKNOWN, xine_str2int32(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init(), and config_register_serialized_entry().

## ◆ config_register_enum()

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

References _x_freep(), config_new_entry(), config_parse_enum(), config_register_key(), cfg_entry_s::enum_values, key, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, str_array_dup(), str_array_free(), cfg_entry_s::type, cfg_entry_s::unknown_value, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_UNKNOWN, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init(), and config_register_serialized_entry().

## ◆ config_register_filename()

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

References config_new_entry(), config_register_key(), key, 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, XINE_CONFIG_TYPE_UNKNOWN, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init(), config_register_serialized_entry(), and config_register_string().

## ◆ config_register_key()

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,
|  | const char * | description,
|  | const char * | help )
| static

References _cfg_cb_add(), config_insert(), config_reset_value(), cfg_entry_s::description, fat_cfg_entry_t::entry, cfg_entry_s::exp_level, FIND_ONLY, cfg_entry_s::help, key, lprintf, NULL, cfg_entry_s::type, XINE_CONFIG_TYPE_UNKNOWN, and xine_ref_string_ref().

Referenced by config_register_bool(), config_register_enum(), config_register_filename(), config_register_num(), and config_register_range().

## ◆ config_register_num()

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

References _x_freep(), config_new_entry(), config_register_key(), key, 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_NUM, XINE_CONFIG_TYPE_UNKNOWN, xine_str2int32(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init(), and config_register_serialized_entry().

## ◆ config_register_range()

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

References _x_freep(), config_new_entry(), config_register_key(), key, 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, XINE_CONFIG_TYPE_UNKNOWN, xine_str2int32(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init(), and config_register_serialized_entry().

## ◆ config_register_serialized_entry()

static char * config_register_serialized_entry | ( | config_values_t * | this,
|  | const char * | value )
| static

References _CFG_BIT_HAS_CALLBACKS, _x_freep(), _X_LE_32, cfg_entry_s::callback, cfg_entry_s::callback_data, config_insert(), config_new_entry(), config_parse_enum(), config_register_bool(), config_register_enum(), config_register_filename(), config_register_num(), config_register_range(), config_register_string(), cfg_entry_s::description, fat_cfg_entry_t::entry, cfg_entry_s::enum_values, cfg_entry_s::exp_level, FIND_ONLY, get_string, cfg_entry_s::help, key, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, str_array_ldup(), cfg_entry_s::str_default, cfg_entry_s::str_value, cfg_entry_s::type, type, cfg_entry_s::unknown_value, xine_base64_decode(), 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_ref_string_ref(), xine_small_memcpy, xine_str2int32(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init().

## ◆ config_register_string()

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

References config_register_filename(), and key.

Referenced by _x_config_init(), and config_register_serialized_entry().

## ◆ config_reset_value()

static void config_reset_value | ( | fat_cfg_entry_t * | entry | ) |
| static

References _config_is_fat_entry(), cfg_entry_s::description, fat_cfg_entry_t::entry, cfg_entry_s::enum_values, cfg_entry_s::help, NULL, cfg_entry_s::num_value, str_array_free(), cfg_entry_s::str_default, cfg_entry_s::str_value, fat_cfg_entry_t::string_backlog, STRING_BACKLOG_LD, and xine_ref_string_unref().

Referenced by config_dispose(), and config_register_key().

## ◆ config_section_enum()

static int config_section_enum | ( | const uint8_t * | s,
|  | uint32_t | l )
| static

Referenced by _config_fat_entry_hash(), and config_make_sort_key().

## ◆ config_set_new_entry_callback()

static void config_set_new_entry_callback | ( | config_values_t * | this,
|  | xine_config_cb_t | new_entry_cb,
|  | void * | cbdata )
| static

Referenced by _x_config_init().

## ◆ config_shallow_copy()

static void config_shallow_copy | ( | xine_cfg_entry_t * | dest,
|  | const cfg_entry_t * | src )
| 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_new_entry(), config_update_num_e(), and config_update_string_e().

## ◆ config_translate_key()

static const char * config_translate_key | ( | const char * | key,
|  | char * | tmp,
|  | size_t | klen )
| static

References _MAX_CFG_KEY, config_entry_translation_user, config_xlate_internal(), config_xlate_old(), key, and xine_small_memcpy.

Referenced by config_lookup_entry_int(), and xine_config_load().

## ◆ config_unregister_callbacks()

static int config_unregister_callbacks | ( | config_values_t * | this,
|  | const char * | key,
|  | xine_config_cb_t | changed_cb,
|  | void * | cb_data,
|  | size_t | cb_data_size )
| static

References _cfg_any_rem(), config_lookup_entry_safe(), key, cfg_entry_s::next, and NULL.

Referenced by _x_config_init().

## ◆ config_unregister_cb()

static void config_unregister_cb | ( | config_values_t * | this,
|  | const char * | key )
| static

References _cfg_cb_clear(), _x_assert, config_lookup_entry_safe(), key, cfg_entry_s::next, and NULL.

Referenced by _x_config_init().

## ◆ config_unset_new_entry_callback()

static void config_unset_new_entry_callback | ( | config_values_t * | this | ) |
| static

References NULL.

Referenced by _x_config_init().

## ◆ config_update_num()

static void config_update_num | ( | config_values_t * | this,
|  | const char * | key,
|  | int | value )
| static

References config_lookup_entry_safe(), config_update_num_e(), cfg_entry_s::key, key, lprintf, cfg_entry_s::type, XINE_CONFIG_TYPE_STRING, XINE_CONFIG_TYPE_UNKNOWN, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init().

## ◆ config_update_num_e()

static void config_update_num_e | ( | cfg_entry_t * | entry,
|  | int | value )
| static

References cfg_entry_s::callback, cfg_entry_s::callback_data, config_shallow_copy(), cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, cfg_entry_s::type, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, and XINE_CONFIG_TYPE_RANGE.

Referenced by config_update_num().

## ◆ config_update_string()

static void config_update_string | ( | config_values_t * | this,
|  | const char * | key,
|  | const char * | value )
| static

References config_lookup_entry_safe(), config_update_string_e(), key, lprintf, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _x_config_init().

## ◆ config_update_string_e()

static void config_update_string_e | ( | cfg_entry_t * | entry,
|  | const char * | value )
| static

References _config_is_fat_entry(), cfg_entry_s::callback, cfg_entry_s::callback_data, config_parse_enum(), config_shallow_copy(), fat_cfg_entry_t::entry, cfg_entry_s::enum_values, NULL, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, fat_cfg_entry_t::sb_index, cfg_entry_s::str_value, fat_cfg_entry_t::string_backlog, STRING_BACKLOG_LD, cfg_entry_s::type, cfg_entry_s::unknown_value, v, XINE_CONFIG_TYPE_BOOL, XINE_CONFIG_TYPE_ENUM, XINE_CONFIG_TYPE_NUM, XINE_CONFIG_TYPE_RANGE, XINE_CONFIG_TYPE_STRING, and xine_str2int32().

Referenced by _x_config_change_opt(), config_update_string(), and xine_config_load().

## ◆ config_validate()

static int config_validate | ( | config_values_t * | this_gen | ) |
| static

References _config_is_fat_entry(), fat_cfg_entry_t::entry, cfg_entry_s::key, LOG_MODULE, cfg_entry_s::next, xine_sarray_add(), xine_sarray_get(), xine_sarray_size(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by config_insert().

## ◆ config_xlate_internal()

static const char * config_xlate_internal | ( | const char * | key,
|  | const xine_config_entry_translation_t * | trans )
| static

References key, xine_config_entry_translation_t::new_name, NULL, and xine_config_entry_translation_t::old_name.

Referenced by config_translate_key().

## ◆ config_xlate_old()

static const char * config_xlate_old | ( | const char * | s | ) |
| static

References NULL.

Referenced by config_translate_key().

## ◆ put_int()

static void put_int | ( | uint8_t ** | dest,
|  | int | value )
| static

Referenced by config_get_serialized_entry(), and put_string().

## ◆ put_string()

static void put_string | ( | uint8_t ** | dest,
|  | const char * | value,
|  | uint32_t | value_len )
| static

References put_int().

Referenced by config_get_serialized_entry().

## ◆ str_array_dup()

static char ** str_array_dup | ( | const char *const * | from,
|  | uint32_t * | n )
| static

References NULL, xine_find_byte(), and xine_small_memcpy.

Referenced by config_register_enum(), and str_array_ldup().

## ◆ str_array_free()

static void str_array_free | ( | char ** | a | ) |
| static

Referenced by config_register_enum(), and config_reset_value().

## ◆ str_array_ldup()

static char ** str_array_ldup | ( | const char *const * | from,
|  | const uint32_t * | len,
|  | uint32_t | n )
| static

References NULL, str_array_dup(), and xine_small_memcpy.

Referenced by config_register_serialized_entry().

## ◆ xine_config_load()

void xine_config_load | ( | xine_t * | xine,
|  | const char * | filename )

References _, _MAX_CFG_KEY, xine_s::config, CONFIG_FILE_VERSION, config_insert(), config_translate_key(), config_update_string_e(), FIND_ONLY, key, lprintf, xine_fast_text_line(), xine_fast_text_load(), xine_fast_text_unload(), xine_find_byte(), xine_log(), XINE_LOG_MSG, and xine_str2int32().

## ◆ xine_config_save()

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, LOG_MODULE, lprintf, cfg_entry_s::next, cfg_entry_s::num_default, cfg_entry_s::num_value, cfg_entry_s::range_max, cfg_entry_s::range_min, S_ISREG, cfg_entry_s::str_default, cfg_entry_s::str_value, cfg_entry_s::type, cfg_entry_s::unknown_value, XCF_HAVE_BACKUP, XCF_HAVE_FILE, XCF_HAVE_ITEMS, XCF_HAVE_TFILE, XCS_BUF_SIZE, 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_fast_memcpy, xine_int32_2str(), XINE_MAX_INT32_STR, xine_realpath(), xine_uint32_2str(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

## ◆ xine_config_set_translation_user()

void xine_config_set_translation_user | ( | const xine_config_entry_translation_t * | xlate | ) |

References config_entry_translation_user.

## ◆ xine_realpath()

static size_t xine_realpath | ( | char * | buf,
|  | const char * | filename,
|  | size_t | bsize,
|  | int * | num_links )
| static

References PSEP, S_ISLNK, and xine_small_memcpy.

Referenced by xine_config_save().

## Variable Documentation

## ◆ config_entry_translation_user

const xine_config_entry_translation_t* config_entry_translation_user = NULL
| static

Referenced by config_translate_key(), and xine_config_set_translation_user().