VLC  3.0.15
Macros | Functions | Variables
configuration.h File Reference

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 *)
 

Variables

vlc_rwlock_t config_lock
 
bool config_dirty
 

Macro Definition Documentation

◆ CONFIG_CLASS

#define CONFIG_CLASS (   x)    ((x) & ~0x1F)

◆ CONFIG_FILE

#define CONFIG_FILE   "vlcrc"

◆ config_LoadCmdLine

#define config_LoadCmdLine (   a,
  b,
  c,
 
)    config_LoadCmdLine(VLC_OBJECT(a),b,c,d)

◆ config_LoadConfigFile

#define config_LoadConfigFile (   a)    config_LoadConfigFile(VLC_OBJECT(a))

◆ IsConfigFloatType

#define IsConfigFloatType (   type)    ((type) == CONFIG_ITEM_FLOAT)

◆ IsConfigIntegerType

#define IsConfigIntegerType (   type)    (((type) & CONFIG_ITEM_INTEGER) != 0)

◆ IsConfigStringType

#define IsConfigStringType (   type)    (((type) & CONFIG_ITEM_STRING) != 0)

Function Documentation

◆ config_AutoSaveConfigFile()

int config_AutoSaveConfigFile ( vlc_object_t )

Referenced by libvlc_InternalCleanup().

◆ config_CreateDir()

int config_CreateDir ( vlc_object_t ,
const char *   
)

◆ config_Free()

void config_Free ( module_config_t tab,
size_t  confsize 
)

Destroys an array of configuration items.

Parameters
configstart of array of items
confsizenumber of items in the array

Referenced by vlc_plugin_destroy().

◆ config_IsSafe()

bool config_IsSafe ( const char *  )

Referenced by var_OptionParse().

◆ config_LoadCmdLine()

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.

Parameters
p_thisobject to write command line options as variables to
i_argcnumber of command line arguments
ppsz_argscommandl ine arguments [IN/OUT]
pindexNULL to ignore unknown options, otherwise index of the first non-option argument [OUT]
Returns
0 on success, -1 on error.

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, 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, module_config_t::psz_name, psz_name, 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.

◆ config_LoadConfigFile()

int config_LoadConfigFile ( vlc_object_t )

◆ config_PrintHelp()

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.

Returns
true if a command line options caused some help message to be printed, false otherwise.

References Help(), ListModules(), var_Create, var_InheritBool, var_InheritString, var_SetBool, Version(), and VLC_VAR_BOOL.

Referenced by libvlc_InternalInit().

◆ config_SortConfig()

int config_SortConfig ( void  )

Index the configuration items by name for faster lookups.

< Not enough memory

< No error

References count, and list.

Referenced by module_InitBank(), and module_LoadPlugins().

◆ config_UnsortConfig()

void config_UnsortConfig ( void  )

Variable Documentation

◆ config_dirty

bool config_dirty

◆ config_lock

vlc_rwlock_t config_lock