VLC  4.0.0-dev
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 <vlc_list.h>
27 
28 struct vlc_res;
29 
30 /**
31  * Private LibVLC data for each object.
32  */
34 
36 {
37  vlc_object_t *parent; /**< Parent object (or NULL) */
38  const char *typename; /**< Object type human-readable name */
39 
40  /* Object variables */
41  void *var_root;
44 
45  /* Object resources */
46  struct vlc_res *resources;
47 };
48 
49 # define vlc_internals(o) ((o)->priv)
50 # define vlc_externals(priv) (abort(), (void *)(priv))
51 
52 extern void var_DestroyAll( vlc_object_t * );
53 
54 /**
55  * Return a list of all variable names
56  *
57  * There is no warranty that the returned variables will be still alive after
58  * the return of this function.
59  *
60  * @return a NULL terminated list of char *, each elements and the return value
61  * must be freed by the caller
62  */
64 
65 #endif
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:278
vlc_mutex_t var_lock
Definition: variables.h:42
Definition: objres.c:36
vlc_object_t * parent
Parent object (or NULL)
Definition: variables.h:37
Definition: variables.h:35
This provides convenience helpers for linked lists.
void var_DestroyAll(vlc_object_t *)
Definition: variables.c:413
void * var_root
Definition: variables.h:41
struct vlc_res * resources
Definition: variables.h:46
pthread_cond_t vlc_cond_t
Condition variable.
Definition: vlc_threads.h:290
vlc_cond_t var_wait
Definition: variables.h:43
char ** var_GetAllNames(vlc_object_t *)
Return a list of all variable names.
Definition: variables.c:1153
VLC object common members.
Definition: vlc_objects.h:43