include/vlc: Headers clean up.
[vlc.git] / include / vlc / libvlc_media_list.h
1 /*****************************************************************************
2  * libvlc_media_list.h:  libvlc_media_list API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Pierre d'Herbemont
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_MEDIA_LIST_H
25 #define _LIBVLC_MEDIA_LIST_H 1
26
27 # ifdef __cplusplus
28 extern "C" {
29 # endif
30
31 /*****************************************************************************
32  * Media List
33  *****************************************************************************/
34 /** defgroup libvlc_media_list MediaList
35  * \ingroup libvlc
36  * LibVLC Media List, a media list holds multiple media descriptors
37  * @{
38  */
39
40 /**
41  * Create an empty media list.
42  *
43  * \param p_libvlc the event manager
44  * \param i_event_type the desired event to which we want to unregister
45  * \param f_callback the function to call when i_event_type occurs
46  * \param p_e an initialized exception pointer
47  */
48
49 VLC_PUBLIC_API libvlc_media_list_t *
50     libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
51
52 VLC_PUBLIC_API void
53     libvlc_media_list_release( libvlc_media_list_t * );
54
55 VLC_PUBLIC_API void
56     libvlc_media_list_retain( libvlc_media_list_t * );
57
58 VLC_DEPRECATED_API void
59     libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
60                                         const char * psz_uri,
61                                         libvlc_exception_t * p_e );
62
63 VLC_PUBLIC_API void
64     libvlc_media_list_set_media_descriptor( libvlc_media_list_t *,
65                                             libvlc_media_descriptor_t *,
66                                             libvlc_exception_t *);
67
68 VLC_PUBLIC_API libvlc_media_descriptor_t *
69     libvlc_media_list_media_descriptor( libvlc_media_list_t *,
70                                         libvlc_exception_t *);
71
72 VLC_PUBLIC_API void
73     libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
74                                             libvlc_media_descriptor_t *,
75                                             libvlc_exception_t * );
76 VLC_PUBLIC_API void
77     libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
78                                                libvlc_media_descriptor_t *,
79                                                int,
80                                                libvlc_exception_t * );
81 VLC_PUBLIC_API void
82     libvlc_media_list_remove_index( libvlc_media_list_t *, int,
83                                     libvlc_exception_t * );
84
85 VLC_PUBLIC_API int
86     libvlc_media_list_count( libvlc_media_list_t * p_mlist,
87                              libvlc_exception_t * p_e );
88
89 VLC_PUBLIC_API libvlc_media_descriptor_t *
90     libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
91                                      libvlc_exception_t * );
92 VLC_PUBLIC_API int
93     libvlc_media_list_index_of_item( libvlc_media_list_t *,
94                                      libvlc_media_descriptor_t *,
95                                      libvlc_exception_t * );
96
97 /* This indicates if this media list is read-only from a user point of view */
98 VLC_PUBLIC_API int
99     libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist );
100
101 VLC_PUBLIC_API void
102     libvlc_media_list_lock( libvlc_media_list_t * );
103 VLC_PUBLIC_API void
104     libvlc_media_list_unlock( libvlc_media_list_t * );
105
106 VLC_PUBLIC_API libvlc_media_list_view_t *
107     libvlc_media_list_flat_view( libvlc_media_list_t *,
108                                  libvlc_exception_t * );
109
110 VLC_PUBLIC_API libvlc_media_list_view_t *
111     libvlc_media_list_hierarchical_view( libvlc_media_list_t *,
112                                          libvlc_exception_t * );
113
114 VLC_PUBLIC_API libvlc_media_list_view_t *
115     libvlc_media_list_hierarchical_node_view( libvlc_media_list_t *,
116                                               libvlc_exception_t * );
117
118 VLC_PUBLIC_API libvlc_event_manager_t *
119     libvlc_media_list_event_manager( libvlc_media_list_t *,
120                                      libvlc_exception_t * );
121
122 /*****************************************************************************
123  * Media List View
124  *****************************************************************************/
125 /** defgroup libvlc_media_list_view MediaListView
126  * \ingroup libvlc_media_list
127  * LibVLC Media List View, represent a media_list using a different layout
128  * @{ */
129
130 VLC_PUBLIC_API void
131     libvlc_media_list_view_retain( libvlc_media_list_view_t * p_mlv );
132
133 VLC_PUBLIC_API void
134     libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv );
135
136 VLC_PUBLIC_API libvlc_event_manager_t *
137     libvlc_media_list_view_event_manager(  libvlc_media_list_view_t * p_mlv );
138
139 VLC_PUBLIC_API int
140     libvlc_media_list_view_count(  libvlc_media_list_view_t * p_mlv,
141                                    libvlc_exception_t * p_e );
142
143 VLC_PUBLIC_API libvlc_media_descriptor_t *
144     libvlc_media_list_view_item_at_index(  libvlc_media_list_view_t * p_mlv,
145                                            int index,
146                                            libvlc_exception_t * p_e );
147
148 VLC_PUBLIC_API libvlc_media_list_view_t *
149     libvlc_media_list_view_children_at_index(  libvlc_media_list_view_t * p_mlv,
150                                            int index,
151                                            libvlc_exception_t * p_e );
152
153 VLC_PUBLIC_API libvlc_media_list_view_t *
154     libvlc_media_list_view_children_for_item(  libvlc_media_list_view_t * p_mlv,
155                                            libvlc_media_descriptor_t * p_md,
156                                            libvlc_exception_t * p_e );
157
158
159 VLC_PUBLIC_API int
160     libvlc_media_list_view_index_of_item(  libvlc_media_list_view_t * p_mlv,
161                                            libvlc_media_descriptor_t * p_md,
162                                            libvlc_exception_t * p_e );
163
164 VLC_PUBLIC_API void
165     libvlc_media_list_view_insert_at_index(  libvlc_media_list_view_t * p_mlv,
166                                              libvlc_media_descriptor_t * p_md,
167                                              int index,
168                                              libvlc_exception_t * p_e );
169
170 VLC_PUBLIC_API void
171     libvlc_media_list_view_remove_at_index(  libvlc_media_list_view_t * p_mlv,
172                                              int index,
173                                              libvlc_exception_t * p_e );
174
175 VLC_PUBLIC_API void
176     libvlc_media_list_view_add_item(  libvlc_media_list_view_t * p_mlv,
177                                       libvlc_media_descriptor_t * p_md,
178                                       libvlc_exception_t * p_e );
179
180 VLC_PUBLIC_API libvlc_media_list_t *
181     libvlc_media_list_view_parent_media_list(  libvlc_media_list_view_t * p_mlv,
182                                                libvlc_exception_t * p_e );
183
184 /** @} media_list_view */
185
186 /*****************************************************************************
187  * Media List Player
188  *****************************************************************************/
189 /** defgroup libvlc_media_list_player MediaListPlayer
190  * \ingroup libvlc
191  * LibVLC Media List Player, play a media_list. You can see that as a media
192  * instance subclass
193  * @{
194  */
195 VLC_PUBLIC_API libvlc_media_list_player_t *
196     libvlc_media_list_player_new( libvlc_instance_t * p_instance,
197                                   libvlc_exception_t * p_e );
198 VLC_PUBLIC_API void
199     libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
200
201 VLC_PUBLIC_API void
202     libvlc_media_list_player_set_media_instance(
203                                      libvlc_media_list_player_t * p_mlp,
204                                      libvlc_media_instance_t * p_mi,
205                                      libvlc_exception_t * p_e );
206
207 VLC_PUBLIC_API void
208     libvlc_media_list_player_set_media_list(
209                                      libvlc_media_list_player_t * p_mlp,
210                                      libvlc_media_list_t * p_mlist,
211                                      libvlc_exception_t * p_e );
212
213 VLC_PUBLIC_API void
214     libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
215                                    libvlc_exception_t * p_e );
216
217 VLC_PUBLIC_API void
218     libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
219                                    libvlc_exception_t * p_e );
220
221 VLC_PUBLIC_API int
222     libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp,
223                                          libvlc_exception_t * p_e );
224
225 VLC_PUBLIC_API libvlc_state_t
226     libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp,
227                                         libvlc_exception_t * p_e );
228
229 VLC_PUBLIC_API void
230     libvlc_media_list_player_play_item_at_index(
231                                    libvlc_media_list_player_t * p_mlp,
232                                    int i_index,
233                                    libvlc_exception_t * p_e );
234
235 VLC_PUBLIC_API void
236     libvlc_media_list_player_play_item(
237                                    libvlc_media_list_player_t * p_mlp,
238                                    libvlc_media_descriptor_t * p_md,
239                                    libvlc_exception_t * p_e );
240
241 VLC_PUBLIC_API void
242     libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
243                                    libvlc_exception_t * p_e );
244
245 VLC_PUBLIC_API void
246     libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
247                                    libvlc_exception_t * p_e );
248
249 /** @} media_list_player */
250
251 /** @} media_list */
252
253 # ifdef __cplusplus
254 }
255 # endif
256
257 #endif /* _LIBVLC_MEDIA_LIST_H */