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 struct vlc_list_t vlc_list_t; /* (shouldn't be exposed) */
49 typedef struct vlc_object_t vlc_object_t; /* (shouldn't be exposed) */
51 #if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
52 typedef signed __int64 vlc_int64_t;
54 typedef signed long long vlc_int64_t;
58 * VLC value structure (shouldn't be exposed)
67 vlc_object_t * p_object;
71 struct { char *psz_name; int i_object_id; } var;
73 /* Make sure the structure is at least 64bits */
74 struct { char a, b, c, d, e, f, g, h; } padding;
79 * VLC list structure (shouldn't be exposed)
84 vlc_value_t * p_values;
89 /*****************************************************************************
90 * Error values (shouldn't be exposed)
91 *****************************************************************************/
92 #define VLC_SUCCESS -0 /* No error */
93 #define VLC_ENOMEM -1 /* Not enough memory */
94 #define VLC_ETHREAD -2 /* Thread error */
95 #define VLC_ETIMEOUT -3 /* Timeout */
97 #define VLC_ENOMOD -10 /* Module not found */
99 #define VLC_ENOOBJ -20 /* Object not found */
100 #define VLC_EBADOBJ -21 /* Bad object type */
102 #define VLC_ENOVAR -30 /* Variable not found */
103 #define VLC_EBADVAR -31 /* Bad variable value */
105 #define VLC_ENOITEM -40 /**< Item not found */
107 #define VLC_EEXIT -255 /* Program exited */
108 #define VLC_EEXITSUCCESS -999 /* Program exited successfully */
109 #define VLC_EGENERIC -666 /* Generic error */
112 * \defgroup var_type Variable types (shouldn't be exposed)
113 * These are the different types a vlc variable can have.
116 #define VLC_VAR_VOID 0x0010
117 #define VLC_VAR_BOOL 0x0020
118 #define VLC_VAR_INTEGER 0x0030
119 #define VLC_VAR_HOTKEY 0x0031
120 #define VLC_VAR_STRING 0x0040
121 #define VLC_VAR_MODULE 0x0041
122 #define VLC_VAR_FILE 0x0042
123 #define VLC_VAR_DIRECTORY 0x0043
124 #define VLC_VAR_VARIABLE 0x0044
125 #define VLC_VAR_FLOAT 0x0050
126 #define VLC_VAR_TIME 0x0060
127 #define VLC_VAR_ADDRESS 0x0070
128 #define VLC_VAR_MUTEX 0x0080
129 #define VLC_VAR_LIST 0x0090
132 /*****************************************************************************
133 * Required internal headers
134 *****************************************************************************/
135 #if defined( __LIBVLC__ )
136 # include "vlc_common.h"
140 /*****************************************************************************
141 * Shared library Export macros
142 *****************************************************************************/
143 #ifndef VLC_PUBLIC_API
144 # define VLC_PUBLIC_API extern
147 /*****************************************************************************
149 *****************************************************************************/
151 #ifndef VLC_DEPRECATED_API
153 /* Avoid unuseful warnings from libvlc with our deprecated APIs */
154 # define VLC_DEPRECATED_API VLC_PUBLIC_API
155 # else /* __LIBVLC__ */
156 # if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
157 # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
159 # define VLC_DEPRECATED_API VLC_PUBLIC_API
161 # endif /* __LIBVLC__ */
170 #endif /* _VLC_COMMON_H */