]> git.sesse.net Git - vlc/blob - include/vlc/libvlc.h
control/media_descriptor.c: Expose event_manager().
[vlc] / include / vlc / libvlc.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  * $Id: vlc.h 13701 2005-12-12 17:58:56Z zorglub $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 /**
26  * \defgroup libvlc Libvlc
27  * This is libvlc, the base library of the VLC program.
28  *
29  * @{
30  */
31
32
33 #ifndef _LIBVLC_H
34 #define _LIBVLC_H 1
35
36 #include <vlc/vlc.h>
37 #include <vlc/libvlc_structures.h>
38
39 # ifdef __cplusplus
40 extern "C" {
41 # endif
42
43 /*****************************************************************************
44  * Exception handling
45  *****************************************************************************/
46 /** defgroup libvlc_exception Exceptions
47  * \ingroup libvlc
48  * LibVLC Exceptions handling
49  * @{
50  */
51
52 /**
53  * Initialize an exception structure. This can be called several times to reuse
54  * an exception structure.
55  * \param p_exception the exception to initialize
56  */
57 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
58
59 /**
60  * Has an exception been raised ?
61  * \param p_exception the exception to query
62  * \return 0 if no exception raised, 1 else
63  */
64 VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception );
65
66 /**
67  * Raise an exception
68  * \param p_exception the exception to raise
69  * \param psz_message the exception message
70  */
71 VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
72
73 /**
74  * Clear an exception object so it can be reused.
75  * The exception object must be initialized
76  * \param p_exception the exception to clear
77  */
78 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
79
80 /**
81  * Get exception message
82  * \param p_exception the exception to query
83  * \return the exception message or NULL if not applicable (exception not raised
84  * for example)
85  */
86 VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
87
88 /**@} */
89
90 /*****************************************************************************
91  * Core handling
92  *****************************************************************************/
93
94 /** defgroup libvlc_core Core
95  * \ingroup libvlc
96  * LibVLC Core
97  * @{
98  */
99
100 /**
101  * Create an initialized libvlc instance
102  * \param argc the number of arguments
103  * \param argv command-line-type arguments
104  * \param exception an initialized exception pointer
105  */
106 VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
107
108 /**
109  * Returns a libvlc instance identifier for legacy APIs. Use of this
110  * function is discouraged, you should convert your program to use the
111  * new API.
112  * \param p_instance the instance
113  */
114 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
115
116 /**
117  * Destroy a libvlc instance.
118  * \param p_instance the instance to destroy
119  */
120 VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
121
122 /** @}*/
123
124 /*****************************************************************************
125  * Tree
126  *****************************************************************************/
127 /** defgroup libvlc_tree Tree
128  * \ingroup libvlc
129  * LibVLC Tree. A tree holds an item plus several subtrees.
130  * @{
131  */
132 VLC_PUBLIC_API libvlc_tree_t *
133     libvlc_tree_new_with_media_list_as_item( libvlc_media_list_t * p_mlist,
134                                              libvlc_exception_t * p_e );
135
136 VLC_PUBLIC_API libvlc_tree_t *
137     libvlc_tree_new_with_string_as_item( const char * psz,
138                                          libvlc_exception_t * p_e );
139 VLC_PUBLIC_API void
140     libvlc_tree_release( libvlc_tree_t * p_tree );
141
142 VLC_PUBLIC_API void
143     libvlc_tree_retain( libvlc_tree_t * p_tree );
144
145 VLC_PUBLIC_API char *
146     libvlc_tree_item_as_string( libvlc_tree_t * p_tree,
147                                 libvlc_exception_t * p_e );
148
149 VLC_PUBLIC_API libvlc_media_list_t *
150     libvlc_tree_item_as_media_list( libvlc_tree_t * p_tree,
151                                     libvlc_exception_t * p_e );
152
153 VLC_PUBLIC_API int
154     libvlc_tree_subtree_count( libvlc_tree_t * p_tree, libvlc_exception_t * p_e );
155
156 VLC_PUBLIC_API libvlc_tree_t *
157     libvlc_tree_subtree_at_index( libvlc_tree_t * p_tree,
158                               int index,
159                               libvlc_exception_t * p_e );
160
161 VLC_PUBLIC_API void
162     libvlc_tree_insert_subtree_at_index( libvlc_tree_t * p_tree,
163                                          libvlc_tree_t * p_subtree,
164                                          int index,
165                                          libvlc_exception_t * p_e );
166
167 VLC_PUBLIC_API void
168     libvlc_tree_remove_subtree_at_index( libvlc_tree_t * p_tree,
169                                          int index,
170                                          libvlc_exception_t * p_e );
171
172 /**@} */
173
174
175
176 /*****************************************************************************
177  * Media descriptor
178  *****************************************************************************/
179 /** defgroup libvlc_media_descriptor Media Descriptor
180  * \ingroup libvlc
181  * LibVLC Media Descriptor
182  * @{
183  */
184  
185 /**
186  * Create a media descriptor with the given mrl.
187  * \param p_instance the instance
188  * \param psz_mrl the mrl to read
189  */
190 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_new(
191                                    libvlc_instance_t *p_instance,
192                                    const char * psz_mrl,
193                                    libvlc_exception_t *p_e );
194
195 VLC_PUBLIC_API void libvlc_media_descriptor_retain(
196                                    libvlc_media_descriptor_t *p_meta_desc );
197
198 VLC_PUBLIC_API void libvlc_media_descriptor_release(
199                                    libvlc_media_descriptor_t *p_meta_desc );
200
201 VLC_PUBLIC_API char * libvlc_media_descriptor_get_mrl( libvlc_media_descriptor_t * p_md,
202                                                        libvlc_exception_t * p_e );
203
204 /**
205  * Read the meta of the media descriptor.
206  * \param p_meta_desc the media descriptor to read
207  * \param p_meta_desc the meta to read
208  */
209 VLC_PUBLIC_API char * libvlc_media_descriptor_get_meta(
210                                    libvlc_media_descriptor_t *p_meta_desc,
211                                    libvlc_meta_t e_meta,
212                                    libvlc_exception_t *p_e );
213
214 /* Tags */
215 VLC_PUBLIC_API void libvlc_media_descriptor_add_tag( libvlc_media_descriptor_t *p_md,
216                                                      const char * key,
217                                                      const libvlc_tag_t tag,
218                                                      libvlc_exception_t *p_e );
219
220 VLC_PUBLIC_API void libvlc_media_descriptor_remove_tag( libvlc_media_descriptor_t *p_md,
221                                                          const char * key,
222                                                          const libvlc_tag_t tag,
223                                                          libvlc_exception_t *p_e );
224
225 VLC_PUBLIC_API int
226     libvlc_media_descriptor_tags_count_for_key( libvlc_media_descriptor_t *p_md,
227                                                 const char * key,
228                                                 libvlc_exception_t *p_e );
229
230 VLC_PUBLIC_API libvlc_tag_t
231     libvlc_media_descriptor_tag_at_index_for_key( libvlc_media_descriptor_t *p_md,
232                                                   int i,
233                                                   const char * key,
234                                                   libvlc_exception_t *p_e );
235
236 VLC_PUBLIC_API libvlc_media_list_t *
237     libvlc_media_descriptor_subitems( libvlc_media_descriptor_t *p_md,
238                                       libvlc_exception_t *p_e );
239
240 VLC_PUBLIC_APIlibvlc_event_manager_t *
241     libvlc_media_descriptor_event_manager( libvlc_media_descriptor_t * p_md,
242                                            libvlc_exception_t * p_e )
243
244 /** @}*/
245
246 /*****************************************************************************
247  * Playlist
248  *****************************************************************************/
249 /** defgroup libvlc_playlist Playlist
250  * \ingroup libvlc
251  * LibVLC Playlist handling
252  * @{
253  */
254
255 /**
256  * Set loop variable
257  */
258 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
259                                           libvlc_exception_t * );
260
261 /**
262  * Start playing. You can give some additionnal playlist item options
263  * that will be added to the item before playing it.
264  * \param p_instance the instance
265  * \param i_id the item to play. If this is a negative number, the next
266  * item will be selected. Else, the item with the given ID will be played
267  * \param i_options the number of options to add to the item
268  * \param ppsz_options the options to add to the item
269  * \param p_exception an initialized exception
270  */
271 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
272                                           libvlc_exception_t * );
273
274 /**
275  * Pause a running playlist, resume if it was stopped
276  * \param p_instance the instance to pause
277  * \param p_exception an initialized exception
278  */
279 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
280
281 /**
282  * Checks if the playlist is running
283  * \param p_instance the instance
284  * \param p_exception an initialized exception
285  * \return 0 if the playlist is stopped or paused, 1 if it is running
286  */
287 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
288
289 /**
290  * Get the number of items in the playlist
291  * \param p_instance the instance
292  * \param p_exception an initialized exception
293  * \return the number of items
294  */
295 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
296
297 /**
298  * Lock the playlist instance
299  * \param p_instance the instance
300  */
301 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
302
303 /**
304  * Unlock the playlist instance
305  * \param p_instance the instance
306  */
307 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
308
309 /**
310  * Stop playing
311  * \param p_instance the instance to stop
312  * \param p_exception an initialized exception
313  */
314 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
315
316 /**
317  * Go to next playlist item (starts playback if it was stopped)
318  * \param p_instance the instance to use
319  * \param p_exception an initialized exception
320  */
321 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
322
323 /**
324  * Go to previous playlist item (starts playback if it was stopped)
325  * \param p_instance the instance to use
326  * \param p_exception an initialized exception
327  */
328 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
329
330 /**
331  * Remove all playlist items
332  * \param p_instance the instance
333  * \param p_exception an initialized exception
334  */
335 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
336
337 /**
338  * Add an item at the end of the playlist
339  * If you need more advanced options, \see libvlc_playlist_add_extended
340  * \param p_instance the instance
341  * \param psz_uri the URI to open, using VLC format
342  * \param psz_name a name that you might want to give or NULL
343  * \return the identifier of the new item
344  */
345 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
346                                         libvlc_exception_t * );
347
348 /**
349  * Add an item at the end of the playlist, with additional input options
350  * \param p_instance the instance
351  * \param psz_uri the URI to open, using VLC format
352  * \param psz_name a name that you might want to give or NULL
353  * \param i_options the number of options to add
354  * \param ppsz_options strings representing the options to add
355  * \param p_exception an initialized exception
356  * \return the identifier of the new item
357  */
358 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
359                                                  const char *, int, const char **,
360                                                  libvlc_exception_t * );
361
362 /**
363  * Delete the playlist item with the given ID.
364  * \param p_instance the instance
365  * \param i_id the id to remove
366  * \param p_exception an initialized exception
367  * \return
368  */
369 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
370                                                 libvlc_exception_t * );
371
372 /* Get the input that is currently being played by the playlist
373  * \param p_instance the instance to use
374  * \param p_exception an initialized excecption
375  * \return an input object
376  */
377 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
378                                 libvlc_instance_t *, libvlc_exception_t * );
379
380 /** @}*/
381
382 /*****************************************************************************
383  * Media Instance
384  *****************************************************************************/
385 /** defgroup libvlc_media_instance Media Instance
386  * \ingroup libvlc
387  * LibVLC Media Instance
388  * @{
389  */
390
391 /** Create an empty Media Instance object
392  * \param p_libvlc_instance the libvlc instance in which the Media Instance
393  * should be (not used for now).
394  */
395 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new( libvlc_instance_t *, libvlc_exception_t * );
396
397 /** Create a Media Instance object from a Media Descriptor
398  * \param p_md the media descriptor. Afterwards the p_md can safely be
399  * destroyed.
400  */
401 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new_from_media_descriptor( libvlc_media_descriptor_t *, libvlc_exception_t * );
402
403 /** Release a media_instance after use
404  * \param p_mi the Media Instance to free
405  */
406 VLC_PUBLIC_API void libvlc_media_instance_release( libvlc_media_instance_t * );
407 VLC_PUBLIC_API void libvlc_media_instance_retain( libvlc_media_instance_t * );
408
409 /** Set the media descriptor that will be used by the media_instance. If any,
410  * previous md will be released.
411  * \param p_mi the Media Instance 
412  * \param p_md the Media Descriptor. Afterwards the p_md can safely be
413  * destroyed.
414  */
415 VLC_PUBLIC_API void libvlc_media_instance_set_media_descriptor( libvlc_media_instance_t *, libvlc_media_descriptor_t *, libvlc_exception_t * );
416
417 /** Get the media descriptor used by the media_instance (if any). A copy of
418  * the md is returned. NULL is returned if no media instance is associated.
419  * \param p_mi the Media Instance 
420  */
421 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_instance_get_media_descriptor( libvlc_media_instance_t *, libvlc_exception_t * );
422
423 /** Get the Event Manager from which the media instance send event.
424  * \param p_mi the Media Instance 
425  */
426 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_instance_event_manager ( libvlc_media_instance_t *, libvlc_exception_t * );
427
428 VLC_PUBLIC_API void libvlc_media_instance_play ( libvlc_media_instance_t *, libvlc_exception_t * );
429 VLC_PUBLIC_API void libvlc_media_instance_pause ( libvlc_media_instance_t *, libvlc_exception_t * );
430 VLC_PUBLIC_API void libvlc_media_instance_stop ( libvlc_media_instance_t *, libvlc_exception_t * );
431
432 VLC_PUBLIC_API void libvlc_media_instance_set_drawable ( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
433
434 /// \bug This might go away ... to be replaced by a broader system
435 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_length     ( libvlc_media_instance_t *, libvlc_exception_t *);
436 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_time       ( libvlc_media_instance_t *, libvlc_exception_t *);
437 VLC_PUBLIC_API void        libvlc_media_instance_set_time       ( libvlc_media_instance_t *, vlc_int64_t, libvlc_exception_t *);
438 VLC_PUBLIC_API float       libvlc_media_instance_get_position   ( libvlc_media_instance_t *, libvlc_exception_t *);
439 VLC_PUBLIC_API void        libvlc_media_instance_set_position   ( libvlc_media_instance_t *, float, libvlc_exception_t *);
440 VLC_PUBLIC_API vlc_bool_t  libvlc_media_instance_will_play      ( libvlc_media_instance_t *, libvlc_exception_t *);
441 VLC_PUBLIC_API float       libvlc_media_instance_get_rate       ( libvlc_media_instance_t *, libvlc_exception_t *);
442 VLC_PUBLIC_API void        libvlc_media_instance_set_rate       ( libvlc_media_instance_t *, float, libvlc_exception_t *);
443 VLC_PUBLIC_API int         libvlc_media_instance_get_state      ( libvlc_media_instance_t *, libvlc_exception_t *);
444
445 /**
446  * Does this input have a video output ?
447  * \param p_input the input
448  * \param p_exception an initialized exception
449  */
450 VLC_PUBLIC_API vlc_bool_t  libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
451 VLC_PUBLIC_API float       libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
452
453
454 /** @} */
455
456 /*****************************************************************************
457  * Tag Query
458  *****************************************************************************/
459 /** defgroup libvlc_tag_query Tag Query
460  * \ingroup libvlc
461  * LibVLC Tag query
462  * @{
463  */
464 VLC_PUBLIC_API libvlc_tag_query_t * 
465     libvlc_tag_query_new( libvlc_instance_t *, libvlc_exception_t * );
466
467 VLC_PUBLIC_API void 
468     libvlc_tag_query_release( libvlc_tag_query_t * );
469
470 VLC_PUBLIC_API void 
471     libvlc_tag_query_retain( libvlc_tag_query_t * );
472
473 VLC_PUBLIC_API void
474     libvlc_tag_query_set_match_tag_and_key( libvlc_tag_query_t * p_q,
475                                             libvlc_tag_t tag,
476                                             char * psz_tag_key,
477                                             libvlc_exception_t * );
478
479 VLC_PUBLIC_API vlc_bool_t 
480     libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *,
481                             libvlc_exception_t * );
482
483 /** @} */
484
485 /*****************************************************************************
486  * Media List
487  *****************************************************************************/
488 /** defgroup libvlc_media_list MediaList
489  * \ingroup libvlc
490  * LibVLC Media List
491  * @{
492  */
493 VLC_PUBLIC_API libvlc_media_list_t *
494     libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
495
496 VLC_PUBLIC_API void
497     libvlc_media_list_release( libvlc_media_list_t * );
498
499 VLC_PUBLIC_API void
500     libvlc_media_list_retain( libvlc_media_list_t * );
501
502 VLC_PUBLIC_API void
503     libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
504                                         const char * psz_uri,
505                                         libvlc_exception_t * p_e );
506
507 VLC_PUBLIC_API void
508     libvlc_media_list_set_name( libvlc_media_list_t *,
509                                 const char * psz_name,
510                                 libvlc_exception_t *);
511
512 VLC_PUBLIC_API char *
513     libvlc_media_list_name( libvlc_media_list_t *,
514                             libvlc_exception_t *);
515
516 VLC_PUBLIC_API void
517     libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
518                                             libvlc_media_descriptor_t *,
519                                             libvlc_exception_t * );
520 VLC_PUBLIC_API void
521     libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
522                                                libvlc_media_descriptor_t *,
523                                                int,
524                                                libvlc_exception_t * );
525 VLC_PUBLIC_API void
526     libvlc_media_list_remove_index( libvlc_media_list_t *, int,
527                                     libvlc_exception_t * );
528
529 VLC_PUBLIC_API int
530     libvlc_media_list_count( libvlc_media_list_t * p_mlist,
531                              libvlc_exception_t * p_e );
532
533 VLC_PUBLIC_API libvlc_media_descriptor_t *
534     libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
535                                      libvlc_exception_t * );
536 VLC_PUBLIC_API int
537     libvlc_media_list_index_of_item( libvlc_media_list_t *,
538                                      libvlc_media_descriptor_t *,
539                                      libvlc_exception_t * );
540
541 VLC_PUBLIC_API void
542     libvlc_media_list_lock( libvlc_media_list_t * );
543 VLC_PUBLIC_API void
544     libvlc_media_list_unlock( libvlc_media_list_t * );
545
546 VLC_PUBLIC_API libvlc_media_list_t *
547     libvlc_media_list_flat_media_list( libvlc_media_list_t *,
548                                        libvlc_exception_t * );
549
550 VLC_PUBLIC_API libvlc_event_manager_t *
551     libvlc_media_list_event_manager( libvlc_media_list_t *,
552                                     libvlc_exception_t * );
553 /** @} */
554
555 /*****************************************************************************
556  * Dynamic Media List
557  *****************************************************************************/
558 /** defgroup libvlc_media_list MediaList
559  * \ingroup libvlc
560  * LibVLC Media List
561  * @{ */
562
563 VLC_PUBLIC_API libvlc_dynamic_media_list_t *
564     libvlc_dynamic_media_list_new(  libvlc_media_list_t * p_mlist,
565                                     libvlc_tag_query_t * p_query,
566                                     libvlc_tag_t tag,
567                                     libvlc_exception_t * p_e );
568 VLC_PUBLIC_API void
569     libvlc_dynamic_media_list_release( libvlc_dynamic_media_list_t * p_dmlist );
570
571 VLC_PUBLIC_API void
572     libvlc_dynamic_media_list_retain( libvlc_dynamic_media_list_t * p_dmlist );
573
574 libvlc_media_list_t *
575     libvlc_dynamic_media_list_media_list( libvlc_dynamic_media_list_t * p_dmlist,
576                                           libvlc_exception_t * p_e );
577
578 /** @} */
579
580 /*****************************************************************************
581  * Media Library
582  *****************************************************************************/
583 /** defgroup libvlc_media_library Media Library
584  * \ingroup libvlc
585  * LibVLC Media Library
586  * @{
587  */
588 VLC_PUBLIC_API libvlc_media_library_t *
589     libvlc_media_library_new( libvlc_instance_t * p_inst,
590                               libvlc_exception_t * p_e );
591 VLC_PUBLIC_API void
592     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
593 VLC_PUBLIC_API void
594     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
595
596
597 VLC_PUBLIC_API void
598     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
599                                libvlc_exception_t * p_e );
600
601 VLC_PUBLIC_API void
602     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
603                                libvlc_exception_t * p_e );
604
605 VLC_PUBLIC_API libvlc_media_list_t *
606     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
607                                      libvlc_exception_t * p_e );
608
609
610 /** @} */
611
612 /*****************************************************************************
613  * Media List Player
614  *****************************************************************************/
615 /** defgroup libvlc_media_list_player MediaListPlayer
616  * \ingroup libvlc
617  * LibVLC Media List Player
618  * @{
619  */
620 VLC_PUBLIC_API libvlc_media_list_player_t *
621     libvlc_media_list_player_new( libvlc_instance_t * p_instance,
622                                   libvlc_exception_t * p_e );
623 VLC_PUBLIC_API void
624     libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
625
626 VLC_PUBLIC_API void
627     libvlc_media_list_player_set_media_instance(
628                                      libvlc_media_list_player_t * p_mlp,
629                                      libvlc_media_instance_t * p_mi,
630                                      libvlc_exception_t * p_e );
631
632 VLC_PUBLIC_API void
633     libvlc_media_list_player_set_media_list(
634                                      libvlc_media_list_player_t * p_mlp,
635                                      libvlc_media_list_t * p_mlist,
636                                      libvlc_exception_t * p_e );
637
638 VLC_PUBLIC_API void
639     libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
640                                    libvlc_exception_t * p_e );
641
642 VLC_PUBLIC_API void
643     libvlc_media_list_player_play_item_at_index(
644                                    libvlc_media_list_player_t * p_mlp,
645                                    int i_index,
646                                    libvlc_exception_t * p_e );
647
648 VLC_PUBLIC_API void
649     libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
650                                    libvlc_exception_t * p_e );
651 VLC_PUBLIC_API void
652     libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
653                                    libvlc_exception_t * p_e );
654
655 /** @} */
656
657 /** defgroup libvlc_video Video
658  * \ingroup libvlc
659  * LibVLC Video handling
660  * @{
661  */
662
663 /**
664  * Does this input have a video output ?
665  * \param p_input the input
666  * \param p_exception an initialized exception
667  */
668 VLC_PUBLIC_API vlc_bool_t  libvlc_input_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
669 VLC_PUBLIC_API float       libvlc_input_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
670
671 /**
672  * Toggle fullscreen status on video output
673  * \param p_input the input
674  * \param p_exception an initialized exception
675  */
676 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
677
678 /**
679  * Enable or disable fullscreen on a video output
680  * \param p_input the input
681  * \param b_fullscreen boolean for fullscreen status
682  * \param p_exception an initialized exception
683  */
684 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_instance_t *, int, libvlc_exception_t * );
685
686 /**
687  * Get current fullscreen status
688  * \param p_input the input
689  * \param p_exception an initialized exception
690  * \return the fullscreen status (boolean)
691  */
692 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
693
694 /**
695  * Get current video height
696  * \param p_input the input
697  * \param p_exception an initialized exception
698  * \return the video height
699  */
700 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_instance_t *, libvlc_exception_t * );
701
702 /**
703  * Get current video width
704  * \param p_input the input
705  * \param p_exception an initialized exception
706  * \return the video width
707  */
708 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_instance_t *, libvlc_exception_t * );
709
710 /**
711  * Get current video aspect ratio
712  * \param p_input the input
713  * \param p_exception an initialized exception
714  * \return the video aspect ratio
715  */
716 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_instance_t *, libvlc_exception_t * );
717
718 /**
719  * Set new video aspect ratio
720  * \param p_input the input
721  * \param psz_aspect new video aspect-ratio
722  * \param p_exception an initialized exception
723  */
724 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_instance_t *, char *, libvlc_exception_t * );
725
726 /**
727  * Get current video subtitle
728  * \param p_input the input
729  * \param p_exception an initialized exception
730  * \return the video subtitle selected
731  */
732 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_instance_t *, libvlc_exception_t * );
733
734 /**
735  * Set new video subtitle
736  * \param p_input the input
737  * \param i_spu new video subtitle to select
738  * \param p_exception an initialized exception
739  */
740 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_instance_t *, int , libvlc_exception_t * );
741
742 /**
743  * Get current crop filter geometry
744  * \param p_input the input
745  * \param p_exception an initialized exception
746  * \return the crop filter geometry
747  */
748 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_instance_t *, libvlc_exception_t * );
749
750 /**
751  * Set new crop filter geometry
752  * \param p_input the input
753  * \param psz_geometry new crop filter geometry
754  * \param p_exception an initialized exception
755  */
756 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_instance_t *, char *, libvlc_exception_t * );
757
758 /**
759  * Get current teletext page requested.
760  * \param p_input the input
761  * \param p_exception an initialized exception
762  * \return the current teletext page requested.
763  */
764 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
765
766 /**
767  * Set new teletext page to retrieve
768  * \param p_input the input
769  * \param i_page teletex page number requested
770  * \param p_exception an initialized exception
771  */
772 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, libvlc_exception_t * );
773
774 /**
775  * Take a snapshot of the current video window
776  * \param p_input the input
777  * \param psz_filepath the path where to save the screenshot to
778  * \param p_exception an initialized exception
779  */
780 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_instance_t *, char *, libvlc_exception_t * );
781
782 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_instance_t *, libvlc_exception_t *);
783
784 /**
785  * Resize the current video output window
786  * \param p_instance libvlc instance
787  * \param width new width for video output window
788  * \param height new height for video output window
789  * \param p_exception an initialized exception
790  * \return the success status (boolean)
791  */
792 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_instance_t *, int, int, libvlc_exception_t *);
793
794 /**
795  * change the parent for the current the video output
796  * \param p_instance libvlc instance
797  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
798  * \param p_exception an initialized exception
799  * \return the success status (boolean)
800  */
801 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
802
803 /**
804  * Tell windowless video output to redraw rectangular area (MacOS X only)
805  * \param p_instance libvlc instance
806  * \param area coordinates within video drawable
807  * \param p_exception an initialized exception
808  */
809 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_instance_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
810
811 /**
812  * Set the default video output parent
813  *  this settings will be used as default for all video outputs
814  * \param p_instance libvlc instance
815  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
816  * \param p_exception an initialized exception
817  */
818 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
819
820 /**
821  * Set the default video output parent
822  *  this settings will be used as default for all video outputs
823  * \param p_instance libvlc instance
824  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
825  * \param p_exception an initialized exception
826  */
827 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
828
829 /**
830  * Set the default video output size
831  *  this settings will be used as default for all video outputs
832  * \param p_instance libvlc instance
833  * \param width new width for video drawable
834  * \param height new height for video drawable
835  * \param p_exception an initialized exception
836  */
837 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
838
839 /**
840  * Set the default video output viewport for a windowless video output (MacOS X only)
841  *  this settings will be used as default for all video outputs
842  * \param p_instance libvlc instance
843  * \param view coordinates within video drawable
844  * \param clip coordinates within video drawable
845  * \param p_exception an initialized exception
846  */
847 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
848
849 /** @} */
850
851 /** defgroup libvlc_audio Audio
852  * \ingroup libvlc
853  * LibVLC Audio handling
854  * @{
855  */
856
857 /**
858  * Toggle mute status
859  * \param p_instance libvlc instance
860  * \param p_exception an initialized exception
861  * \return void
862  */
863 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
864
865 /**
866  * Get current mute status
867  * \param p_instance libvlc instance
868  * \param p_exception an initialized exception
869  * \return the mute status (boolean)
870  */
871 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
872
873 /**
874  * Set mute status
875  * \param p_instance libvlc instance
876  * \param status If status is VLC_TRUE then mute, otherwise unmute
877  * \param p_exception an initialized exception
878  * \return void
879  */
880 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
881
882 /**
883  * Get current audio level
884  * \param p_instance libvlc instance
885  * \param p_exception an initialized exception
886  * \return the audio level (int)
887  */
888 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
889
890 /**
891  * Set current audio level
892  * \param p_instance libvlc instance
893  * \param i_volume the volume (int)
894  * \param p_exception an initialized exception
895  */
896 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
897
898 /**
899 +  * Get current audio track
900 +  * \param p_input input instance
901 +  * \param p_exception an initialized exception
902 +  * \return the audio track (int)
903 +  */
904 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_instance_t *, libvlc_exception_t * );
905
906 /**
907  * Set current audio track
908  * \param p_input input instance
909  * \param i_track the track (int)
910  * \param p_exception an initialized exception
911  */
912 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_instance_t *, int, libvlc_exception_t * );
913
914 /**
915  * Get current audio channel
916  * \param p_instance input instance
917  * \param p_exception an initialized exception
918  * \return the audio channel (int)
919  */
920 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
921
922 /**
923  * Set current audio channel
924  * \param p_instance input instance
925  * \param i_channel the audio channel (int)
926  * \param p_exception an initialized exception
927  */
928 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
929
930 /** @} */
931
932 /*****************************************************************************
933  * Services/Media Discovery
934  *****************************************************************************/
935 /** defgroup libvlc_media_discoverer Media Discoverer
936  * \ingroup libvlc
937  * LibVLC Media Discoverer
938  * @{
939  */
940
941 VLC_PUBLIC_API libvlc_media_discoverer_t *
942 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
943                                        const char * psz_name,
944                                        libvlc_exception_t * p_e );
945 VLC_PUBLIC_API void   libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
946 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
947
948 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
949
950 /**@} */
951
952 /*****************************************************************************
953  * VLM
954  *****************************************************************************/
955 /** defgroup libvlc_vlm VLM
956  * \ingroup libvlc
957  * LibVLC VLM
958  * @{
959  */
960
961 /**
962  * Add a broadcast, with one input
963  * \param p_instance the instance
964  * \param psz_name the name of the new broadcast
965  * \param psz_input the input MRL
966  * \param psz_output the output MRL (the parameter to the "sout" variable)
967  * \param i_options number of additional options
968  * \param ppsz_options additional options
969  * \param b_enabled boolean for enabling the new broadcast
970  * \param b_loop Should this broadcast be played in loop ?
971  * \param p_exception an initialized exception
972  */
973 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
974                                               int, char **, int, int, libvlc_exception_t * );
975
976 /**
977  * Delete a media (vod or broadcast)
978  * \param p_instance the instance
979  * \param psz_name the media to delete
980  * \param p_exception an initialized exception
981  */
982 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
983
984 /**
985  * Enable or disable a media (vod or broadcast)
986  * \param p_instance the instance
987  * \param psz_name the media to work on
988  * \param b_enabled the new status
989  * \param p_exception an initialized exception
990  */
991 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
992                                             libvlc_exception_t *);
993
994 /**
995  * Set the output for a media
996  * \param p_instance the instance
997  * \param psz_name the media to work on
998  * \param psz_output the output MRL (the parameter to the "sout" variable)
999  * \param p_exception an initialized exception
1000  */
1001 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
1002                                            libvlc_exception_t *);
1003
1004 /**
1005  * Set a media's input MRL. This will delete all existing inputs and
1006  * add the specified one.
1007  * \param p_instance the instance
1008  * \param psz_name the media to work on
1009  * \param psz_input the input MRL
1010  * \param p_exception an initialized exception
1011  */
1012 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
1013                                           libvlc_exception_t *);
1014
1015 /**
1016  * Add a media's input MRL. This will add the specified one.
1017  * \param p_instance the instance
1018  * \param psz_name the media to work on
1019  * \param psz_input the input MRL
1020  * \param p_exception an initialized exception
1021  */
1022 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
1023                                           libvlc_exception_t *p_exception );
1024 /**
1025  * Set output for a media
1026  * \param p_instance the instance
1027  * \param psz_name the media to work on
1028  * \param b_loop the new status
1029  * \param p_exception an initialized exception
1030  */
1031 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
1032                                          libvlc_exception_t *);
1033
1034 /**
1035  * Edit the parameters of a media. This will delete all existing inputs and
1036  * add the specified one.
1037  * \param p_instance the instance
1038  * \param psz_name the name of the new broadcast
1039  * \param psz_input the input MRL
1040  * \param psz_output the output MRL (the parameter to the "sout" variable)
1041  * \param i_options number of additional options
1042  * \param ppsz_options additional options
1043  * \param b_enabled boolean for enabling the new broadcast
1044  * \param b_loop Should this broadcast be played in loop ?
1045  * \param p_exception an initialized exception
1046  */
1047 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
1048                                              int, char **, int, int, libvlc_exception_t * );
1049
1050 /**
1051  * Plays the named broadcast.
1052  * \param p_instance the instance
1053  * \param psz_name the name of the broadcast
1054  * \param p_exception an initialized exception
1055  */
1056 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1057
1058 /**
1059  * Stops the named broadcast.
1060  * \param p_instance the instance
1061  * \param psz_name the name of the broadcast
1062  * \param p_exception an initialized exception
1063  */ 
1064 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1065
1066 /**
1067  * Pauses the named broadcast.
1068  * \param p_instance the instance
1069  * \param psz_name the name of the broadcast
1070  * \param p_exception an initialized exception
1071  */ 
1072 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1073     
1074 /**
1075  * Seeks in the named broadcast.
1076  * \param p_instance the instance
1077  * \param psz_name the name of the broadcast
1078  * \param f_percentage the percentage to seek to
1079  * \param p_exception an initialized exception
1080  */ 
1081 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
1082                                            float, libvlc_exception_t * );
1083    
1084 /**
1085  * Return information of the named broadcast.
1086  * \param p_instance the instance
1087  * \param psz_name the name of the broadcast
1088  * \param p_exception an initialized exception
1089  */ 
1090 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1091
1092 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
1093 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
1094                         char *, int , libvlc_exception_t * );
1095
1096 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
1097 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
1098 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
1099 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
1100 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
1101 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
1102 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
1103
1104 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
1105
1106 /** @} */
1107
1108 /*****************************************************************************
1109  * Message log handling
1110  *****************************************************************************/
1111
1112 /** defgroup libvlc_log Log
1113  * \ingroup libvlc
1114  * LibVLC Message Logging
1115  * @{
1116  */
1117
1118 /**
1119  * Returns the VLC messaging verbosity level
1120  * \param p_instance libvlc instance
1121  * \param exception an initialized exception pointer
1122  */
1123 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
1124                                                   libvlc_exception_t *p_e );
1125
1126 /**
1127  * Set the VLC messaging verbosity level
1128  * \param p_log libvlc log instance
1129  * \param exception an initialized exception pointer
1130  */
1131 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
1132                                               libvlc_exception_t *p_e );
1133
1134 /**
1135  * Open an instance to VLC message log 
1136  * \param p_instance libvlc instance
1137  * \param exception an initialized exception pointer
1138  */
1139 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
1140
1141 /**
1142  * Close an instance of VLC message log 
1143  * \param p_log libvlc log instance
1144  * \param exception an initialized exception pointer
1145  */
1146 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
1147
1148 /**
1149  * Returns the number of messages in log
1150  * \param p_log libvlc log instance
1151  * \param exception an initialized exception pointer
1152  */
1153 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
1154
1155 /**
1156  * Clear all messages in log
1157  *  the log should be cleared on a regular basis to avoid clogging
1158  * \param p_log libvlc log instance
1159  * \param exception an initialized exception pointer
1160  */
1161 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
1162
1163 /**
1164  * Allocate and returns a new iterator to messages in log
1165  * \param p_log libvlc log instance
1166  * \param exception an initialized exception pointer
1167  */
1168 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
1169
1170 /**
1171  * Releases a previoulsy allocated iterator
1172  * \param p_log libvlc log iterator 
1173  * \param exception an initialized exception pointer
1174  */
1175 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1176
1177 /**
1178  * Returns whether log iterator has more messages 
1179  * \param p_log libvlc log iterator
1180  * \param exception an initialized exception pointer
1181  */
1182 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1183
1184 /**
1185  * Returns next log message
1186  *   the content of message must not be freed
1187  * \param p_log libvlc log iterator
1188  * \param exception an initialized exception pointer
1189  */
1190 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1191                                                                struct libvlc_log_message_t *buffer,
1192                                                                libvlc_exception_t *p_e );
1193
1194 /** @} */
1195
1196 /*****************************************************************************
1197  * Event handling
1198  *****************************************************************************/
1199
1200 /** defgroup libvlc_callbacks Callbacks
1201  * \ingroup libvlc
1202  * LibVLC Events
1203  * @{
1204  */
1205
1206 /**
1207  * Register for an event notification
1208  * \param p_event_manager the event manager to which you want to attach to
1209  * Generally it is obtained by vlc_my_object_event_manager() where my_object
1210  * Is the object you want to listen to.
1211  * \param i_event_type the desired event to which we want to listen
1212  * \param f_callback the function to call when i_event_type occurs
1213  * \param user_data user provided data to carry with the event
1214  * \param p_e an initialized exception pointer
1215  */
1216 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
1217                                          libvlc_event_type_t i_event_type,
1218                                          libvlc_callback_t f_callback,
1219                                          void *user_data,
1220                                          libvlc_exception_t *p_e );
1221
1222 /**
1223  * Unregister an event notification
1224  * \param p_event_manager the event manager
1225  * \param i_event_type the desired event to which we want to unregister
1226  * \param f_callback the function to call when i_event_type occurs
1227  * \param p_e an initialized exception pointer
1228  */
1229 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
1230                                          libvlc_event_type_t i_event_type,
1231                                          libvlc_callback_t f_callback,
1232                                          void *p_user_data,
1233                                          libvlc_exception_t *p_e );
1234
1235
1236 /**
1237  * Get an event type name 
1238  * \param i_event_type the desired event
1239  */
1240 #define libvlc_event_type_name(a) #a
1241
1242 /** @} */
1243
1244
1245 # ifdef __cplusplus
1246 }
1247 # endif
1248
1249 #endif /* <vlc/libvlc.h> */