]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_structures.h
Remove vlc_int64_t. Was not even correctly defined.
[vlc] / include / vlc / libvlc_structures.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc_* new external API structures
3  *****************************************************************************
4  * Copyright (C) 1998-2007 the VideoLAN team
5  * $Id $
6  *
7  * Authors: Filippo Carone <littlejohn@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _LIBVLC_STRUCTURES_H
25 #define _LIBVLC_STRUCTURES_H 1
26
27 #if defined (WIN32) && defined (DLL_EXPORT)
28 # define VLC_PUBLIC_API __declspec(dllexport)
29 #else
30 # define VLC_PUBLIC_API
31 #endif
32
33 #ifdef __LIBVLC__
34 /* Avoid unuseful warnings from libvlc with our deprecated APIs */
35 #   define VLC_DEPRECATED_API VLC_PUBLIC_API
36 #elif defined(__GNUC__) && \
37       (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
38 # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
39 #else
40 # define VLC_DEPRECATED_API VLC_PUBLIC_API
41 #endif
42
43 #include <stdint.h>
44
45 # ifdef __cplusplus
46 extern "C" {
47 # endif
48
49 /** This structure is opaque. It represents a libvlc instance */
50 typedef struct libvlc_instance_t libvlc_instance_t;
51
52 /*****************************************************************************
53  * Exceptions
54  *****************************************************************************/
55
56 /** \defgroup libvlc_exception libvlc_exception
57  * \ingroup libvlc_core
58  * LibVLC Exceptions handling
59  * @{
60  */
61
62 typedef struct libvlc_exception_t
63 {
64     int b_raised;
65     int i_code;
66     char *psz_message;
67 } libvlc_exception_t;
68
69 /**@} */
70
71 /*****************************************************************************
72  * Time
73  *****************************************************************************/
74 /** \defgroup libvlc_time libvlc_time
75  * \ingroup libvlc_core
76  * LibVLC Time support in libvlc
77  * @{
78  */
79
80 typedef int64_t libvlc_time_t;
81
82 /**@} */
83
84 /*****************************************************************************
85  * Media Descriptor
86  *****************************************************************************/
87 /** \defgroup libvlc_media libvlc_media
88  * \ingroup libvlc
89  * LibVLC Media Descriptor handling
90  * @{
91  */
92
93 /* Meta Handling */
94 /** defgroup libvlc_meta libvlc_meta
95  * \ingroup libvlc_media
96  * LibVLC Media Meta
97  * @{
98  */
99
100 typedef enum libvlc_meta_t {
101     libvlc_meta_Title,
102     libvlc_meta_Artist,
103     libvlc_meta_Genre,
104     libvlc_meta_Copyright,
105     libvlc_meta_Album,
106     libvlc_meta_TrackNumber,
107     libvlc_meta_Description,
108     libvlc_meta_Rating,
109     libvlc_meta_Date,
110     libvlc_meta_Setting,
111     libvlc_meta_URL,
112     libvlc_meta_Language,
113     libvlc_meta_NowPlaying,
114     libvlc_meta_Publisher,
115     libvlc_meta_EncodedBy,
116     libvlc_meta_ArtworkURL,
117     libvlc_meta_TrackID
118 } libvlc_meta_t;
119
120 /**@} */
121
122 typedef struct libvlc_media_t libvlc_media_t;
123
124 /**@} */
125
126
127 /*****************************************************************************
128  * Media Instance
129  *****************************************************************************/
130 /** \defgroup libvlc_media_player libvlc_media_player
131  * \ingroup libvlc
132  * LibVLC Media Instance handling
133  * @{
134  */
135
136 typedef struct libvlc_media_player_t libvlc_media_player_t;
137
138 typedef enum libvlc_state_t
139 {
140     libvlc_NothingSpecial,
141     libvlc_Stopped,
142     libvlc_Opening,
143     libvlc_Buffering,
144     libvlc_Ended,
145     libvlc_Error,
146     libvlc_Playing,
147     libvlc_Paused
148 } libvlc_state_t;
149
150 /**@} */
151
152 /*****************************************************************************
153  * Media List
154  *****************************************************************************/
155 /** \defgroup libvlc_media_list libvlc_media_list
156  * \ingroup libvlc
157  * LibVLC Media List handling
158  * @{
159  */
160
161 typedef struct libvlc_media_list_t libvlc_media_list_t;
162 typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
163
164
165 /*****************************************************************************
166  * Media List Player
167  *****************************************************************************/
168 /** \defgroup libvlc_media_list_player libvlc_media_list_player
169  * \ingroup libvlc_media_list
170  * LibVLC Media List Player handling
171  * @{
172  */
173
174 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
175
176 /**@} libvlc_media_list_player */
177
178 /**@} libvlc_media_list */
179
180 /*****************************************************************************
181  * Media Library
182  *****************************************************************************/
183 /** \defgroup libvlc_media_library libvlc_media_library
184  * \ingroup libvlc
185  * LibVLC Media Library
186  * @{
187  */
188
189 typedef struct libvlc_media_library_t libvlc_media_library_t;
190
191 /**@} */
192
193 /*****************************************************************************
194  * Playlist
195  *****************************************************************************/
196 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
197  * \ingroup libvlc
198  * LibVLC Playlist handling (Deprecated)
199  * @deprecated Use media_list
200  * @{
201  */
202
203 typedef struct libvlc_playlist_item_t
204 {
205     int i_id;
206     char * psz_uri;
207     char * psz_name;
208
209 } libvlc_playlist_item_t;
210
211 /**@} */
212
213
214 /*****************************************************************************
215  * Video
216  *****************************************************************************/
217 /** \defgroup libvlc_video libvlc_video
218  * \ingroup libvlc_media_player
219  * LibVLC Video handling
220  * @{
221  */
222  
223 /**
224 * Downcast to this general type as placeholder for a platform specific one, such as:
225 *  Drawable on X11,
226 *  CGrafPort on MacOSX,
227 *  HWND on win32
228 */
229 typedef int libvlc_drawable_t;
230
231 /**
232 * Rectangle type for video geometry
233 */
234 typedef struct libvlc_rectangle_t
235 {
236     int top, left;
237     int bottom, right;
238 }
239 libvlc_rectangle_t;
240
241 /**@} */
242
243
244 /*****************************************************************************
245  * Services/Media Discovery
246  *****************************************************************************/
247 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
248  * \ingroup libvlc
249  * LibVLC Media Discoverer
250  * @{
251  */
252
253 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
254
255 /**@} */
256
257 /*****************************************************************************
258  * Message log handling
259  *****************************************************************************/
260
261 /** \defgroup libvlc_log libvlc_log
262  * \ingroup libvlc_core
263  * LibVLC Message Logging
264  * @{
265  */
266
267 /** This structure is opaque. It represents a libvlc log instance */
268 typedef struct libvlc_log_t libvlc_log_t;
269
270 /** This structure is opaque. It represents a libvlc log iterator */
271 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
272
273 typedef struct libvlc_log_message_t
274 {
275     unsigned    sizeof_msg;   /* sizeof() of message structure, must be filled in by user */
276     int         i_severity;   /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
277     const char *psz_type;     /* module type */
278     const char *psz_name;     /* module name */
279     const char *psz_header;   /* optional header */
280     const char *psz_message;  /* message */
281 } libvlc_log_message_t;
282
283 /**@} */
284
285 # ifdef __cplusplus
286 }
287 # endif
288
289 #endif