1 /*****************************************************************************
2 * vlc_playlist_export.h
3 *****************************************************************************
4 * Copyright (C) 2019 VLC authors and VideoLAN
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifndef VLC_PLAYLIST_EXPORT_H
22 #define VLC_PLAYLIST_EXPORT_H
24 #include <vlc_playlist.h>
26 /** API for playlist export modules */
29 * Opaque structure giving a read-only view of a playlist.
31 * The view is only valid until the playlist lock is released.
33 struct vlc_playlist_view
;
36 * Return the number of items in the view.
38 * The underlying playlist must be locked.
40 * \param view the playlist view
43 vlc_playlist_view_Count(struct vlc_playlist_view
*view
);
46 * Return the item at a given index.
48 * The index must be in range (less than vlc_playlist_view_Count()).
50 * The underlying playlist must be locked.
52 * \param view the playlist view
53 * \param index the index
54 * \return the playlist item
56 VLC_API vlc_playlist_item_t
*
57 vlc_playlist_view_Get(struct vlc_playlist_view
*view
, size_t index
);
60 * Structure received by playlist export module.
62 struct vlc_playlist_export
64 struct vlc_object_t obj
;
67 struct vlc_playlist_view
*playlist_view
;