]> git.sesse.net Git - vlc/blobdiff - src/control/hierarchical_node_media_list_view.c
libvlc: Split libvlc_internal in different independant headers.
[vlc] / src / control / hierarchical_node_media_list_view.c
index 40f48ce149d787ff9c916126ffc131e3bd6926b2..fed48995bca17c45ce350cbe467f88d7a0d1ea1d 100644 (file)
  * 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
  */
@@ -153,13 +152,13 @@ index_of_item( libvlc_media_list_view_t * p_mlv, libvlc_media_t * p_md )
     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;
@@ -203,7 +202,7 @@ media_list_item_added( const libvlc_event_t * p_event, void * user_data )
     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 );
                          
 }
@@ -230,7 +229,7 @@ media_list_item_deleted( const libvlc_event_t * p_event, void * user_data )
     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