]> git.sesse.net Git - vlc/blob - include/vlc/vlc.h
* ALL: the first libvlc commit.
[vlc] / include / vlc / vlc.h
1 /*****************************************************************************
2  * vlc.h: global header for vlc
3  *****************************************************************************
4  * Copyright (C) 1998, 1999, 2000 VideoLAN
5  * $Id: vlc.h,v 1.1 2002/06/01 12:31:58 sam Exp $
6  *
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.
11  * 
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.
16  *
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  *****************************************************************************/
21
22 #ifndef _VLC_VLC_H
23 #define _VLC_VLC_H 1
24
25 # ifdef __cplusplus
26 extern "C" {
27 # endif
28
29 /*****************************************************************************
30  * Error values
31  *****************************************************************************/
32 typedef signed int vlc_error_t;
33
34 #define VLC_SUCCESS         -0                                   /* No error */
35 #define VLC_EGENERIC        -1                              /* Generic error */
36 #define VLC_ENOMEM          -2                          /* Not enough memory */
37 #define VLC_ESTATUS         -3                             /* Invalid status */
38 #define VLC_EEXIT         -255                             /* Program exited */
39
40 /*****************************************************************************
41  * Booleans
42  *****************************************************************************/
43 typedef int vlc_bool_t;
44
45 #define VLC_FALSE 0
46 #define VLC_TRUE  1
47
48 /*****************************************************************************
49  * Main structure status
50  *****************************************************************************/
51 typedef int vlc_status_t;
52
53 #define VLC_STATUS_NONE     0x00000000
54 #define VLC_STATUS_CREATED  0x02020202
55 #define VLC_STATUS_STOPPED  0x12121212
56 #define VLC_STATUS_RUNNING  0x42424242
57
58 /*****************************************************************************
59  * Structure types
60  *****************************************************************************/
61 #define VLC_DECLARE_STRUCT( name ) \
62     struct name##_s;         \
63     typedef struct name##_s name##_t;
64 VLC_DECLARE_STRUCT(vlc)
65 VLC_DECLARE_STRUCT(vlc_object)
66
67 /*****************************************************************************
68  * Required internal headers
69  *****************************************************************************/
70 #if defined( __VLC__ )
71 #   include "defs.h"
72 #   include "config.h"
73 #   include "modules_inner.h"
74 #   include "vlc_common.h"
75 #   include "vlc_messages.h"
76 #   include "mtime.h"
77 #   include "modules.h"
78 #   include "main.h"
79 #   include "configuration.h"
80 #   include "threads_funcs.h"
81 #   include "vlc_objects.h"
82 #endif
83
84 /*****************************************************************************
85  * Exported libvlc base API
86  *****************************************************************************/
87 vlc_t *         vlc_create     ( void );
88 vlc_error_t     vlc_init       ( vlc_t *, int, char *[] );
89 vlc_error_t     vlc_run        ( vlc_t * );
90 vlc_error_t     vlc_stop       ( vlc_t * );
91 vlc_error_t     vlc_end        ( vlc_t * );
92 vlc_error_t     vlc_destroy    ( vlc_t * );
93
94 vlc_error_t     vlc_add_intf   ( vlc_t *, char *, vlc_bool_t );
95 vlc_error_t     vlc_add_target ( vlc_t *, char * );
96
97 vlc_status_t    vlc_status     ( vlc_t * );
98
99 # ifdef __cplusplus
100 }
101 # endif
102
103 #endif /* <vlc/vlc.h> */