VLC  3.0.21
variables.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * variables.h: object variables typedefs
3  *****************************************************************************
4  * Copyright (C) 1999-2012 VLC authors and VideoLAN
5  *
6  * Authors: Samuel Hocevar <sam@zoy.org>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #ifndef LIBVLC_VARIABLES_H
24 # define LIBVLC_VARIABLES_H 1
25 
26 # include <stdalign.h>
27 # include <vlc_atomic.h>
28 
29 struct vlc_res;
30 
31 /**
32  * Private LibVLC data for each object.
33  */
35 
37 {
38  alignas (max_align_t) /* ensure vlc_externals() is maximally aligned */
39  char *psz_name; /* given name */
40 
41  /* Object variables */
42  void *var_root;
45 
46  /* Objects management */
47  atomic_uint refs;
49 
50  /* Objects tree structure */
51  vlc_object_internals_t *next; /* next sibling */
52  vlc_object_internals_t *prev; /* previous sibling */
53  vlc_object_internals_t *first; /* first child */
55 
56  /* Object resources */
57  struct vlc_res *resources;
58 };
59 
60 # define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1)
61 # define vlc_externals( priv ) ((vlc_object_t *)((priv) + 1))
62 
63 void DumpVariables(vlc_object_t *obj);
64 
65 extern void var_DestroyAll( vlc_object_t * );
66 
67 /**
68  * Return a list of all variable names
69  *
70  * There is no warranty that the returned variables will be still alive after
71  * the return of this function.
72  *
73  * @return a NULL terminated list of char *, each elements and the return value
74  * must be freed by the caller
75  */
77 
78 #endif
variable_ops_t::pf_free
void(* pf_free)(vlc_value_t *)
Definition: variables.c:59
CmpBool
static int CmpBool(vlc_value_t v, vlc_value_t w)
Definition: variables.c:104
callback_entry_t::pf_value_callback
vlc_callback_t pf_value_callback
Definition: variables.c:90
TriggerListCallback
static void TriggerListCallback(vlc_object_t *obj, variable_t *var, const char *name, int action, vlc_value_t *val)
Definition: variables.c:258
DelCallback
static void DelCallback(vlc_object_t *p_this, const char *psz_name, callback_entry_t entry, vlc_callback_type_t i_type)
Definition: variables.c:885
read_mpi
static size_t read_mpi(uint8_t *dst, const uint8_t *buf, size_t buflen, size_t bits)
Definition: update_crypto.c:75
count
size_t count
Definition: core.c:461
varcmp
static int varcmp(const void *a, const void *b)
Definition: variables.c:142
variable_t::i_type
int i_type
The type of the variable.
Definition: variables.c:84
signature_packet_t::v4
struct signature_packet_t::@61::@63 v4
variable_ops_t::pf_cmp
int(* pf_cmp)(vlc_value_t, vlc_value_t)
Definition: variables.c:57
CRC24_POLY
#define CRC24_POLY
Definition: update_crypto.c:351
callback_table_t::p_entries
callback_entry_t * p_entries
Definition: variables.c:65
var_GetAllNames
char ** var_GetAllNames(vlc_object_t *obj)
Return a list of all variable names.
Definition: variables.c:1394
vlc_fopen
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:46
VLC_VAR_SETVALUE
#define VLC_VAR_SETVALUE
Set the value of this variable without triggering any callbacks.
Definition: vlc_variables.h:87
public_key_packet_t::dsa
struct public_key_packet_t::@58::@59 dsa
VLC_VAR_CLASS
#define VLC_VAR_CLASS
Definition: vlc_variables.h:40
vlc_stream_GetSize
static int vlc_stream_GetSize(stream_t *s, uint64_t *size)
Get the size of the stream.
Definition: vlc_stream.h:313
vlc_object_internals::first
vlc_object_internals_t * first
Definition: variables.h:52
var_Inherit
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.
Definition: variables.c:1171
VLC_VAR_CLEARCHOICES
#define VLC_VAR_CLEARCHOICES
Definition: vlc_variables.h:98
packet_header_len
#define packet_header_len(c)
Definition: update_crypto.c:51
download_key
public_key_t * download_key(vlc_object_t *p_this, const uint8_t *p_longid, const uint8_t *p_signature_issuer)
Definition: update_crypto.c:929
var_TriggerCallback
void var_TriggerCallback(vlc_object_t *p_this, const char *psz_name)
Trigger callback on a variable.
Definition: variables.c:969
vlc_list_t
VLC list structure.
Definition: vlc_common.h:344
leaf
Definition: vlc_fixups.h:497
vlc_res
Definition: objres.c:34
public_key_packet_t::rsa
struct public_key_packet_t::@58::@60 rsa
ARRAY_APPEND
#define ARRAY_APPEND(array, elem)
Definition: vlc_arrays.h:187
VLC_VAR_GETCHOICES
#define VLC_VAR_GETCHOICES
Definition: vlc_variables.h:99
callback_entry_t::p_callback
void * p_callback
Definition: variables.c:92
VLC_VAR_SETTEXT
#define VLC_VAR_SETTEXT
Definition: vlc_variables.h:89
vlc_internals
#define vlc_internals(obj)
Definition: variables.h:59
vlc_value_t::x
int32_t x
Definition: vlc_common.h:337
vlc_b64_decode_binary_to_buffer
size_t vlc_b64_decode_binary_to_buffer(uint8_t *p_dst, size_t i_dst, const char *p_src)
Definition: strings.c:404
vlc_common.h
variable_t::psz_text
char * psz_text
The variable display name, mainly for use by the interfaces.
Definition: variables.c:80
Lookup
static variable_t * Lookup(vlc_object_t *obj, const char *psz_name)
Definition: variables.c:151
vlc_object_internals::tree_lock
vlc_mutex_t tree_lock
Definition: variables.h:53
callback_entry_t
struct callback_entry_t callback_entry_t
vlc_object_internals::resources
struct vlc_res * resources
Definition: variables.h:56
vlc_object_internals::var_lock
vlc_mutex_t var_lock
Definition: variables.h:42
VLC_VAR_DOINHERIT
#define VLC_VAR_DOINHERIT
Creation flag.
Definition: vlc_variables.h:69
tdelete
void * tdelete(const void *key, void **rootp, int(*cmp)(const void *, const void *))
vlc_object_internals::pf_destructor
vlc_destructor_t pf_destructor
Definition: variables.h:47
var_GetChecked
int var_GetChecked(vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t *p_val)
Definition: variables.c:779
variable_t::i_usage
unsigned i_usage
Reference count.
Definition: variables.c:85
addr_ops
static const struct variable_ops_t addr_ops
Definition: variables.c:135
vlc_object_internals::var_root
void * var_root
Definition: variables.h:41
CmpString
static int CmpString(vlc_value_t v, vlc_value_t w)
Definition: variables.c:114
VLC_VAR_ADDCHOICE
#define VLC_VAR_ADDCHOICE
Definition: vlc_variables.h:96
config_GetType
int config_GetType(const char *psz_name)
Definition: core.c:52
variable_t::b_incallback
bool b_incallback
Set to TRUE if the variable is in a callback.
Definition: variables.c:96
var_GetAndSet
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.
Definition: variables.c:629
signature_packet_t::algo_specific
union signature_packet_t::@62 algo_specific
var_Destroy
void() var_Destroy(vlc_object_t *p_this, const char *psz_name)
Destroy a vlc variable.
Definition: variables.c:396
callback_table_t
struct callback_table_t callback_table_t
variable_t::choices_text
vlc_list_t choices_text
List of friendly names for the choices.
Definition: variables.c:93
verify_signature_dsa
static int verify_signature_dsa(signature_packet_t *sign, public_key_packet_t *p_key, uint8_t *p_hash)
Definition: update_crypto.c:518
vlc_value_t::p_address
void * p_address
Definition: vlc_common.h:335
vlc_charset.h
parse_public_key
int parse_public_key(const uint8_t *p_key_data, size_t i_key_len, public_key_t *p_key, const uint8_t *p_sig_issuer)
Definition: update_crypto.c:604
var_Get
int var_Get(vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val)
Get a variable's value.
Definition: variables.c:817
VLC_VAR_BOOL
#define VLC_VAR_BOOL
Definition: vlc_variables.h:49
signature_packet_t::issuer_longid
uint8_t issuer_longid[8]
Definition: update.h:81
VLC_VAR_DELCHOICE
#define VLC_VAR_DELCHOICE
Definition: vlc_variables.h:97
public_key_packet_t::timestamp
uint8_t timestamp[4]
Definition: update.h:53
callback_entry_t
Definition: variables.c:44
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:86
var_Type
int var_Type(vlc_object_t *p_this, const char *psz_name)
Request a variable's type.
Definition: variables.c:698
vlc_stream_NewURL
#define vlc_stream_NewURL(a, b)
Definition: vlc_stream.h:404
POSITIVE_KEY_SIGNATURE
Definition: update.h:41
VLC_VAR_INTEGER_ADD
Add parameter to an integer value.
Definition: vlc_variables.h:112
CmpAddress
static int CmpAddress(vlc_value_t v, vlc_value_t w)
Definition: variables.c:122
CleanupVar
static void CleanupVar(void *var)
Definition: variables.c:424
int_ops
static const struct variable_ops_t int_ops
Definition: variables.c:138
VLC_VAR_INTEGER_NAND
Binary NAND over an integer bits field.
Definition: vlc_variables.h:114
callback_entry_t::pf_list_callback
vlc_list_callback_t pf_list_callback
Definition: variables.c:91
CASUAL_KEY_SIGNATURE
Definition: update.h:40
postorder
Definition: vlc_fixups.h:495
vlc_cond_broadcast
void vlc_cond_broadcast(vlc_cond_t *p_condvar)
Wakes up all threads waiting on a condition variable.
Definition: thread.c:262
public_key_t::key
public_key_packet_t key
Definition: update.h:121
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:354
vlc_object_internals::refs
atomic_uint refs
Definition: variables.h:46
VLC_VAR_ADDRESS
#define VLC_VAR_ADDRESS
Definition: vlc_variables.h:53
public_key_t::psz_username
uint8_t * psz_username
Definition: update.h:119
hash_from_text
uint8_t * hash_from_text(const char *psz_string, signature_packet_t *p_sig)
Definition: update_crypto.c:789
variables.h
VLC_VAR_BOOL_TOGGLE
Invert a boolean value (param ignored)
Definition: vlc_variables.h:111
VLC_VAR_INTEGER
#define VLC_VAR_INTEGER
Definition: vlc_variables.h:50
VLC_VAR_STRING
#define VLC_VAR_STRING
Definition: vlc_variables.h:51
TriggerCallback
static void TriggerCallback(vlc_object_t *obj, variable_t *var, const char *name, vlc_value_t prev)
Definition: variables.c:233
VLC_VAR_TYPE
#define VLC_VAR_TYPE
Definition: vlc_variables.h:39
VLC_VAR_FLOAT
#define VLC_VAR_FLOAT
Definition: vlc_variables.h:52
update.h
config_GetInt
#define config_GetInt(a, b)
Definition: vlc_configuration.h:142
config_GetPsz
#define config_GetPsz(a, b)
Definition: vlc_configuration.h:146
var_Set
int var_Set(vlc_object_t *p_this, const char *psz_name, vlc_value_t val)
Set a variable's value.
Definition: variables.c:773
PERSONA_KEY_SIGNATURE
Definition: update.h:39
verify_signature_rsa
static int verify_signature_rsa(signature_packet_t *sign, public_key_packet_t *p_key, uint8_t *p_hash)
Definition: update_crypto.c:465
var_InheritString
#define var_InheritString(o, n)
Definition: vlc_variables.h:639
hash_from_binary_file
static int hash_from_binary_file(const char *psz_file, gcry_md_hd_t hd)
Definition: update_crypto.c:723
vlc_cond_t
pthread_cond_t vlc_cond_t
Condition variable.
Definition: vlc_threads.h:279
config_IsSafe
bool config_IsSafe(const char *)
Definition: core.c:77
asprintf
int asprintf(char **, const char *,...)
VLC_VAR_GETSTEP
#define VLC_VAR_GETSTEP
Definition: vlc_variables.h:94
vlc_value_t::i_int
int64_t i_int
Definition: vlc_common.h:331
variable_t::max
vlc_value_t max
Definition: variables.c:88
signature_packet_t::digest_algo
uint8_t digest_algo
Definition: update.h:78
VLC_VAR_SETMINMAX
#define VLC_VAR_SETMINMAX
Definition: vlc_variables.h:102
hash_from_public_key
uint8_t * hash_from_public_key(public_key_t *p_pkey)
Definition: update_crypto.c:844
callback_table_t::i_entries
int i_entries
Definition: variables.c:64
USER_ID_FOUND
#define USER_ID_FOUND
TwalkGetNames
static void TwalkGetNames(const void *data, const VISIT which, const int depth)
Definition: variables.c:1381
USER_ID_PACKET
Definition: update.h:48
FreeDummy
static void FreeDummy(vlc_value_t *p_val)
Definition: variables.c:130
crc_octets
static long crc_octets(uint8_t *octets, size_t len)
Definition: update_crypto.c:353
TAB_ERASE
#define TAB_ERASE(count, tab, index)
Definition: vlc_arrays.h:77
vlc_list_callback_t
int(* vlc_list_callback_t)(vlc_object_t *, char const *, int, vlc_value_t *, void *)
Definition: vlc_common.h:373
vlc_common_members::parent
vlc_object_t * parent
Parent object.
Definition: vlc_common.h:452
vlc_value_t::y
int32_t y
Definition: vlc_common.h:337
VLC_VAR_VOID
#define VLC_VAR_VOID
Definition: vlc_variables.h:48
vlc_value_t::b_bool
bool b_bool
Definition: vlc_common.h:332
signature_packet_t
Definition: update.h:72
CmpFloat
static int CmpFloat(vlc_value_t v, vlc_value_t w)
Definition: variables.c:121
var_OptionParse
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 varia...
Definition: variables.c:1029
var_GetAllNames
char ** var_GetAllNames(vlc_object_t *)
Return a list of all variable names.
Definition: variables.c:1394
FreeString
static void FreeString(vlc_value_t *p_val)
Definition: variables.c:131
vlc_object_internals::prev
vlc_object_internals_t * prev
Definition: variables.h:51
parse_signature_v4_packet
static size_t parse_signature_v4_packet(signature_packet_t *p_sig, const uint8_t *p_buf, size_t i_sig_len)
Definition: update_crypto.c:179
bool_ops
static const struct variable_ops_t bool_ops
Definition: variables.c:136
vlc_callback_type_t
vlc_callback_type_t
Definition: variables.c:822
var_DestroyAll
void var_DestroyAll(vlc_object_t *obj)
Definition: variables.c:429
vlc_object_internals::psz_name
char * psz_name
Definition: variables.h:38
vlc_list_t::i_type
int i_type
Definition: vlc_common.h:346
i_type
int i_type
Definition: httpd.c:1252
variable_ops_t::pf_dup
void(* pf_dup)(vlc_value_t *)
Definition: variables.c:58
READ_MPI
#define READ_MPI(d, bits)
Definition: update_crypto.c:94
ARRAY_INIT
#define ARRAY_INIT(array)
Definition: vlc_arrays.h:173
variable_ops_t
struct variable_ops_t variable_ops_t
vlc_value_t::f_float
float f_float
Definition: vlc_common.h:333
vlc_atomic.h
vlc_object_internals::next
vlc_object_internals_t * next
Definition: variables.h:50
vlc_value_callback
Definition: variables.c:824
void_ops
static const struct variable_ops_t void_ops
Definition: variables.c:134
variable_t::step
vlc_value_t step
Definition: variables.c:88
variable_t::list_callbacks
callback_table_t list_callbacks
Registered list callbacks.
Definition: variables.c:101
VLC_VAR_INTEGER_OR
Binary OR over an integer bits field.
Definition: vlc_variables.h:113
vlc_list_callback
Definition: variables.c:825
scalar_number
static uint32_t scalar_number(const uint8_t *p, int header_len)
Definition: update_crypto.c:54
vlc_strings.h
VLC_VAR_GETTEXT
#define VLC_VAR_GETTEXT
Definition: vlc_variables.h:90
VLC_VAR_HASCHOICE
#define VLC_VAR_HASCHOICE
Definition: vlc_variables.h:62
variable_t::min
vlc_value_t min
If the variable has min/max/step values.
Definition: variables.c:88
public_key_packet_t::algo
uint8_t algo
Definition: update.h:54
signature_packet_t::rsa
struct signature_packet_t::@62::@66 rsa
VLC_VAR_CHOICESCOUNT
#define VLC_VAR_CHOICESCOUNT
Definition: vlc_variables.h:101
public_key_packet_t::version
uint8_t version
Definition: update.h:52
PUBLIC_KEY_PACKET
Definition: update.h:47
TAB_APPEND
#define TAB_APPEND(count, tab, p)
Definition: vlc_arrays.h:64
VLC_VAR_ISCOMMAND
#define VLC_VAR_ISCOMMAND
Definition: vlc_variables.h:64
GENERIC_KEY_SIGNATURE
Definition: update.h:38
psz_name
const char * psz_name
Definition: vlc_codecs.h:315
parse_signature_packet
static int parse_signature_packet(signature_packet_t *p_sig, const uint8_t *p_buf, size_t i_packet_len)
Definition: update_crypto.c:275
var_AddCallback
void 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.
Definition: variables.c:875
vlc_value_t::psz_string
char * psz_string
Definition: vlc_common.h:334
stream_t
stream_t definition
Definition: vlc_stream.h:46
VLC_VAR_SETSTEP
#define VLC_VAR_SETSTEP
Definition: vlc_variables.h:80
vlc_cleanup_pop
#define vlc_cleanup_pop()
Unregisters the last cancellation handler.
Definition: vlc_threads.h:983
max_align_t
Definition: vlc_fixups.h:133
DECL_ARRAY
#define DECL_ARRAY(type)
Definition: vlc_arrays.h:165
VLC_ENOOBJ
#define VLC_ENOOBJ
Object not found.
Definition: vlc_common.h:358
VISIT
VISIT
Definition: vlc_fixups.h:493
WaitUnused
static void WaitUnused(vlc_object_t *obj, variable_t *var)
Waits until the variable is inactive (i.e.
Definition: variables.c:223
DumpVariables
void DumpVariables(vlc_object_t *obj)
Definition: variables.c:1369
update_release_t::psz_url
char * psz_url
Download URL.
Definition: vlc_update.h:46
rsa_pkcs1_encode_sig
static int rsa_pkcs1_encode_sig(gcry_mpi_t *r_result, size_t size, const uint8_t *hash, int algo)
Definition: update_crypto.c:434
vlc_stream_Read
ssize_t vlc_stream_Read(stream_t *s, void *buf, size_t len)
Reads data from a byte stream.
Definition: stream.c:453
AddCallback
static void AddCallback(vlc_object_t *p_this, const char *psz_name, callback_entry_t entry, vlc_callback_type_t i_type)
Definition: variables.c:828
public_key_t::sig
signature_packet_t sig
Definition: update.h:123
var_Create
int var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Initialize a vlc variable.
Definition: variables.c:296
variable_t::ops
const variable_ops_t * ops
Definition: variables.c:82
vlc_fs.h
vlc_destructor_t
void(* vlc_destructor_t)(struct vlc_object_t *)
Definition: libvlc.h:118
vlc_object_internals::var_wait
vlc_cond_t var_wait
Definition: variables.h:43
xmalloc
static void * xmalloc(size_t len)
Definition: vlc_common.h:979
signature_packet_t::public_key_algo
uint8_t public_key_algo
Definition: update.h:77
DumpVariables
void DumpVariables(vlc_object_t *obj)
Definition: variables.c:1369
likely
#define likely(p)
Definition: vlc_common.h:113
vlc_object_t
The main vlc_object_t structure.
Definition: vlc_objects.h:39
public_key_t
Definition: update.h:116
variable_t::psz_name
char * psz_name
The variable unique name (must be first)
Definition: variables.c:74
VLC_ENOMEM
#define VLC_ENOMEM
Not enough memory.
Definition: vlc_common.h:355
variable_ops_t
Definition: variables.c:55
CheckValue
static void CheckValue(variable_t *var, vlc_value_t *val)
Adjusts a value to fit the constraints for a certain variable:
Definition: variables.c:187
verify_signature
int verify_signature(signature_packet_t *sign, public_key_packet_t *p_key, uint8_t *p_hash)
Definition: update_crypto.c:586
parse_signature_v3_packet
static size_t parse_signature_v3_packet(signature_packet_t *p_sig, const uint8_t *p_buf, size_t i_sig_len)
Definition: update_crypto.c:142
tdestroy
void tdestroy(void *root, void(*free_node)(void *nodep))
vlc_stream.h
vlc_mutex_t
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:267
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:353
tfind
void * tfind(const void *key, const void **rootp, int(*cmp)(const void *, const void *))
signature_packet_t::v3
struct signature_packet_t::@61::@64 v3
strdup
char * strdup(const char *)
psz_value
char psz_value[8]
Definition: vout_intf.c:91
vlc_list_t::i_count
int i_count
Definition: vlc_common.h:347
hash_finish
static uint8_t * hash_finish(gcry_md_hd_t hd, signature_packet_t *p_sig)
Definition: update_crypto.c:742
VLC_VAR_GETMAX
#define VLC_VAR_GETMAX
Definition: vlc_variables.h:93
VLC_VAR_COORDS
#define VLC_VAR_COORDS
Definition: vlc_variables.h:54
name
const char name[16]
Definition: httpd.c:1251
mpi_len
static uint32_t mpi_len(const uint8_t *mpi)
Definition: update_crypto.c:70
pgp_unarmor
static int pgp_unarmor(const char *p_ibuf, size_t i_ibuf_len, uint8_t *p_obuf, size_t i_obuf_len)
Definition: update_crypto.c:375
entry
Definition: fourcc_gen.c:50
vlc_cond_wait
void vlc_cond_wait(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
Waits on a condition variable.
Definition: thread.c:267
callback_entry_t::p_data
void * p_data
Definition: variables.c:73
var_AddListCallback
void var_AddListCallback(vlc_object_t *p_this, const char *psz_name, vlc_list_callback_t pf_callback, void *p_data)
Register a callback for a list variable.
Definition: variables.c:993
variable_t::value_callbacks
callback_table_t value_callbacks
Registered value callbacks.
Definition: variables.c:99
Destroy
static void Destroy(variable_t *p_var)
Definition: variables.c:161
ISSUER_SUBPACKET
Definition: update.h:46
DupString
static void DupString(vlc_value_t *p_val)
Definition: variables.c:125
var_InheritURational
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).
Definition: variables.c:1213
signature_packet_t::specific
union signature_packet_t::@61 specific
configuration.h
strtoll
long long int strtoll(const char *, char **, int)
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *p_mutex)
Releases a mutex.
Definition: thread.c:138
public_key_t::longid
uint8_t longid[8]
Definition: update.h:118
VLC_ENOVAR
#define VLC_ENOVAR
Variable not found.
Definition: vlc_common.h:359
unlikely
#define unlikely(p)
Definition: vlc_common.h:114
var_DelListCallback
void var_DelListCallback(vlc_object_t *p_this, const char *psz_name, vlc_list_callback_t pf_callback, void *p_data)
Remove a callback from a list variable.
Definition: variables.c:1009
BINARY_SIGNATURE
Definition: update.h:34
var_DestroyAll
void var_DestroyAll(vlc_object_t *)
Definition: variables.c:429
vlc_ureduce
bool vlc_ureduce(unsigned *, unsigned *, uint64_t, uint64_t, uint64_t)
PUBLIC_KEY_FOUND
#define PUBLIC_KEY_FOUND
TEXT_SIGNATURE
Definition: update.h:35
libvlc.h
vlc_value_t::p_list
vlc_list_t * p_list
Definition: vlc_common.h:336
var_Change
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.
Definition: variables.c:447
SIGNATURE_FOUND
#define SIGNATURE_FOUND
CmpInt
static int CmpInt(vlc_value_t v, vlc_value_t w)
Definition: variables.c:109
vlc_assert_unreachable
#define vlc_assert_unreachable()
Definition: vlc_common.h:118
variable_t::val
vlc_value_t val
The variable's exported value.
Definition: variables.c:77
U32_AT
static uint32_t U32_AT(const void *p)
Reads 32 bits in network byte order.
Definition: vlc_common.h:806
CRC24_INIT
#define CRC24_INIT
Definition: update_crypto.c:350
tsearch
void * tsearch(const void *key, void **rootp, int(*cmp)(const void *, const void *))
config_GetFloat
#define config_GetFloat(a, b)
Definition: vlc_configuration.h:144
signature_packet_t::type
uint8_t type
Definition: update.h:76
SIGNATURE_PACKET
Definition: update.h:46
signature_packet_t::version
uint8_t version
Definition: update.h:74
DumpVariable
static void DumpVariable(const void *data, const VISIT which, const int depth)
Definition: variables.c:1310
vlc_arrays.h
float_ops
static const struct variable_ops_t float_ops
Definition: variables.c:137
public_key_packet_t::sig
union public_key_packet_t::@58 sig
us_atof
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:87
twalk
void twalk(const void *root, void(*action)(const void *nodep, VISIT which, int depth))
signature_packet_t::dsa
struct signature_packet_t::@62::@65 dsa
signature_packet_t::hash_verification
uint8_t hash_verification[2]
Definition: update.h:80
twalk_ctx
static thread_local void * twalk_ctx
Definition: variables.c:1379
packet_type
#define packet_type(c)
Definition: update_crypto.c:50
DupDummy
static void DupDummy(vlc_value_t *p_val)
Definition: variables.c:124
download_signature
int download_signature(vlc_object_t *p_this, signature_packet_t *p_sig, const char *psz_url)
Definition: update_crypto.c:994
vlc_value_t
VLC value structure.
Definition: vlc_common.h:329
variable_t
The structure describing a variable.
Definition: variables.c:72
VLC_VAR_GETMIN
#define VLC_VAR_GETMIN
Definition: vlc_variables.h:92
var_DelCallback
void 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.
Definition: variables.c:952
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *p_mutex)
Acquires a mutex.
Definition: thread.c:123
var_SetChecked
int var_SetChecked(vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t val)
Definition: variables.c:720
public_key_packet_t
Definition: update.h:49
parse_public_key_packet
static int parse_public_key_packet(public_key_packet_t *p_key, const uint8_t *p_buf, size_t i_packet_len)
Definition: update_crypto.c:105
vlc_value_t::coords
struct vlc_value_t::@146 coords
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:82
var_FreeList
void var_FreeList(vlc_value_t *p_val, vlc_value_t *p_val2)
Free a list and the associated strings.
Definition: variables.c:1285
vlc_object_t::obj
struct vlc_common_members obj
Definition: vlc_objects.h:42
coords_ops
static const struct variable_ops_t coords_ops
Definition: variables.c:140
vlc_list_t::p_values
vlc_value_t * p_values
Definition: vlc_common.h:348
string_ops
static const struct variable_ops_t string_ops
Definition: variables.c:139
variable_t::choices
vlc_list_t choices
List of choices.
Definition: variables.c:91
var_LocationParse
int var_LocationParse(vlc_object_t *obj, const char *mrl, const char *pref)
Parses a set of colon-separated or semicolon-separated name=value pairs.
Definition: variables.c:1136
callback_table_t
Definition: variables.c:62
hash_from_file
uint8_t * hash_from_file(const char *psz_file, signature_packet_t *p_sig)
Definition: update_crypto.c:824
mutex_cleanup_push
#define mutex_cleanup_push(lock)
Definition: vlc_threads.h:1013
p
#define p(t)
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:120
vlc_object_internals
Definition: variables.h:35
vlc_callback_t
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition: vlc_common.h:365