Go to the documentation of this file.
21 #ifndef LIBVLC_CONFIGURATION_H
22 # define LIBVLC_CONFIGURATION_H 1
36 #define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
37 #define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a))
43 #define CONFIG_CLASS(x) ((x) & ~0x1F)
45 #define IsConfigStringType(type) \
46 (((type) & CONFIG_ITEM_STRING) != 0)
47 #define IsConfigIntegerType(type) \
48 (((type) & CONFIG_ITEM_INTEGER) != 0)
49 #define IsConfigFloatType(type) \
50 ((type) == CONFIG_ITEM_FLOAT)
68 #define CONFIG_FILE "vlcrc"
const char * psz_name
Option name.
Definition: vlc_configuration.h:86
char * config_GetLibDir(void) VLC_USED VLC_MALLOC
Gets the arch-specific installation directory.
Definition: dirs.m:91
const char * name
Definition: vlc_getopt.h:93
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
static bool IsEscapeNeeded(char c)
Definition: chain.c:44
config_chain_t * p_next
Pointer on the next config_chain_t element.
Definition: vlc_configuration.h:335
module_config_t * config_FindConfig(const char *name)
Looks up a configuration item.
Definition: core.c:452
const char * psz_name
Definition: text_style.c:53
int config_LoadCmdLine(vlc_object_t *p_this, int i_argc, const char *ppsz_argv[], int *pindex)
Parse command line for configuration options.
Definition: cmdline.c:57
int vlc_getopt_long(int argc, char *const *argv, const char *optstring, const struct vlc_option *restrict longopts, int *longind, vlc_getopt_t *restrict state)
Definition: getopt.c:146
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
#define CONFIG_ITEM_FLOAT
Definition: vlc_plugin.h:120
#define CONFIG_ITEM_STRING
Definition: vlc_plugin.h:124
#define VLC_VAR_DOINHERIT
Creation flag.
Definition: vlc_variables.h:69
VLC plugin.
Definition: modules.h:29
Read/write lock.
Definition: vlc_threads.h:532
#define config_LoadCmdLine(a, b, c, d)
Definition: configuration.h:36
#define VLC_VAR_BOOL
Definition: vlc_variables.h:49
char * psz_name
Option name.
Definition: vlc_configuration.h:337
#define VLC_MALLOC
Heap allocated result function annotation.
Definition: vlc_common.h:167
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
bool has_arg
Definition: vlc_getopt.h:94
#define CONFIG_CLASS(x)
Definition: configuration.h:43
static const char * ChainGetEnd(const char *psz_string)
This function will return a pointer after the end of a string element.
Definition: chain.c:70
#define VLC_VAR_INTEGER
Definition: vlc_variables.h:50
#define VLC_VAR_STRING
Definition: vlc_variables.h:51
#define VLC_VAR_FLOAT
Definition: vlc_variables.h:52
int val
Definition: vlc_getopt.h:96
bool config_IsSafe(const char *)
Definition: core.c:73
int asprintf(char **, const char *,...)
bool config_dirty
Definition: core.c:41
int() var_Change(vlc_object_t *p_this, const char *psz_name, int i_action,...)
Performs a special action on a variable.
Definition: variables.c:423
int config_GetType(const char *psz_name)
Gets a configuration item type.
Definition: core.c:48
int64_t i_int
Definition: vlc_common.h:459
int() var_Get(vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val)
Gets a variable value.
Definition: variables.c:755
char * strndup(const char *, size_t)
#define VLC_VAR_SETMINMAX
Definition: vlc_variables.h:102
static bool IsSpace(char c)
Definition: chain.c:54
config_chain_t * config_ChainDuplicate(const config_chain_t *p_src)
This function will duplicate a linked list of config_chain_t.
Definition: chain.c:435
int config_SortConfig(void)
Index the configuration items by name for faster lookups.
Definition: core.c:407
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
bool b_bool
Definition: vlc_common.h:460
static int var_SetString(vlc_object_t *p_obj, const char *psz_name, const char *psz_string)
Set the value of a string variable.
Definition: vlc_variables.h:345
double us_atof(const char *str)
us_atof() has the same prototype as ANSI C atof() but it expects a dot as decimal separator,...
Definition: charset.c:88
Definition: vlc_configuration.h:331
int i_type
Definition: httpd.c:1269
vlc_plugin_t * vlc_plugins
List of all plug-ins.
Definition: bank.c:102
int config_AutoSaveConfigFile(vlc_object_t *)
Definition: file.c:528
module_value_t max
Maximum value (for scalars only)
Definition: vlc_configuration.h:93
float f_float
Definition: vlc_common.h:461
void config_ChainParse(vlc_object_t *p_this, const char *psz_prefix, const char *const *ppsz_options, const config_chain_t *cfg)
This function will.
Definition: chain.c:270
char * config_StringEscape(const char *str)
This function will escape a string that can be unescaped by config_StringUnescape.
Definition: chain.c:473
static char * ChainGetValue(const char **ppsz_string)
It will extract an option value (=...
Definition: chain.c:118
#define SKIPTRAILINGSPACE(p, e)
Definition: chain.c:60
char * config_StringUnescape(char *psz_string)
This function will unescape a string in place and will return a pointer on the given string.
Definition: chain.c:455
char * psz_value
Option value.
Definition: vlc_configuration.h:338
void config_Free(module_config_t *, size_t)
Destroys an array of configuration items.
Definition: core.c:467
#define CONFIG_ITEM_INTEGER
Definition: vlc_plugin.h:121
static int var_SetBool(vlc_object_t *p_obj, const char *psz_name, bool b)
Set the value of an boolean variable.
Definition: vlc_variables.h:308
Definition: vlc_getopt.h:91
char * psz_string
Definition: vlc_common.h:462
#define CONFIG_ITEM_BOOL
Definition: vlc_plugin.h:123
void config_UnsortConfig(void)
Definition: core.c:441
VLC object common members.
Definition: vlc_objects.h:43
char * config_ChainCreate(char **ppsz_name, config_chain_t **pp_cfg, const char *psz_chain)
This function will parse a configuration string (psz_string) and.
Definition: chain.c:225
Configuration item.
Definition: vlc_configuration.h:76
unsigned b_removed
Obsolete.
Definition: vlc_configuration.h:83
void config_ChainDestroy(config_chain_t *p_cfg)
This function will release a linked list of config_chain_t (Including the head)
Definition: chain.c:253
static int var_SetFloat(vlc_object_t *p_obj, const char *psz_name, float f)
Set the value of a float variable.
Definition: vlc_variables.h:331
char * strdup(const char *)
module_value_t min
Minimum value (for scalars only)
Definition: vlc_configuration.h:92
#define VLC_USED
Definition: fourcc_gen.c:32
char psz_value[8]
Definition: vout_intf.c:99
#define SKIPSPACE(p)
Definition: chain.c:59
const char name[16]
Definition: httpd.c:1268
bool config_PrintHelp(vlc_object_t *)
Checks for help command line options such as –help or –version.
Definition: help.c:95
int64_t i
Definition: vlc_configuration.h:63
static int var_SetInteger(vlc_object_t *p_obj, const char *psz_name, int64_t i)
Set the value of an integer variable.
Definition: vlc_variables.h:293
float f
Definition: vlc_configuration.h:64
vlc_rwlock_t config_lock
Definition: core.c:40
long long int strtoll(const char *, char **, int)
uint8_t i_type
Configuration type.
Definition: vlc_configuration.h:78
int() var_Set(vlc_object_t *p_this, const char *psz_name, vlc_value_t val)
Sets a variable value.
Definition: variables.c:721
char i_short
Optional short option name.
Definition: vlc_configuration.h:79
const char * config_ChainParseOptions(config_chain_t **pp_cfg, const char *psz_opts)
This function will parse a configuration string (psz_opts) and.
Definition: chain.c:180
static bool IsEscape(const char *psz)
Definition: chain.c:48
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
static thread_local struct @76 state
Definition: vlc_getopt.h:25
#define config_LoadConfigFile(a)
Definition: configuration.h:37
int * flag
Definition: vlc_getopt.h:95
VLC value structure.
Definition: vlc_common.h:457
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
#define CONFIG_ITEM(x)
Definition: vlc_plugin.h:136