Commit d71d800d authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

src/control: Implement libvlc_media_list_view_children_at_index.

parent 14051791
...@@ -555,6 +555,12 @@ VLC_PUBLIC_API libvlc_media_descriptor_t * ...@@ -555,6 +555,12 @@ VLC_PUBLIC_API libvlc_media_descriptor_t *
int index, int index,
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
VLC_PUBLIC_API libvlc_media_list_view_t *
libvlc_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
int index,
libvlc_exception_t * p_e );
VLC_PUBLIC_API int VLC_PUBLIC_API int
libvlc_media_list_view_index_of_item( libvlc_media_list_view_t * p_mlv, libvlc_media_list_view_index_of_item( libvlc_media_list_view_t * p_mlv,
libvlc_media_descriptor_t * p_md, libvlc_media_descriptor_t * p_md,
......
...@@ -73,6 +73,18 @@ flat_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv, ...@@ -73,6 +73,18 @@ flat_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv,
return p_md; return p_md;
} }
/**************************************************************************
* flat_media_list_view_item_at_index (private)
* (called by flat_media_list_view_item_at_index)
**************************************************************************/
static libvlc_media_list_view_t *
flat_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
int index,
libvlc_exception_t * p_e )
{
return NULL;
}
/************************************************************************** /**************************************************************************
* flat_media_list_view_release (private) * flat_media_list_view_release (private)
* (called by media_list_view_release) * (called by media_list_view_release)
...@@ -104,6 +116,7 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist, ...@@ -104,6 +116,7 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist,
p_mlv = libvlc_media_list_view_new( p_mlist, p_mlv = libvlc_media_list_view_new( p_mlist,
flat_media_list_view_count, flat_media_list_view_count,
flat_media_list_view_item_at_index, flat_media_list_view_item_at_index,
flat_media_list_view_children_at_index,
flat_media_list_view_release, flat_media_list_view_release,
p_this_view_data, p_this_view_data,
p_e ); p_e );
......
...@@ -117,12 +117,18 @@ struct libvlc_media_list_t ...@@ -117,12 +117,18 @@ struct libvlc_media_list_t
typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ; typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ;
typedef int (*libvlc_media_list_view_count_func_t)( struct libvlc_media_list_view_t * p_mlv, typedef int (*libvlc_media_list_view_count_func_t)( libvlc_media_list_view_t * p_mlv,
libvlc_exception_t * ) ; libvlc_exception_t * ) ;
typedef libvlc_media_descriptor_t * typedef libvlc_media_descriptor_t *
(*libvlc_media_list_view_item_at_index_func_t)( (*libvlc_media_list_view_item_at_index_func_t)(
struct libvlc_media_list_view_t * p_mlv, libvlc_media_list_view_t * p_mlv,
int index,
libvlc_exception_t * ) ;
typedef libvlc_media_list_view_t *
(*libvlc_media_list_view_children_at_index_func_t)(
libvlc_media_list_view_t * p_mlv,
int index, int index,
libvlc_exception_t * ) ; libvlc_exception_t * ) ;
...@@ -139,8 +145,9 @@ struct libvlc_media_list_view_t ...@@ -139,8 +145,9 @@ struct libvlc_media_list_view_t
struct libvlc_media_list_view_private_t * p_this_view_data; struct libvlc_media_list_view_private_t * p_this_view_data;
/* Accessors */ /* Accessors */
libvlc_media_list_view_count_func_t pf_count; libvlc_media_list_view_count_func_t pf_count;
libvlc_media_list_view_item_at_index_func_t pf_item_at_index; libvlc_media_list_view_item_at_index_func_t pf_item_at_index;
libvlc_media_list_view_children_at_index_func_t pf_children_at_index;
libvlc_media_list_view_release_func_t pf_release; libvlc_media_list_view_release_func_t pf_release;
...@@ -290,6 +297,7 @@ VLC_EXPORT ( libvlc_media_list_view_t *, libvlc_media_list_view_new, ...@@ -290,6 +297,7 @@ VLC_EXPORT ( libvlc_media_list_view_t *, libvlc_media_list_view_new,
( libvlc_media_list_t * p_mlist, ( libvlc_media_list_t * p_mlist,
libvlc_media_list_view_count_func_t pf_count, libvlc_media_list_view_count_func_t pf_count,
libvlc_media_list_view_item_at_index_func_t pf_item_at_index, libvlc_media_list_view_item_at_index_func_t pf_item_at_index,
libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
libvlc_media_list_view_release_func_t pf_release, libvlc_media_list_view_release_func_t pf_release,
void * this_view_data, void * this_view_data,
libvlc_exception_t * p_e ) ); libvlc_exception_t * p_e ) );
......
...@@ -104,6 +104,7 @@ libvlc_media_list_view_t * ...@@ -104,6 +104,7 @@ libvlc_media_list_view_t *
libvlc_media_list_view_new( libvlc_media_list_t * p_mlist, libvlc_media_list_view_new( libvlc_media_list_t * p_mlist,
libvlc_media_list_view_count_func_t pf_count, libvlc_media_list_view_count_func_t pf_count,
libvlc_media_list_view_item_at_index_func_t pf_item_at_index, libvlc_media_list_view_item_at_index_func_t pf_item_at_index,
libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
libvlc_media_list_view_release_func_t pf_release, libvlc_media_list_view_release_func_t pf_release,
void * this_view_data, void * this_view_data,
libvlc_exception_t * p_e ) libvlc_exception_t * p_e )
...@@ -120,9 +121,10 @@ libvlc_media_list_view_new( libvlc_media_list_t * p_mlist, ...@@ -120,9 +121,10 @@ libvlc_media_list_view_new( libvlc_media_list_t * p_mlist,
libvlc_media_list_retain( p_mlist ); libvlc_media_list_retain( p_mlist );
p_mlv->p_mlist = p_mlist; p_mlv->p_mlist = p_mlist;
p_mlv->pf_count = pf_count; p_mlv->pf_count = pf_count;
p_mlv->pf_item_at_index = pf_item_at_index; p_mlv->pf_item_at_index = pf_item_at_index;
p_mlv->pf_release = pf_release; p_mlv->pf_children_at_index = pf_children_at_index;
p_mlv->pf_release = pf_release;
p_mlv->p_this_view_data = this_view_data; p_mlv->p_this_view_data = this_view_data;
...@@ -225,4 +227,5 @@ libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv ) ...@@ -225,4 +227,5 @@ libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv )
MEDIA_LIST_VIEW_FUNCTION( count, int, 0 ) MEDIA_LIST_VIEW_FUNCTION( count, int, 0 )
MEDIA_LIST_VIEW_FUNCTION( item_at_index, libvlc_media_descriptor_t *, NULL, int arg1 ) MEDIA_LIST_VIEW_FUNCTION( item_at_index, libvlc_media_descriptor_t *, NULL, int arg1 )
MEDIA_LIST_VIEW_FUNCTION( children_at_index, libvlc_media_list_view_t *, NULL, int arg1 )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment