1 /*****************************************************************************
2 * vlc.h: global header for vlc
3 *****************************************************************************
4 * Copyright (C) 1998, 1999, 2000 VideoLAN
5 * $Id: vlc.h,v 1.5 2002/07/17 21:58:21 massiot 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 #define VLC_DECLARE_STRUCT( name ) \
34 typedef struct name##_s name##_t;
35 VLC_DECLARE_STRUCT(vlc)
36 VLC_DECLARE_STRUCT(vlc_object)
38 typedef signed int vlc_error_t;
39 typedef int vlc_bool_t;
40 typedef int vlc_status_t;
42 /*****************************************************************************
44 *****************************************************************************/
45 #define VLC_SUCCESS -0 /* No error */
46 #define VLC_EGENERIC -1 /* Generic error */
47 #define VLC_ENOMEM -2 /* Not enough memory */
48 #define VLC_ESTATUS -3 /* Invalid status */
49 #define VLC_EEXIT -255 /* Program exited */
51 /*****************************************************************************
53 *****************************************************************************/
57 /*****************************************************************************
58 * Main structure status
59 *****************************************************************************/
60 #define VLC_STATUS_NONE 0x00000000
61 #define VLC_STATUS_CREATED 0x02020202
62 #define VLC_STATUS_STOPPED 0x12121212
63 #define VLC_STATUS_RUNNING 0x42424242
65 /*****************************************************************************
67 *****************************************************************************/
69 /* Used by playlist_Add */
70 #define PLAYLIST_INSERT 0x0001
71 #define PLAYLIST_REPLACE 0x0002
72 #define PLAYLIST_APPEND 0x0004
73 #define PLAYLIST_GO 0x0008
75 #define PLAYLIST_END -666
77 /* Playlist parsing mode */
78 #define PLAYLIST_REPEAT_CURRENT 0 /* Keep playing current item */
79 #define PLAYLIST_FORWARD 1 /* Parse playlist until end */
80 #define PLAYLIST_BACKWARD -1 /* Parse backwards */
81 #define PLAYLIST_FORWARD_LOOP 2 /* Parse playlist and loop */
82 #define PLAYLIST_BACKWARD_LOOP -2 /* Parse backwards and loop */
83 #define PLAYLIST_RANDOM 3 /* Shuffle play */
84 #define PLAYLIST_REVERSE_RANDOM -3 /* Reverse shuffle play */
86 /* Playlist commands */
87 #define PLAYLIST_PLAY 1 /* Starts playing. No arg. */
88 #define PLAYLIST_PAUSE 2 /* Toggles playlist pause. No arg. */
89 #define PLAYLIST_STOP 3 /* Stops playing. No arg. */
90 #define PLAYLIST_SKIP 4 /* Skip X items and play. */
91 #define PLAYLIST_GOTO 5 /* Goto Xth item. */
92 #define PLAYLIST_MODE 6 /* Set playlist mode. ??? */
94 /*****************************************************************************
95 * Required internal headers
96 *****************************************************************************/
97 #if defined( __VLC__ )
100 # include "modules_inner.h"
101 # include "vlc_common.h"
102 # include "os_specific.h"
103 # include "vlc_messages.h"
105 # include "modules.h"
107 # include "configuration.h"
108 # include "vlc_objects.h"
111 /*****************************************************************************
112 * Exported libvlc base API
113 *****************************************************************************/
114 vlc_t * vlc_create ( void );
115 vlc_error_t vlc_init ( vlc_t *, int, char *[] );
116 vlc_error_t vlc_run ( vlc_t * );
117 vlc_error_t vlc_stop ( vlc_t * );
118 vlc_error_t vlc_end ( vlc_t * );
119 vlc_error_t vlc_destroy ( vlc_t * );
121 vlc_error_t vlc_add_intf ( vlc_t *, const char *, vlc_bool_t );
122 vlc_error_t vlc_add_target ( vlc_t *, const char *, int, int );
124 vlc_status_t vlc_status ( vlc_t * );
130 #endif /* <vlc/vlc.h> */