Commit b0984a63 authored by Thomas Guillem's avatar Thomas Guillem

libvlc: add missing "_t" in media_discoverer structs/enums

For the sake of coherence.
parent 9d2a9503
......@@ -34,7 +34,7 @@ extern "C" {
* Category of a media discoverer
* \see libvlc_media_discoverer_list_get()
*/
typedef enum libvlc_media_discoverer_category {
typedef enum libvlc_media_discoverer_category_t {
/** devices, like portable music player */
libvlc_media_discoverer_devices,
/** LAN/WAN services, like Upnp, SMB, or SAP */
......@@ -43,17 +43,17 @@ typedef enum libvlc_media_discoverer_category {
libvlc_media_discoverer_podcasts,
/** Local directories, like Video, Music or Pictures directories */
libvlc_media_discoverer_localdirs,
} libvlc_media_discoverer_category;
} libvlc_media_discoverer_category_t;
/**
* Media discoverer description
* \see libvlc_media_discoverer_list_get()
*/
typedef struct libvlc_media_discoverer_description {
typedef struct libvlc_media_discoverer_description_t {
char *psz_name;
char *psz_longname;
libvlc_media_discoverer_category i_cat;
} libvlc_media_discoverer_description;
libvlc_media_discoverer_category_t i_cat;
} libvlc_media_discoverer_description_t;
/** \defgroup libvlc_media_discoverer LibVLC media discovery
* \ingroup libvlc
......@@ -164,8 +164,8 @@ libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
*/
LIBVLC_API ssize_t
libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_media_discoverer_category i_cat,
libvlc_media_discoverer_description ***ppp_services );
libvlc_media_discoverer_category_t i_cat,
libvlc_media_discoverer_description_t ***ppp_services );
/**
* Release an array of media discoverer services
......@@ -178,7 +178,7 @@ libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
* \param i_count number of elements in the array
*/
LIBVLC_API void
libvlc_media_discoverer_list_release( libvlc_media_discoverer_description **pp_services,
libvlc_media_discoverer_list_release( libvlc_media_discoverer_description_t **pp_services,
size_t i_count );
/**@} */
......
......@@ -355,7 +355,7 @@ libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis )
}
void
libvlc_media_discoverer_list_release( libvlc_media_discoverer_description **pp_services,
libvlc_media_discoverer_list_release( libvlc_media_discoverer_description_t **pp_services,
size_t i_count )
{
if( i_count > 0 )
......@@ -372,8 +372,8 @@ libvlc_media_discoverer_list_release( libvlc_media_discoverer_description **pp_s
ssize_t
libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
libvlc_media_discoverer_category i_cat,
libvlc_media_discoverer_description ***ppp_services )
libvlc_media_discoverer_category_t i_cat,
libvlc_media_discoverer_description_t ***ppp_services )
{
assert( p_inst != NULL && ppp_services != NULL );
......@@ -420,7 +420,7 @@ libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
i_nb_services++;
}
libvlc_media_discoverer_description **pp_services = NULL, *p_services = NULL;
libvlc_media_discoverer_description_t **pp_services = NULL, *p_services = NULL;
if( i_nb_services > 0 )
{
/* Double alloc here, so that the caller iterates through pointers of
......@@ -428,9 +428,9 @@ libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
* without breaking the API. */
pp_services = malloc( i_nb_services
* sizeof(libvlc_media_discoverer_description *) );
* sizeof(libvlc_media_discoverer_description_t *) );
p_services = malloc( i_nb_services
* sizeof(libvlc_media_discoverer_description) );
* sizeof(libvlc_media_discoverer_description_t) );
if( pp_services == NULL || p_services == NULL )
{
free( pp_services );
......@@ -448,7 +448,7 @@ libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
ppsz_name = ppsz_names;
p_category = p_categories;
unsigned int i_service_idx = 0;
libvlc_media_discoverer_description *p_service = p_services;
libvlc_media_discoverer_description_t *p_service = p_services;
for( ; *ppsz_name != NULL; ppsz_name++, ppsz_longname++, p_category++ )
{
if( pp_services != NULL && *p_category == i_core_cat )
......
......@@ -114,15 +114,15 @@ main(int i_argc, char *ppsz_argv[])
return 0;
}
for(libvlc_media_discoverer_category i_cat = libvlc_media_discoverer_devices;
for(libvlc_media_discoverer_category_t i_cat = libvlc_media_discoverer_devices;
i_cat <= libvlc_media_discoverer_localdirs; i_cat ++)
{
log("== getting list of media_discoverer for %d category ==\n", i_cat);
libvlc_media_discoverer_description **pp_services;
unsigned int i_count =
libvlc_media_discoverer_description_t **pp_services;
ssize_t i_count =
libvlc_media_discoverer_list_get(p_vlc, i_cat, &pp_services);
if (i_count == 0)
if (i_count <= 0)
{
log("warn: no discoverers (not critical)\n");
continue;
......@@ -131,7 +131,7 @@ main(int i_argc, char *ppsz_argv[])
for (unsigned int i = 0; i < i_count; ++i)
{
libvlc_media_discoverer_description *p_service = pp_services[i];
libvlc_media_discoverer_description_t *p_service = pp_services[i];
assert(i_cat == p_service->i_cat);
log("= discoverer: name: '%s', longname: '%s' =\n",
......
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