xine-lib  1.2.9
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/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_tconfig_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_tconfig_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_tconfig_register_key (config_values_t *this, const char *key, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
 
static cfg_entry_tconfig_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_tconfig_entry_translation_user = NULL
 
static const xine_config_entry_translation_t config_entry_translation []
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "configfile"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Function Documentation

◆ _x_config_change_opt()

int _x_config_change_opt ( config_values_t config,
const char *  opt 
)

◆ _x_config_init()

config_values_t* _x_config_init ( void  )

◆ _x_config_unregister_cb_class_d()

void _x_config_unregister_cb_class_d ( config_values_t this,
void *  callback_data 
)

◆ config_add()

static cfg_entry_t* config_add ( config_values_t this,
const char *  key,
int  exp_level 
)
static

◆ config_dispose()

static void config_dispose ( config_values_t this)
static

◆ config_get_serialized_entry()

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

◆ config_insert()

static void config_insert ( config_values_t this,
cfg_entry_t new_entry 
)
static

◆ config_key_split()

static void config_key_split ( const char *  key,
char **  base,
char **  section,
char **  subsect,
char **  name 
)
static

References key, name, and NULL.

Referenced by config_insert().

◆ config_lookup_entry()

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

◆ config_lookup_entry_int()

static void config_lookup_entry_int ( config_values_t this,
const char *  key,
cfg_entry_t **  entry,
cfg_entry_t **  prev 
)
static

◆ config_parse_enum()

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

◆ 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

◆ 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

◆ 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

◆ 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 
)
static

◆ 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

◆ 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

◆ config_register_serialized_entry()

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

◆ 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

◆ config_register_string_internal()

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

◆ config_remove()

static void config_remove ( config_values_t this,
cfg_entry_t entry,
cfg_entry_t prev 
)
static

References cfg_entry_s::next.

Referenced by config_register_key().

◆ config_reset_value()

static void config_reset_value ( cfg_entry_t entry)
static

◆ config_section_enum()

static int config_section_enum ( const char *  sect)
static

References NULL.

Referenced by config_insert().

◆ 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

◆ config_translate_key()

static const char* config_translate_key ( const char *  key,
char **  tmp 
)
static

◆ config_unregister_cb()

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

◆ 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

◆ config_update_string()

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

◆ config_xlate_internal()

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

◆ get_int()

static size_t get_int ( uint8_t *  buffer,
size_t  buffer_size,
size_t  pos,
int *  value 
)
static

References _X_LE_32.

Referenced by config_register_serialized_entry(), and get_string().

◆ get_string()

static size_t get_string ( uint8_t *  buffer,
int  buffer_size,
size_t  pos,
char **  value 
)
static

References get_int(), and NULL.

Referenced by config_register_serialized_entry().

◆ put_int()

static int put_int ( uint8_t *  buffer,
int  pos,
int  value 
)
static

◆ put_string()

static int put_string ( uint8_t *  buffer,
int  pos,
const char *  value,
int  value_len 
)
static

References put_int().

Referenced by config_get_serialized_entry().

◆ xine_config_load()

void xine_config_load ( xine_t xine,
const char *  filename 
)

◆ xine_config_save()

void xine_config_save ( xine_t xine,
const char *  filename 
)

◆ xine_config_set_translation_user()

void xine_config_set_translation_user ( const xine_config_entry_translation_t xlate)

Variable Documentation

◆ config_entry_translation

const xine_config_entry_translation_t config_entry_translation[]
static

Referenced by config_translate_key().

◆ config_entry_translation_user

const xine_config_entry_translation_t* config_entry_translation_user = NULL
static