VLC
4.0.0-dev
|
Go to the source code of this file.
Macros | |
#define | config_LoadCmdLine(a, b, c, d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d) |
#define | config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a)) |
#define | CONFIG_CLASS(x) ((x) & ~0x1F) |
#define | IsConfigStringType(type) (((type) & CONFIG_ITEM_STRING) != 0) |
#define | IsConfigIntegerType(type) (((type) & CONFIG_ITEM_INTEGER) != 0) |
#define | IsConfigFloatType(type) ((type) == CONFIG_ITEM_FLOAT) |
#define | CONFIG_FILE "vlcrc" |
Functions | |
int | config_CreateDir (vlc_object_t *, const char *) |
int | config_AutoSaveConfigFile (vlc_object_t *) |
void | config_Free (module_config_t *, size_t) |
Destroys an array of configuration items. More... | |
int | config_LoadCmdLine (vlc_object_t *, int, const char *[], int *) |
Parse command line for configuration options. More... | |
int | config_LoadConfigFile (vlc_object_t *) |
bool | config_PrintHelp (vlc_object_t *) |
Checks for help command line options such as –help or –version. More... | |
int | config_SortConfig (void) |
Index the configuration items by name for faster lookups. More... | |
void | config_UnsortConfig (void) |
bool | config_IsSafe (const char *) |
char * | config_GetLibDir (void) VLC_USED VLC_MALLOC |
Gets the arch-specific installation directory. More... | |
Variables | |
vlc_rwlock_t | config_lock |
bool | config_dirty |
#define CONFIG_CLASS | ( | x | ) | ((x) & ~0x1F) |
Referenced by config_ChainParse(), config_GetType(), config_LoadCmdLine(), config_LoadConfigFile(), config_SaveConfigFile(), and print_item().
#define CONFIG_FILE "vlcrc" |
Referenced by config_GetConfigFile(), and config_OpenConfigFile().
#define config_LoadCmdLine | ( | a, | |
b, | |||
c, | |||
d | |||
) | config_LoadCmdLine(VLC_OBJECT(a),b,c,d) |
Referenced by libvlc_InternalInit().
#define config_LoadConfigFile | ( | a | ) | config_LoadConfigFile(VLC_OBJECT(a)) |
Referenced by libvlc_InternalInit().
#define IsConfigFloatType | ( | type | ) | ((type) == CONFIG_ITEM_FLOAT) |
Referenced by config_GetFloat(), config_PutFloat(), config_ResetAll(), config_SaveConfigFile(), vlc_config_create(), and vlc_plugin_desc_cb().
#define IsConfigIntegerType | ( | type | ) | (((type) & CONFIG_ITEM_INTEGER) != 0) |
Referenced by config_GetInt(), config_PutInt(), config_ResetAll(), config_SaveConfigFile(), vlc_config_create(), and vlc_plugin_desc_cb().
#define IsConfigStringType | ( | type | ) | (((type) & CONFIG_ITEM_STRING) != 0) |
int config_AutoSaveConfigFile | ( | vlc_object_t * | ) |
References config_dirty, config_lock, config_SaveConfigFile(), vlc_rwlock_rdlock(), and vlc_rwlock_unlock().
Referenced by libvlc_InternalCleanup().
int config_CreateDir | ( | vlc_object_t * | , |
const char * | |||
) |
References DIR_SEP_CHAR, msg_Warn, VLC_FORMAT, vlc_mkdir(), and vlc_strerror_c().
Referenced by config_PrepareDir().
void config_Free | ( | module_config_t * | tab, |
size_t | confsize | ||
) |
Destroys an array of configuration items.
config | start of array of items |
confsize | number of items in the array |
References module_config_t::i_type, IsConfigStringType, module_config_t::list, module_config_t::list_count, module_config_t::list_text, module_value_t::psz, module_config_t::psz, and module_config_t::value.
Referenced by vlc_plugin_destroy().
char* config_GetLibDir | ( | void | ) |
Gets the arch-specific installation directory.
This function determines the directory containing the architecture-specific installed asset files (such as executable plugins and compiled byte code).
Gets the arch-specific installation directory.
References cached_path, config_GetLibDir(), config_GetLibDirOnce(), config_getLibraryDirReal(), config_GetRealDir(), FromLocaleDup, getenv(), and strdup().
Referenced by config_GetDataDir(), config_GetHomeDir(), config_GetLibDir(), config_GetLibDirRaw(), and config_GetSysPath().
bool config_IsSafe | ( | const char * | ) |
References module_config_t::b_safe, and config_FindConfig().
Referenced by var_OptionParse().
int config_LoadCmdLine | ( | vlc_object_t * | p_this, |
int | i_argc, | ||
const char * | ppsz_argv[], | ||
int * | pindex | ||
) |
Parse command line for configuration options.
Now that the module_bank has been initialized, we can dynamically generate the longopts structure used by getops. We have to do it this way because we don't know (and don't want to know) in advance the configuration options used (ie. exported) by each module.
p_this | object to write command line options as variables to |
i_argc | number of command line arguments |
ppsz_args | commandl ine arguments [IN/OUT] |
pindex | NULL to ignore unknown options, otherwise index of the first non-option argument [OUT] |
References vlc_getopt_s::arg, asprintf(), b_ignore_errors, module_config_t::b_removed, CONFIG_CLASS, config_FindConfig(), CONFIG_ITEM, CONFIG_ITEM_BOOL, CONFIG_ITEM_FLOAT, CONFIG_ITEM_INTEGER, CONFIG_ITEM_STRING, module_value_t::f, vlc_option::flag, vlc_option::has_arg, module_value_t::i, input_clock_t::i_index, module_config_t::i_short, module_config_t::i_type, i_type, vlc_getopt_s::ind, module_config_t::max, module_config_t::min, vlc_option::name, name, vlc_getopt_s::opt, p, psz_name, module_config_t::psz_name, state, strdup(), strtoll(), us_atof(), vlc_option::val, var_Change(), var_Create(), var_SetBool(), var_SetFloat(), var_SetInteger(), var_SetString(), vlc_alloc(), vlc_getopt_long(), vlc_plugins, VLC_VAR_BOOL, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_SETMINMAX, and VLC_VAR_STRING.
int config_LoadConfigFile | ( | vlc_object_t * | ) |
References atof(), module_config_t::b_removed, module_config_t::b_unsaveable, CONFIG_CLASS, config_FindConfig(), CONFIG_ITEM_BOOL, CONFIG_ITEM_FLOAT, CONFIG_ITEM_INTEGER, config_lock, config_OpenConfigFile(), module_value_t::f, freelocale(), getline(), module_value_t::i, module_config_t::i_type, LC_NUMERIC_MASK, module_config_t::max, msg_Err, msg_Warn, newlocale(), module_value_t::psz, rewind(), strdupnull(), uselocale(), module_config_t::value, VLC_EGENERIC, vlc_rwlock_unlock(), vlc_rwlock_wrlock(), vlc_strerror_c(), and vlc_strtoi().
bool config_PrintHelp | ( | vlc_object_t * | obj | ) |
Checks for help command line options such as –help or –version.
If one is found, print the corresponding text.
References Help(), ListModules(), var_Create(), var_InheritBool(), var_InheritString(), var_SetBool(), Version(), and VLC_VAR_BOOL.
Referenced by libvlc_InternalInit().
int config_SortConfig | ( | void | ) |
Index the configuration items by name for faster lookups.
References vlc_plugin_t::conf, confcmp(), config, CONFIG_ITEM, module_config_t::i_type, vlc_plugin_t::items, vlc_plugin_t::next, p, vlc_plugin_t::size, unlikely, vlc_alloc(), VLC_ENOMEM, vlc_plugins, and VLC_SUCCESS.
Referenced by module_InitBank(), and module_LoadPlugins().
void config_UnsortConfig | ( | void | ) |
References config.
Referenced by module_EndBank(), and module_LoadPlugins().
bool config_dirty |
Referenced by config_AutoSaveConfigFile(), config_PutFloat(), config_PutInt(), and config_PutPsz().
vlc_rwlock_t config_lock |
Referenced by config_AutoSaveConfigFile(), config_LoadConfigFile(), and config_SaveConfigFile().