* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#include "libvlc_internal.h"
#include <vlc/libvlc.h>
-#include <assert.h>
-#include "vlc_arrays.h"
+#include <vlc/libvlc_media.h>
+#include <vlc/libvlc_media_list.h>
+#include <vlc/libvlc_media_list_view.h>
+
+#include "media_internal.h" // Abuse, could ans should be removed
+#include "media_list_internal.h" // Abuse, could ans should be removed
+#include "media_list_view_internal.h"
/* FIXME: This version is probably a bit overheaded, and we may want to store
* the items in a vlc_array_t to speed everything up */
# define trace( ... ) {}
#endif
-struct libvlc_media_list_view_private_t
-{
- vlc_array_t array;
-};
-
/*
* Private functions
*/
return -1;
}
-static vlc_bool_t
+static bool
item_is_already_added( libvlc_media_t * p_md )
{
libvlc_media_list_t * p_submlist;
p_submlist = libvlc_media_subitems( p_md, NULL );
- if( !p_submlist ) return VLC_FALSE;
+ if( !p_submlist ) return false;
int count = libvlc_media_list_count( p_submlist, NULL );
libvlc_media_list_release( p_submlist );
return count > 1;
trace("%d\n", index);
if( index >= 0)
libvlc_media_list_view_item_added( p_mlv, p_md, index );
- libvlc_event_attach( p_md->p_event_manager, libvlc_MediaDescriptorSubItemAdded,
+ libvlc_event_attach( p_md->p_event_manager, libvlc_MediaSubItemAdded,
items_subitems_added, p_mlv, NULL );
}
trace("%d\n", index);
if( index >= 0)
libvlc_media_list_view_item_deleted( p_mlv, p_md, index );
- libvlc_event_detach( p_md->p_event_manager, libvlc_MediaDescriptorSubItemAdded,
+ libvlc_event_detach( p_md->p_event_manager, libvlc_MediaSubItemAdded,
items_subitems_added, p_mlv, NULL );
}
static void