1 /*****************************************************************************
2 * vlc.h: global header for vlc
3 *****************************************************************************
4 * Copyright (C) 1998, 1999, 2000 VideoLAN
5 * $Id: vlc.h,v 1.14 2002/09/29 18:19:53 sam 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 struct vlc_t vlc_t;
33 typedef struct vlc_list_t vlc_list_t;
34 typedef struct vlc_object_t vlc_object_t;
36 typedef signed int vlc_error_t;
37 typedef int vlc_bool_t;
38 typedef int vlc_status_t;
40 /*****************************************************************************
42 *****************************************************************************/
43 #define VLC_SUCCESS -0 /* No error */
44 #define VLC_ENOMEM -1 /* Not enough memory */
45 #define VLC_EMODULE -2 /* Module not found */
46 #define VLC_ESTATUS -3 /* Invalid status */
47 #define VLC_ETHREAD -4 /* Could not spawn thread */
48 #define VLC_EOBJECT -5 /* Object not found */
49 #define VLC_EEXIT -255 /* Program exited */
50 #define VLC_EGENERIC -666 /* Generic error */
52 /*****************************************************************************
54 *****************************************************************************/
58 /*****************************************************************************
59 * Main structure status
60 *****************************************************************************/
61 #define VLC_STATUS_NONE 0x00000000
62 #define VLC_STATUS_CREATED 0x02020202
63 #define VLC_STATUS_STOPPED 0x12121212
64 #define VLC_STATUS_RUNNING 0x42424242
66 /*****************************************************************************
68 *****************************************************************************/
70 /* Used by playlist_Add */
71 #define PLAYLIST_INSERT 0x0001
72 #define PLAYLIST_REPLACE 0x0002
73 #define PLAYLIST_APPEND 0x0004
74 #define PLAYLIST_GO 0x0008
76 #define PLAYLIST_END -666
78 /* Playlist parsing mode */
79 #define PLAYLIST_REPEAT_CURRENT 0 /* Keep playing current item */
80 #define PLAYLIST_FORWARD 1 /* Parse playlist until end */
81 #define PLAYLIST_BACKWARD -1 /* Parse backwards */
82 #define PLAYLIST_FORWARD_LOOP 2 /* Parse playlist and loop */
83 #define PLAYLIST_BACKWARD_LOOP -2 /* Parse backwards and loop */
84 #define PLAYLIST_RANDOM 3 /* Shuffle play */
85 #define PLAYLIST_REVERSE_RANDOM -3 /* Reverse shuffle play */
87 /* Playlist commands */
88 #define PLAYLIST_PLAY 1 /* Starts playing. No arg. */
89 #define PLAYLIST_PAUSE 2 /* Toggles playlist pause. No arg. */
90 #define PLAYLIST_STOP 3 /* Stops playing. No arg. */
91 #define PLAYLIST_SKIP 4 /* Skip X items and play. */
92 #define PLAYLIST_GOTO 5 /* Goto Xth item. */
93 #define PLAYLIST_MODE 6 /* Set playlist mode. ??? */
95 /*****************************************************************************
96 * Required internal headers
97 *****************************************************************************/
98 #if defined( __VLC__ )
99 # include "vlc_common.h"
102 /*****************************************************************************
103 * Exported libvlc API
104 *****************************************************************************/
105 vlc_status_t vlc_status ( void );
107 vlc_error_t vlc_create ( void );
108 vlc_error_t vlc_init ( int, char *[] );
109 vlc_error_t vlc_die ( void );
110 vlc_error_t vlc_destroy ( void );
112 vlc_error_t vlc_set ( const char *, const char * );
113 vlc_error_t vlc_add_intf ( const char *, vlc_bool_t );
114 vlc_error_t vlc_add_target ( const char *, int, int );
116 vlc_error_t vlc_play ( );
117 vlc_error_t vlc_pause ( );
118 vlc_error_t vlc_stop ( void );
119 vlc_error_t vlc_fullscreen ( );
121 /*****************************************************************************
122 * Exported libvlc reentrant API
123 *****************************************************************************/
124 vlc_status_t vlc_status_r ( vlc_t * );
126 vlc_t * vlc_create_r ( void );
127 vlc_error_t vlc_init_r ( vlc_t *, int, char *[] );
128 vlc_error_t vlc_die_r ( vlc_t * );
129 vlc_error_t vlc_destroy_r ( vlc_t * );
131 vlc_error_t vlc_set_r ( vlc_t *, const char *, const char * );
132 vlc_error_t vlc_add_intf_r ( vlc_t *, const char *, vlc_bool_t );
133 vlc_error_t vlc_add_target_r ( vlc_t *, const char *, int, int );
135 vlc_error_t vlc_play_r ( vlc_t * );
136 vlc_error_t vlc_pause_r ( vlc_t * );
137 vlc_error_t vlc_stop_r ( vlc_t * );
138 vlc_error_t vlc_fullscreen_r ( vlc_t * );
144 #endif /* <vlc/vlc.h> */