qt: medialib: define a super-type for list items
[vlc.git] / include / vlc_playlist_export.h
blobd4cf0ce7290ae381385d16269b8c8e2f79985b1a
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 */
28 /**
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;
35 /**
36 * Return the number of items in the view.
38 * The underlying playlist must be locked.
40 * \param view the playlist view
42 VLC_API size_t
43 vlc_playlist_view_Count(struct vlc_playlist_view *view);
45 /**
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);
59 /**
60 * Structure received by playlist export module.
62 struct vlc_playlist_export
64 struct vlc_object_t obj;
65 char *base_url;
66 FILE *file;
67 struct vlc_playlist_view *playlist_view;
70 #endif