config.c File Reference

#include <glib.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/hook.h>
#include "main.h"
#include "misc.h"

Go to the source code of this file.

Defines

#define DEFAULT_SECTION   "audacious"

Functions

static void str_unref_cb (void *str)
void config_load (void)
void config_save (void)
void config_cleanup (void)
void config_clear_section (const char *section)
void config_set_defaults (const char *section, const char *const *entries)
static const char * get_default (const char *section, const char *name)
void set_string (const char *section, const char *name, const char *value)
char * get_string (const char *section, const char *name)
void set_bool (const char *section, const char *name, bool_t value)
bool_t get_bool (const char *section, const char *name)
void set_int (const char *section, const char *name, int value)
int get_int (const char *section, const char *name)
void set_double (const char *section, const char *name, double value)
double get_double (const char *section, const char *name)

Variables

static const char *const core_defaults []
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER
static GHashTable * defaults
static GKeyFile * keyfile
static bool_t modified

Define Documentation

#define DEFAULT_SECTION   "audacious"

Definition at line 33 of file config.c.

Referenced by config_clear_section(), config_set_defaults(), get_string(), and set_string().


Function Documentation

void config_cleanup ( void   ) 

Definition at line 157 of file config.c.

Referenced by shut_down().

void config_clear_section ( const char *  section  ) 

Definition at line 170 of file config.c.

Referenced by history_save().

void config_load ( void   ) 

Definition at line 102 of file config.c.

Referenced by init_two().

void config_save ( void   ) 

Definition at line 129 of file config.c.

Referenced by do_autosave(), and shut_down().

void config_set_defaults ( const char *  section,
const char *const *  entries 
)

Definition at line 187 of file config.c.

Referenced by config_load().

bool_t get_bool ( const char *  section,
const char *  name 
)
static const char* get_default ( const char *  section,
const char *  name 
) [static]

Definition at line 215 of file config.c.

Referenced by get_string(), and set_string().

double get_double ( const char *  section,
const char *  name 
)
int get_int ( const char *  section,
const char *  name 
)
char* get_string ( const char *  section,
const char *  name 
)
void set_bool ( const char *  section,
const char *  name,
bool_t  value 
)
void set_double ( const char *  section,
const char *  name,
double  value 
)

Definition at line 320 of file config.c.

Referenced by audacious_rc_set_eq(), audacious_rc_set_eq_preamp(), and widget_set_double().

void set_int ( const char *  section,
const char *  name,
int  value 
)

Definition at line 303 of file config.c.

Referenced by on_filepopup_ok_clicked(), output_set_volume(), and widget_set_int().

void set_string ( const char *  section,
const char *  name,
const char *  value 
)
static void str_unref_cb ( void *  str  )  [static]

Definition at line 97 of file config.c.

Referenced by config_set_defaults().


Variable Documentation

const char* const core_defaults[] [static]

Definition at line 35 of file config.c.

Referenced by config_load().

GHashTable* defaults [static]
GKeyFile* keyfile [static]
bool_t modified [static]
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER [static]

Generated on 3 Feb 2012 for Audacious by  doxygen 1.6.1