playlist/services_discovery.c: Implement and expose GetServicesNames.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 24 Aug 2007 23:31:55 +0000 (23:31 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 24 Aug 2007 23:31:55 +0000 (23:31 +0000)
include/vlc_playlist.h
src/playlist/services_discovery.c

index ef2dd21..a012fda 100644 (file)
@@ -415,9 +415,10 @@ VLC_EXPORT( playlist_item_t *, playlist_GetLastLeaf, ( playlist_t *p_playlist, p
 /***********************************************************************
  * Service Discovery
  ***********************************************************************/
-/* XXX: no need to inline */
-/* XXX: no need to inline */
-/* Return the number of services_discovery available */
+
+/* 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 ) );
 
 /* Creation of a service_discovery object */
 VLC_EXPORT( services_discovery_t *, services_discovery_Create, ( vlc_object_t * p_super, const char * psz_service_name ) );
index fc70a0b..4ed3a27 100644 (file)
@@ -34,6 +34,14 @@ static void RunSD( services_discovery_t *p_sd );
  * That's how the playlist get's Service Discovery information
  */
 
+/***********************************************************************
+ * GetServicesNames
+ ***********************************************************************/
+char ** services_discovery_GetServicesNames( vlc_object_t * p_super )
+{
+    return module_GetModulesNamesForCapability( p_super, "services_discovery" );
+}
+
 /***********************************************************************
  * Create
  ***********************************************************************/