1 /*****************************************************************************
2 * libvlc_media_list.h: libvlc_media_list API
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
7 * Authors: Pierre d'Herbemont
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.
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.
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 *****************************************************************************/
24 #ifndef LIBVLC_MEDIA_LIST_VIEW_H
25 #define LIBVLC_MEDIA_LIST_VIEW_H 1
29 * This file defines libvlc_media_list API
36 /*****************************************************************************
38 *****************************************************************************/
39 /** \defgroup libvlc_media_list_view libvlc_media_list_view
41 * LibVLC Media List View, represent a media_list using a different layout
45 * Retain reference to a media list view
47 * \param p_mlv a media list view created with libvlc_media_list_view_new()
50 libvlc_media_list_view_retain( libvlc_media_list_view_t * p_mlv );
53 * Release reference to a media list view. If the refcount reaches 0, then
54 * the object will be released.
56 * \param p_mlv a media list view created with libvlc_media_list_view_new()
59 libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv );
62 * Get libvlc_event_manager from this media list view instance.
63 * The p_event_manager is immutable, so you don't have to hold the lock
65 * \param p_mlv a media list view instance
66 * \return libvlc_event_manager
68 VLC_PUBLIC_API libvlc_event_manager_t *
69 libvlc_media_list_view_event_manager( libvlc_media_list_view_t * p_mlv );
72 * Get count on media list view items
74 * \param p_mlv a media list view instance
75 * \param p_e initialized exception object
76 * \return number of items in media list view
79 libvlc_media_list_view_count( libvlc_media_list_view_t * p_mlv,
80 libvlc_exception_t * p_e );
83 * List media instance in media list view at an index position
85 * \param p_mlv a media list view instance
86 * \param i_index index position in array where to insert
87 * \param p_e initialized exception object
88 * \return media instance at position i_pos and libvlc_media_retain() has been called to increase the refcount on this object.
90 VLC_PUBLIC_API libvlc_media_t *
91 libvlc_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv,
93 libvlc_exception_t * p_e );
95 VLC_PUBLIC_API libvlc_media_list_view_t *
96 libvlc_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
98 libvlc_exception_t * p_e );
100 VLC_PUBLIC_API libvlc_media_list_view_t *
101 libvlc_media_list_view_children_for_item( libvlc_media_list_view_t * p_mlv,
102 libvlc_media_t * p_md,
103 libvlc_exception_t * p_e );
106 * Get index position of media instance in media list view.
107 * The function will return the first occurence.
109 * \param p_mlv a media list view instance
110 * \param p_md media instance
111 * \param p_e initialized exception object
112 * \return index position in array of p_md
115 libvlc_media_list_view_index_of_item( libvlc_media_list_view_t * p_mlv,
116 libvlc_media_t * p_md,
117 libvlc_exception_t * p_e );
120 * Insert media instance in media list view at index position
122 * \param p_mlv a media list view instance
123 * \param p_md media instance
124 * \param index position in array where to insert
125 * \param p_e initialized exception object
128 libvlc_media_list_view_insert_at_index( libvlc_media_list_view_t * p_mlv,
129 libvlc_media_t * p_md,
131 libvlc_exception_t * p_e );
134 * Remove media instance in media list view from index position
136 * \param p_mlv a media list view instance
137 * \param index position in array of media instance to remove
138 * \param p_e initialized exception object
141 libvlc_media_list_view_remove_at_index( libvlc_media_list_view_t * p_mlv,
143 libvlc_exception_t * p_e );
146 libvlc_media_list_view_add_item( libvlc_media_list_view_t * p_mlv,
147 libvlc_media_t * p_md,
148 libvlc_exception_t * p_e );
150 VLC_PUBLIC_API libvlc_media_list_t *
151 libvlc_media_list_view_parent_media_list( libvlc_media_list_view_t * p_mlv,
152 libvlc_exception_t * p_e );
154 /** @} media_list_view */
160 #endif /* LIBVLC_MEDIA_LIST_VIEW_H */