/* Return a NULL terminated array with the names of the modules that have a
* certain capability.
* Free after uses both the string and the table. */
- #define module_GetModulesNamesForCapability(a,b) \
- __module_GetModulesNamesForCapability(VLC_OBJECT(a),b)
+ #define module_GetModulesNamesForCapability(a,b,c) \
+ __module_GetModulesNamesForCapability(VLC_OBJECT(a),b,c)
VLC_EXPORT(char **, __module_GetModulesNamesForCapability,
- ( vlc_object_t *p_this, const char * psz_capability ) );
+ ( vlc_object_t *p_this, const char * psz_capability,
+ char ***psz_longname ) );
VLC_EXPORT( module_t *, vlc_module_create, ( vlc_object_t * ) );
VLC_EXPORT( module_t *, vlc_submodule_create, ( module_t * ) );
/* Get the services discovery modules names to use in Create(), in a null
* terminated string array. Array and string must be freed after use. */
-VLC_EXPORT( char **, services_discovery_GetServicesNames, ( vlc_object_t * p_super ) );
+VLC_EXPORT( char **, services_discovery_GetServicesNames, ( vlc_object_t * p_super, char ***pppsz_longnames ) );
/* Creation of a service_discovery object */
VLC_EXPORT( services_discovery_t *, services_discovery_Create, ( vlc_object_t * p_super, const char * psz_service_name ) );
* Free after uses both the string and the table.
*****************************************************************************/
char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
- const char * psz_capability )
+ const char * psz_capability,
+ char ***pppsz_longname )
{
vlc_list_t *p_list;
int i, j, count = 0;
count++;
}
psz_ret = malloc( sizeof(char*) * (count+1) );
+ if( pppsz_longname )
+ *pppsz_longname = malloc( sizeof(char*) * (count+1) );
j = 0;
for( i = 0 ; i < p_list->i_count; i++)
{
}
psz_ret[j] = strdup( k>=0?p_module->pp_shortcuts[k]
:p_module->psz_object_name );
+ if( pppsz_longname )
+ (*pppsz_longname)[j] = strdup( module_GetName( p_module, VLC_TRUE ) );
j++;
}
}
/***********************************************************************
* GetServicesNames
***********************************************************************/
-char ** services_discovery_GetServicesNames( vlc_object_t * p_super )
+char ** services_discovery_GetServicesNames( vlc_object_t * p_super,
+ char ***pppsz_longnames )
{
- return module_GetModulesNamesForCapability( p_super, "services_discovery" );
+ return module_GetModulesNamesForCapability( p_super, "services_discovery",
+ pppsz_longnames );
}
/***********************************************************************