
Data Structures | |
| struct | callback_entry_t |
Functions | |
| static int | CmpBool (vlc_value_t v, vlc_value_t w) |
| static int | CmpInt (vlc_value_t v, vlc_value_t w) |
| static int | CmpTime (vlc_value_t v, vlc_value_t w) |
| static int | CmpString (vlc_value_t v, vlc_value_t w) |
| static int | CmpFloat (vlc_value_t v, vlc_value_t w) |
| static int | CmpAddress (vlc_value_t v, vlc_value_t w) |
| static void | DupDummy (vlc_value_t *p_val) |
| static void | DupString (vlc_value_t *p_val) |
| static void | DupList (vlc_value_t *p_val) |
| static void | FreeDummy (vlc_value_t *p_val) |
| static void | FreeString (vlc_value_t *p_val) |
| static void | FreeMutex (vlc_value_t *p_val) |
| static void | FreeList (vlc_value_t *p_val) |
| static void | WaitUnused (vlc_object_t *p_this, variable_t *p_var) |
| Waits until the variable is inactive (i.e. | |
| static void | CheckValue (variable_t *, vlc_value_t *) |
| static int | TriggerCallback (vlc_object_t *, variable_t *, const char *, vlc_value_t) |
| static int | varcmp (const void *a, const void *b) |
| static variable_t * | Lookup (vlc_object_t *obj, const char *psz_name) |
| static void | Destroy (variable_t *p_var) |
| int | var_Create (vlc_object_t *p_this, const char *psz_name, int i_type) |
| Initialize a vlc variable. | |
| int | var_Destroy (vlc_object_t *p_this, const char *psz_name) |
| Destroy a vlc variable. | |
| static void | CleanupVar (void *var) |
| void | var_DestroyAll (vlc_object_t *obj) |
| int | var_Change (vlc_object_t *p_this, const char *psz_name, int i_action, vlc_value_t *p_val, vlc_value_t *p_val2) |
| Perform an action on a variable. | |
| int | var_GetAndSet (vlc_object_t *p_this, const char *psz_name, int i_action, vlc_value_t *p_val) |
| Perform a Get and Set on a variable. | |
| int | var_Type (vlc_object_t *p_this, const char *psz_name) |
| Request a variable's type. | |
| int | var_SetChecked (vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t val) |
| int | var_Set (vlc_object_t *p_this, const char *psz_name, vlc_value_t val) |
| Set a variable's value. | |
| int | var_GetChecked (vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t *p_val) |
| int | var_Get (vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val) |
| Get a variable's value. | |
| int | var_AddCallback (vlc_object_t *p_this, const char *psz_name, vlc_callback_t pf_callback, void *p_data) |
| Register a callback in a variable. | |
| int | var_DelCallback (vlc_object_t *p_this, const char *psz_name, vlc_callback_t pf_callback, void *p_data) |
| Remove a callback from a variable. | |
| int | var_TriggerCallback (vlc_object_t *p_this, const char *psz_name) |
| Trigger callback on a variable. | |
| void | var_OptionParse (vlc_object_t *p_obj, const char *psz_option, bool trusted) |
| Parse a stringified option This function parse a string option and create the associated object variable The option must be of the form "[no[-]]foo[=bar]" where foo is the option name and bar is the value of the option. | |
| int | var_Inherit (vlc_object_t *p_this, const char *psz_name, int i_type, vlc_value_t *p_val) |
| Finds the value of a variable. | |
| int() | var_InheritURational (vlc_object_t *object, unsigned *num, unsigned *den, const char *var) |
| It inherits a string as an unsigned rational number (it also accepts basic float number). | |
| int | var_Command (vlc_object_t *p_this, const char *psz_name, const char *psz_cmd, const char *psz_arg, char **psz_msg) |
| void | var_FreeList (vlc_value_t *p_val, vlc_value_t *p_val2) |
| Free a list and the associated strings. | |
Variables | |
| static struct variable_ops_t | void_ops = { NULL, DupDummy, FreeDummy, } |
| static struct variable_ops_t | addr_ops = { CmpAddress, DupDummy, FreeDummy, } |
| static struct variable_ops_t | bool_ops = { CmpBool, DupDummy, FreeDummy, } |
| static struct variable_ops_t | float_ops = { CmpFloat, DupDummy, FreeDummy, } |
| static struct variable_ops_t | int_ops = { CmpInt, DupDummy, FreeDummy, } |
| static struct variable_ops_t | list_ops = { CmpAddress, DupList, FreeList, } |
| static struct variable_ops_t | mutex_ops = { CmpAddress, DupDummy, FreeMutex, } |
| static struct variable_ops_t | string_ops = { CmpString, DupString, FreeString, } |
| static struct variable_ops_t | time_ops = { CmpTime, DupDummy, FreeDummy, } |
| static struct variable_ops_t | coords_ops = { NULL, DupDummy, FreeDummy, } |
| static void CheckValue | ( | variable_t * | p_var, | |
| vlc_value_t * | p_val | |||
| ) | [static] |
References variable_t::choices, vlc_value_t::f_float, i, vlc_list_t::i_count, variable_t::i_default, vlc_value_t::i_int, variable_t::i_type, variable_t::max, variable_t::min, variable_t::ops, vlc_list_t::p_values, variable_ops_t::pf_cmp, variable_ops_t::pf_dup, variable_ops_t::pf_free, variable_t::step, VLC_VAR_FLOAT, VLC_VAR_HASCHOICE, VLC_VAR_HASMAX, VLC_VAR_HASMIN, VLC_VAR_HASSTEP, VLC_VAR_INTEGER, VLC_VAR_TIME, and VLC_VAR_TYPE.
Referenced by var_Change(), var_GetAndSet(), and var_SetChecked().
| static void CleanupVar | ( | void * | var | ) | [static] |
| static int CmpAddress | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::p_address.
| static int CmpBool | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::b_bool.
| static int CmpFloat | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::f_float.
| static int CmpInt | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::i_int.
| static int CmpString | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::psz_string.
| static int CmpTime | ( | vlc_value_t | v, | |
| vlc_value_t | w | |||
| ) | [static] |
References vlc_value_t::i_time.
| static void Destroy | ( | variable_t * | p_var | ) | [static] |
| static void DupDummy | ( | vlc_value_t * | p_val | ) | [static] |
| static void DupList | ( | vlc_value_t * | p_val | ) | [static] |
References DupString(), i, vlc_list_t::i_count, vlc_value_t::p_list, vlc_list_t::p_values, vlc_list_t::pi_types, VLC_VAR_CLASS, and VLC_VAR_STRING.
| static void DupString | ( | vlc_value_t * | p_val | ) | [static] |
| static void FreeDummy | ( | vlc_value_t * | p_val | ) | [static] |
| static void FreeList | ( | vlc_value_t * | p_val | ) | [static] |
References FreeMutex(), FreeString(), i, vlc_list_t::i_count, vlc_value_t::p_list, vlc_list_t::p_values, vlc_list_t::pi_types, VLC_VAR_CLASS, VLC_VAR_MUTEX, and VLC_VAR_STRING.
Referenced by var_FreeList(), and var_OptionParse().
| static void FreeMutex | ( | vlc_value_t * | p_val | ) | [static] |
| static void FreeString | ( | vlc_value_t * | p_val | ) | [static] |
| static variable_t* Lookup | ( | vlc_object_t * | obj, | |
| const char * | psz_name | |||
| ) | [static] |
| static int TriggerCallback | ( | vlc_object_t * | p_this, | |
| variable_t * | p_var, | |||
| const char * | psz_name, | |||
| vlc_value_t | oldval | |||
| ) | [static] |
References variable_t::b_incallback, variable_t::i_entries, callback_entry_t::p_data, variable_t::p_entries, callback_entry_t::pf_callback, variable_t::val, vlc_object_internals::var_lock, vlc_object_internals::var_wait, vlc_cond_broadcast(), vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by var_GetAndSet(), var_SetChecked(), and var_TriggerCallback().
| void var_DestroyAll | ( | vlc_object_t * | obj | ) |
References CleanupVar(), tdestroy, vlc_object_internals::var_root, and vlc_internals.
Referenced by vlc_object_destroy().
| void var_OptionParse | ( | vlc_object_t * | p_obj, | |
| const char * | psz_option, | |||
| bool | trusted | |||
| ) |
Parse a stringified option This function parse a string option and create the associated object variable The option must be of the form "[no[-]]foo[=bar]" where foo is the option name and bar is the value of the option.
| p_obj | the object in which the variable must be created | |
| psz_option | the option to parse | |
| trusted | whether the option is set by a trusted input or not |
References vlc_value_t::b_bool, module_config_t::b_safe, config_FindConfig(), config_GetType, vlc_value_t::f_float, FreeList(), vlc_list_t::i_count, vlc_value_t::i_int, i_type, INSERT_ELEM, msg_Err, vlc_value_t::p_list, vlc_list_t::p_values, vlc_list_t::pi_types, psz_name, vlc_value_t::psz_string, psz_value, strdup(), us_atof(), var_Create, var_Set, VLC_VAR_BOOL, VLC_VAR_DIRECTORY, VLC_VAR_FILE, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_LIST, VLC_VAR_MODULE, and VLC_VAR_STRING.
Referenced by Create().
| static int varcmp | ( | const void * | a, | |
| const void * | b | |||
| ) | [static] |
| static void WaitUnused | ( | vlc_object_t * | p_this, | |
| variable_t * | p_var | |||
| ) | [static] |
Waits until the variable is inactive (i.e.
not executing a callback)
References variable_t::b_incallback, mutex_cleanup_push, vlc_object_internals::var_lock, vlc_object_internals::var_wait, vlc_cleanup_pop, vlc_cond_wait(), and vlc_internals.
Referenced by var_AddCallback(), var_DelCallback(), var_Destroy(), var_GetAndSet(), var_SetChecked(), and var_TriggerCallback().
struct variable_ops_t addr_ops = { CmpAddress, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t bool_ops = { CmpBool, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t coords_ops = { NULL, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t float_ops = { CmpFloat, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t int_ops = { CmpInt, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t list_ops = { CmpAddress, DupList, FreeList, } [static] |
Referenced by var_Create().
struct variable_ops_t mutex_ops = { CmpAddress, DupDummy, FreeMutex, } [static] |
Referenced by var_Create().
struct variable_ops_t string_ops = { CmpString, DupString, FreeString, } [static] |
Referenced by var_Create().
struct variable_ops_t time_ops = { CmpTime, DupDummy, FreeDummy, } [static] |
Referenced by var_Create().
struct variable_ops_t void_ops = { NULL, DupDummy, FreeDummy, } [static] |
1.5.6