1 /*****************************************************************************
2 * vlc.h: global header for libvlc (old-style)
3 *****************************************************************************
4 * Copyright (C) 1998-2004 the VideoLAN team
7 * Authors: Vincent Seguin <seguin@via.ecp.fr>
8 * Samuel Hocevar <sam@zoy.org>
9 * Gildas Bazin <gbazin@netcourrier.com>
10 * Derk-Jan Hartman <hartman at videolan dot org>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
28 * \defgroup libvlc_old Libvlc Old
29 * This is libvlc, the base library of the VLC program.
30 * This is the legacy API. Please consider using the new libvlc API
37 #define _VLC_COMMON_H 1
45 /*****************************************************************************
47 *****************************************************************************/
48 typedef bool vlc_bool_t; /* (shouldn't be exposed) */
49 typedef struct vlc_list_t vlc_list_t; /* (shouldn't be exposed) */
50 typedef struct vlc_object_t vlc_object_t; /* (shouldn't be exposed) */
52 #if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
53 typedef signed __int64 vlc_int64_t;
55 typedef signed long long vlc_int64_t;
59 * VLC value structure (shouldn't be exposed)
68 vlc_object_t * p_object;
72 struct { char *psz_name; int i_object_id; } var;
74 /* Make sure the structure is at least 64bits */
75 struct { char a, b, c, d, e, f, g, h; } padding;
80 * VLC list structure (shouldn't be exposed)
85 vlc_value_t * p_values;
90 /*****************************************************************************
91 * Error values (shouldn't be exposed)
92 *****************************************************************************/
93 #define VLC_SUCCESS -0 /* No error */
94 #define VLC_ENOMEM -1 /* Not enough memory */
95 #define VLC_ETHREAD -2 /* Thread error */
96 #define VLC_ETIMEOUT -3 /* Timeout */
98 #define VLC_ENOMOD -10 /* Module not found */
100 #define VLC_ENOOBJ -20 /* Object not found */
101 #define VLC_EBADOBJ -21 /* Bad object type */
103 #define VLC_ENOVAR -30 /* Variable not found */
104 #define VLC_EBADVAR -31 /* Bad variable value */
106 #define VLC_ENOITEM -40 /**< Item not found */
108 #define VLC_EEXIT -255 /* Program exited */
109 #define VLC_EEXITSUCCESS -999 /* Program exited successfully */
110 #define VLC_EGENERIC -666 /* Generic error */
112 /*****************************************************************************
113 * Booleans (shouldn't be exposed)
114 *****************************************************************************/
115 #define VLC_FALSE false
116 #define VLC_TRUE true
119 * \defgroup var_type Variable types (shouldn't be exposed)
120 * These are the different types a vlc variable can have.
123 #define VLC_VAR_VOID 0x0010
124 #define VLC_VAR_BOOL 0x0020
125 #define VLC_VAR_INTEGER 0x0030
126 #define VLC_VAR_HOTKEY 0x0031
127 #define VLC_VAR_STRING 0x0040
128 #define VLC_VAR_MODULE 0x0041
129 #define VLC_VAR_FILE 0x0042
130 #define VLC_VAR_DIRECTORY 0x0043
131 #define VLC_VAR_VARIABLE 0x0044
132 #define VLC_VAR_FLOAT 0x0050
133 #define VLC_VAR_TIME 0x0060
134 #define VLC_VAR_ADDRESS 0x0070
135 #define VLC_VAR_MUTEX 0x0080
136 #define VLC_VAR_LIST 0x0090
139 /*****************************************************************************
140 * Required internal headers
141 *****************************************************************************/
142 #if defined( __LIBVLC__ )
143 # include "vlc_common.h"
147 /*****************************************************************************
148 * Shared library Export macros
149 *****************************************************************************/
150 #ifndef VLC_PUBLIC_API
151 # define VLC_PUBLIC_API extern
154 /*****************************************************************************
156 *****************************************************************************/
158 #ifndef VLC_DEPRECATED_API
160 /* Avoid unuseful warnings from libvlc with our deprecated APIs */
161 # define VLC_DEPRECATED_API VLC_PUBLIC_API
162 # else /* __LIBVLC__ */
163 # if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
164 # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
166 # define VLC_DEPRECATED_API VLC_PUBLIC_API
168 # endif /* __LIBVLC__ */
177 #endif /* _VLC_COMMON_H */