]> git.sesse.net Git - vlc/blob - include/vlc/deprecated.h
Added libvlc_playlist_add_extended_untrusted and libvlc_media_add_option_untrusted.
[vlc] / include / vlc / deprecated.h
1 /*****************************************************************************
2  * deprecated.h:  libvlc deprecated API
3  *****************************************************************************
4  * Copyright (C) 1998-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman@videolan.org>
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 #ifndef LIBVLC_DEPRECATED_H
26 #define LIBVLC_DEPRECATED_H 1
27
28 /**
29  * \file
30  * This file defines libvlc depreceated API
31  */
32
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36
37 /**
38  * Set the default video output's parent.
39  *
40  * This setting will be used as default for all video outputs.
41  *
42  * \param p_instance libvlc instance
43  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
44  * \param p_e an initialized exception pointer
45  * @deprecated Use libvlc_media_player_set_drawable
46  */
47 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
48
49 /**
50  * Set the default video output parent.
51  *
52  * This setting will be used as default for all video outputs.
53  *
54  * \param p_instance libvlc instance
55  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
56  * \param p_e an initialized exception pointer
57  * @deprecated Use libvlc_media_player_get_drawable
58  */
59 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
60
61 /*
62  * This function shall not be used at all. It may lead to crash and race condition.
63  */
64 VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
65
66 /*****************************************************************************
67  * Playlist (Deprecated)
68  *****************************************************************************/
69 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
70  * \ingroup libvlc
71  * LibVLC Playlist handling (Deprecated)
72  * @deprecated Use media_list
73  * @{
74  */
75
76 /**
77  * Set the playlist's loop attribute. If set, the playlist runs continuously
78  * and wraps around when it reaches the end.
79  *
80  * \param p_instance the playlist instance
81  * \param loop the loop attribute. 1 sets looping, 0 disables it
82  * \param p_e an initialized exception pointer
83  */
84 VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
85                                           libvlc_exception_t * );
86
87 /**
88  * Start playing.
89  *
90  * Additionnal playlist item options can be specified for addition to the
91  * item before it is played.
92  *
93  * \param p_instance the playlist instance
94  * \param i_id the item to play. If this is a negative number, the next
95  *        item will be selected. Otherwise, the item with the given ID will be
96  *        played
97  * \param i_options the number of options to add to the item
98  * \param ppsz_options the options to add to the item
99  * \param p_e an initialized exception pointer
100  */
101 VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
102                                           char **, libvlc_exception_t * );
103
104 /**
105  * Toggle the playlist's pause status.
106  *
107  * If the playlist was running, it is paused. If it was paused, it is resumed.
108  *
109  * \param p_instance the playlist instance to pause
110  * \param p_e an initialized exception pointer
111  */
112 VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
113                                            libvlc_exception_t * );
114
115 /**
116  * Checks whether the playlist is running
117  *
118  * \param p_instance the playlist instance
119  * \param p_e an initialized exception pointer
120  * \return 0 if the playlist is stopped or paused, 1 if it is running
121  */
122 VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
123                                               libvlc_exception_t * );
124
125 /**
126  * Get the number of items in the playlist
127  *
128  * \param p_instance the playlist instance
129  * \param p_e an initialized exception pointer
130  * \return the number of items
131  */
132 VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
133                                                 libvlc_exception_t * );
134
135 VLC_DEPRECATED_API int libvlc_playlist_get_current_index( libvlc_instance_t *,
136                                                  libvlc_exception_t *);
137 /**
138  * Lock the playlist.
139  *
140  * \param p_instance the playlist instance
141  */
142 VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
143
144 /**
145  * Unlock the playlist.
146  *
147  * \param p_instance the playlist instance
148  */
149 VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
150
151 /**
152  * Stop playing.
153  *
154  * \param p_instance the playlist instance to stop
155  * \param p_e an initialized exception pointer
156  */
157 VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
158                                           libvlc_exception_t * );
159
160 /**
161  * Go to the next playlist item. If the playlist was stopped, playback
162  * is started.
163  *
164  * \param p_instance the playlist instance
165  * \param p_e an initialized exception pointer
166  */
167 VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
168                                           libvlc_exception_t * );
169
170 /**
171  * Go to the previous playlist item. If the playlist was stopped, playback
172  * is started.
173  *
174  * \param p_instance the playlist instance
175  * \param p_e an initialized exception pointer
176  */
177 VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
178                                           libvlc_exception_t * );
179
180 /**
181  * Empty a playlist. All items in the playlist are removed.
182  *
183  * \param p_instance the playlist instance
184  * \param p_e an initialized exception pointer
185  */
186 VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
187                                            libvlc_exception_t * );
188
189 /**
190  * Append an item to the playlist. The item is added at the end. If more
191  * advanced options are required, \see libvlc_playlist_add_extended instead.
192  *
193  * \param p_instance the playlist instance
194  * \param psz_uri the URI to open, using VLC format
195  * \param psz_name a name that you might want to give or NULL
196  * \param p_e an initialized exception pointer
197  * \return the identifier of the new item
198  */
199 VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
200                                         const char *, libvlc_exception_t * );
201
202 /**
203  * Append an item to the playlist. The item is added at the end, with
204  * additional input options.
205  *
206  * \param p_instance the playlist instance
207  * \param psz_uri the URI to open, using VLC format
208  * \param psz_name a name that you might want to give or NULL
209  * \param i_options the number of options to add
210  * \param ppsz_options strings representing the options to add
211  * \param p_e an initialized exception pointer
212  * \return the identifier of the new item
213  */
214 VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
215                                                  const char *, int, const char **,
216                                                  libvlc_exception_t * );
217
218 /**
219  * Append an item to the playlist. The item is added at the end, with
220  * additional input options from an untrusted source.
221  *
222  * \param p_instance the playlist instance
223  * \param psz_uri the URI to open, using VLC format
224  * \param psz_name a name that you might want to give or NULL
225  * \param i_options the number of options to add
226  * \param ppsz_options strings representing the options to add
227  * \param p_e an initialized exception pointer
228  * \return the identifier of the new item
229  */
230 VLC_DEPRECATED_API int libvlc_playlist_add_extended_untrusted( libvlc_instance_t *, const char *,
231                                                  const char *, int, const char **,
232                                                  libvlc_exception_t * );
233
234 /**
235  * Delete the playlist item with the given ID.
236  *
237  * \param p_instance the playlist instance
238  * \param i_id the id to remove
239  * \param p_e an initialized exception pointer
240  * \return 0 in case of success, a non-zero value otherwise
241  */
242 VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
243                                                 libvlc_exception_t * );
244
245 /** Get the input that is currently being played by the playlist.
246  *
247  * \param p_instance the playlist instance to use
248  * \param p_e an initialized exception pointern
249  * \return a media instance object
250  */
251 VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
252                                 libvlc_instance_t *, libvlc_exception_t * );
253
254 /** @}*/
255
256 # ifdef __cplusplus
257 }
258 # endif
259
260 #endif /* _LIBVLC_DEPRECATED_H */