Commit d1458c92 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

libVLC: rename libvlc_media_discoverer_services_get

to libvlc_media_discoverer_list_get and do the same for release
parent 6dc1fc75
...@@ -185,7 +185,7 @@ libVLC: ...@@ -185,7 +185,7 @@ libVLC:
* Add a new libvlc dialog API to forward dialogs requests to the applications: * Add a new libvlc dialog API to forward dialogs requests to the applications:
libvlc_dialog_set_context, libvlc_dialog_get_context, libvlc_dialog_set_callbacks, libvlc_dialog_set_context, libvlc_dialog_get_context, libvlc_dialog_set_callbacks,
libvlc_dialog_dismiss, libvlc_dialog_post_action, libvlc_dialog_post_login libvlc_dialog_dismiss, libvlc_dialog_post_action, libvlc_dialog_post_login
* Add libvlc_media_discoverer_services_get to return a list of media discoverer services * Add libvlc_media_discoverer_list_get|release to list the media discoverers
Logging Logging
* Support for the SystemD Journal * Support for the SystemD Journal
......
...@@ -31,8 +31,8 @@ extern "C" { ...@@ -31,8 +31,8 @@ extern "C" {
# endif # endif
/** /**
* Category of a media discoverer service * Category of a media discoverer
* \see libvlc_media_discoverer_services_get() * \see libvlc_media_discoverer_list_get()
*/ */
typedef enum { typedef enum {
/** devices, like portable music player */ /** devices, like portable music player */
...@@ -46,14 +46,14 @@ typedef enum { ...@@ -46,14 +46,14 @@ typedef enum {
} libvlc_media_discoverer_category; } libvlc_media_discoverer_category;
/** /**
* Media discoverer service * Media discoverer description
* \see libvlc_media_discoverer_services_get() * \see libvlc_media_discoverer_list_get()
*/ */
typedef struct { typedef struct {
char *psz_name; char *psz_name;
char *psz_longname; char *psz_longname;
libvlc_media_discoverer_category i_cat; libvlc_media_discoverer_category i_cat;
} libvlc_media_discoverer_service; } libvlc_media_discoverer_description;
/** \defgroup libvlc_media_discoverer LibVLC media discovery /** \defgroup libvlc_media_discoverer LibVLC media discovery
* \ingroup libvlc * \ingroup libvlc
...@@ -92,7 +92,8 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst, ...@@ -92,7 +92,8 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
* \see libvlc_media_discoverer_start * \see libvlc_media_discoverer_start
* *
* \param p_inst libvlc instance * \param p_inst libvlc instance
* \param psz_name service name * \param psz_name service name; use libvlc_media_discoverer_list_get() to get
* a list of the discoverer names available in this libVLC instance
* \return media discover object or NULL in case of error * \return media discover object or NULL in case of error
* \version LibVLC 3.0.0 or later * \version LibVLC 3.0.0 or later
*/ */
...@@ -104,7 +105,7 @@ libvlc_media_discoverer_new( libvlc_instance_t * p_inst, ...@@ -104,7 +105,7 @@ libvlc_media_discoverer_new( libvlc_instance_t * p_inst,
* Start media discovery. * Start media discovery.
* *
* To stop it, call libvlc_media_discoverer_stop() or * To stop it, call libvlc_media_discoverer_stop() or
* libvlc_media_discoverer_release() directly. * libvlc_media_discoverer_list_release() directly.
* *
* \see libvlc_media_discoverer_stop * \see libvlc_media_discoverer_stop
* *
...@@ -178,29 +179,29 @@ LIBVLC_API int ...@@ -178,29 +179,29 @@ LIBVLC_API int
* \param p_inst libvlc instance * \param p_inst libvlc instance
* \param i_cat category of services to fetch * \param i_cat category of services to fetch
* \param ppp_services address to store an allocated array of media discoverer * \param ppp_services address to store an allocated array of media discoverer
* services (must be freed with libvlc_media_discoverer_services_release() by * services (must be freed with libvlc_media_discoverer_list_release() by
* the caller) [OUT] * the caller) [OUT]
* *
* \return the number of media discoverer services (zero on error) * \return the number of media discoverer services (zero on error)
*/ */
LIBVLC_API unsigned int LIBVLC_API unsigned int
libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst, libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_media_discoverer_category i_cat, libvlc_media_discoverer_category i_cat,
libvlc_media_discoverer_service ***ppp_services ); libvlc_media_discoverer_description ***ppp_services );
/** /**
* Release an array of media discoverer services * Release an array of media discoverer services
* *
* \version LibVLC 3.0.0 and later. * \version LibVLC 3.0.0 and later.
* *
* \see libvlc_media_discoverer_services_get() * \see libvlc_media_discoverer_list_get()
* *
* \param pp_services array to release * \param pp_services array to release
* \param i_count number of elements in the array * \param i_count number of elements in the array
*/ */
LIBVLC_API void LIBVLC_API void
libvlc_media_discoverer_services_release( libvlc_media_discoverer_service **pp_services, libvlc_media_discoverer_list_release( libvlc_media_discoverer_description **pp_services,
unsigned int i_count ); unsigned int i_count );
/**@} */ /**@} */
......
...@@ -84,8 +84,8 @@ libvlc_media_discoverer_media_list ...@@ -84,8 +84,8 @@ libvlc_media_discoverer_media_list
libvlc_media_discoverer_new libvlc_media_discoverer_new
libvlc_media_discoverer_new_from_name libvlc_media_discoverer_new_from_name
libvlc_media_discoverer_release libvlc_media_discoverer_release
libvlc_media_discoverer_services_get libvlc_media_discoverer_list_get
libvlc_media_discoverer_services_release libvlc_media_discoverer_list_release
libvlc_media_discoverer_start libvlc_media_discoverer_start
libvlc_media_discoverer_stop libvlc_media_discoverer_stop
libvlc_media_duplicate libvlc_media_duplicate
......
...@@ -387,8 +387,8 @@ libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis ) ...@@ -387,8 +387,8 @@ libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis )
} }
void void
libvlc_media_discoverer_services_release( libvlc_media_discoverer_service **pp_services, libvlc_media_discoverer_list_release( libvlc_media_discoverer_description **pp_services,
unsigned int i_count ) unsigned int i_count )
{ {
if( i_count > 0 ) if( i_count > 0 )
{ {
...@@ -403,9 +403,9 @@ libvlc_media_discoverer_services_release( libvlc_media_discoverer_service **pp_s ...@@ -403,9 +403,9 @@ libvlc_media_discoverer_services_release( libvlc_media_discoverer_service **pp_s
} }
unsigned int unsigned int
libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst, libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_media_discoverer_category i_cat, libvlc_media_discoverer_category i_cat,
libvlc_media_discoverer_service ***ppp_services ) libvlc_media_discoverer_description ***ppp_services )
{ {
assert( p_inst != NULL && ppp_services != NULL ); assert( p_inst != NULL && ppp_services != NULL );
...@@ -452,7 +452,7 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst, ...@@ -452,7 +452,7 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst,
i_nb_services++; i_nb_services++;
} }
libvlc_media_discoverer_service **pp_services = NULL, *p_services = NULL; libvlc_media_discoverer_description **pp_services = NULL, *p_services = NULL;
if( i_nb_services > 0 ) if( i_nb_services > 0 )
{ {
/* Double alloc here, so that the caller iterates through pointers of /* Double alloc here, so that the caller iterates through pointers of
...@@ -460,9 +460,9 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst, ...@@ -460,9 +460,9 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst,
* without breaking the API. */ * without breaking the API. */
pp_services = malloc( i_nb_services pp_services = malloc( i_nb_services
* sizeof(libvlc_media_discoverer_service *) ); * sizeof(libvlc_media_discoverer_description *) );
p_services = malloc( i_nb_services p_services = malloc( i_nb_services
* sizeof(libvlc_media_discoverer_service) ); * sizeof(libvlc_media_discoverer_description) );
if( pp_services == NULL || p_services == NULL ) if( pp_services == NULL || p_services == NULL )
{ {
free( pp_services ); free( pp_services );
...@@ -480,7 +480,7 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst, ...@@ -480,7 +480,7 @@ libvlc_media_discoverer_services_get( libvlc_instance_t *p_inst,
ppsz_name = ppsz_names; ppsz_name = ppsz_names;
p_category = p_categories; p_category = p_categories;
unsigned int i_service_idx = 0; unsigned int i_service_idx = 0;
libvlc_media_discoverer_service *p_service = p_services; libvlc_media_discoverer_description *p_service = p_services;
for( ; *ppsz_name != NULL; ppsz_name++, ppsz_longname++, p_category++, for( ; *ppsz_name != NULL; ppsz_name++, ppsz_longname++, p_category++,
p_service++ ) p_service++ )
{ {
......
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