1 /*****************************************************************************
2 * vlc.h: global header for vlc
3 *****************************************************************************
4 * Copyright (C) 1998, 1999, 2000 VideoLAN
5 * $Id: vlc.h,v 1.27 2003/09/20 19:37:53 hartman Exp $
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
20 *****************************************************************************/
29 /*****************************************************************************
31 *****************************************************************************/
32 typedef int vlc_bool_t;
33 typedef struct vlc_list_t vlc_list_t;
34 typedef struct vlc_object_t vlc_object_t;
43 vlc_object_t * p_object;
45 signed long long i_time;
47 struct { char *psz_name; int i_object_id; } var;
49 /* Make sure the structure is at least 64bits */
50 struct { char a, b, c, d, e, f, g, h; } padding;
57 vlc_value_t * p_values;
62 /*****************************************************************************
64 *****************************************************************************/
65 #define VLC_SUCCESS -0 /* No error */
66 #define VLC_ENOMEM -1 /* Not enough memory */
67 #define VLC_ETHREAD -2 /* Thread error */
68 #define VLC_ETIMEOUT -3 /* Timeout */
70 #define VLC_ENOMOD -10 /* Module not found */
72 #define VLC_ENOOBJ -20 /* Object not found */
73 #define VLC_EBADOBJ -21 /* Bad object type */
75 #define VLC_ENOVAR -30 /* Variable not found */
76 #define VLC_EBADVAR -31 /* Bad variable value */
78 #define VLC_EEXIT -255 /* Program exited */
79 #define VLC_EGENERIC -666 /* Generic error */
81 /*****************************************************************************
83 *****************************************************************************/
87 /*****************************************************************************
89 *****************************************************************************/
91 /* Used by playlist_Add */
92 #define PLAYLIST_INSERT 0x0001
93 #define PLAYLIST_REPLACE 0x0002
94 #define PLAYLIST_APPEND 0x0004
95 #define PLAYLIST_GO 0x0008
96 #define PLAYLIST_CHECK_INSERT 0x0010
98 #define PLAYLIST_END -666
100 /** Playlist commands */
102 PLAYLIST_PLAY, /**< Starts playing. No arg. */
103 PLAYLIST_PAUSE, /**< Toggles playlist pause. No arg. */
104 PLAYLIST_STOP, /**< Stops playing. No arg. */
105 PLAYLIST_SKIP, /**< Skip X items and play. */
106 PLAYLIST_GOTO, /**< Goto Xth item. */
107 PLAYLIST_MODE /**< Set playlist mode. ??? */
108 } playlist_command_t;
110 /*****************************************************************************
111 * Required internal headers
112 *****************************************************************************/
113 #if defined( __VLC__ )
114 # include "vlc_common.h"
117 /*****************************************************************************
118 * Exported libvlc API
119 *****************************************************************************/
120 char const * VLC_Version ( void );
121 char const * VLC_Error ( int );
123 int VLC_Create ( void );
124 int VLC_Init ( int, int, char *[] );
126 int VLC_Destroy ( int );
128 int VLC_Set ( int, char const *, vlc_value_t );
129 int VLC_Get ( int, char const *, vlc_value_t * );
130 int VLC_AddIntf ( int, char const *, vlc_bool_t );
131 int VLC_AddTarget ( int, char const *, const char **, int, int, int );
133 int VLC_Play ( int );
134 int VLC_Pause ( int );
135 int VLC_Stop ( int );
136 int VLC_FullScreen ( int );
142 #endif /* <vlc/vlc.h> */