variables.c File Reference

Include dependency graph for variables.c:


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_tLookup (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, }

Function Documentation

static void CheckValue ( variable_t p_var,
vlc_value_t p_val 
) [static]

static void CleanupVar ( void *  var  )  [static]

References Destroy().

Referenced by var_DestroyAll().

static int CmpAddress ( vlc_value_t  v,
vlc_value_t  w 
) [static]

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]

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]

static void DupString ( vlc_value_t p_val  )  [static]

References vlc_value_t::psz_string, and strdup().

Referenced by DupList().

static void FreeDummy ( vlc_value_t p_val  )  [static]

static void FreeList ( vlc_value_t p_val  )  [static]

static void FreeMutex ( vlc_value_t p_val  )  [static]

References vlc_value_t::p_address, and vlc_mutex_destroy().

Referenced by FreeList().

static void FreeString ( vlc_value_t p_val  )  [static]

References vlc_value_t::psz_string.

Referenced by FreeList(), and RenderText().

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]

void var_DestroyAll ( vlc_object_t obj  ) 

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.

Parameters:
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
Returns:
nothing

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]

References variable_t::psz_name.

Referenced by Lookup(), var_Create(), and var_Destroy().

static void WaitUnused ( vlc_object_t p_this,
variable_t p_var 
) [static]


Variable Documentation

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]


Generated on Tue May 25 08:05:37 2010 for VLC by  doxygen 1.5.6