]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/upnp_intel.cpp
revert [23722]
[vlc] / modules / services_discovery / upnp_intel.cpp
index 2d194182bb3f62ce83c5424ee65453c5b1159322..8d43bcf4b00e37393c323651e5da7390b2caad82 100644 (file)
@@ -27,9 +27,9 @@
 /*
   \TODO: Debug messages: "__FILE__, __LINE__" ok ???, Wrn/Err ???
   \TODO: Change names to VLC standard ???
+  \TODO: Rewrite this using the new service discovery API (see sap.c, shout.c).
 */
 
-#include <stdlib.h>
 
 #include <vector>
 #include <string>
@@ -39,8 +39,7 @@
 
 #undef PACKAGE_NAME
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-
+#include <vlc_playlist.h>
 #include "vlc_strings.h"
 
 
@@ -467,11 +466,11 @@ static int Callback( Upnp_EventType eventType, void* event, void* pCookie )
     case UPNP_EVENT_SUBSCRIBE_COMPLETE:
         msg_Warn( cookie->serviceDiscovery, "subscription complete" );
         break;
-        
     case UPNP_DISCOVERY_SEARCH_TIMEOUT:
         msg_Warn( cookie->serviceDiscovery, "search timeout" );
         break;
-        
     default:
     msg_Dbg( cookie->serviceDiscovery, "%s:%d: DEBUG: UNHANDLED EVENT ( TYPE=%d )", __FILE__, __LINE__, eventType );
     break;
@@ -855,7 +854,7 @@ void MediaServer::_buildPlaylist( Container* parent )
         playlist_item_t* parentNode = parent->getPlaylistNode();
 
         char* title = strdup( container->getTitle() );
-        playlist_item_t* node = playlist_NodeCreate( p_playlist, title, parentNode );
+        playlist_item_t* node = playlist_NodeCreate( p_playlist, title, parentNode, 0, NULL );
         free( title );
 
         container->setPlaylistNode( node );
@@ -872,7 +871,8 @@ void MediaServer::_buildPlaylist( Container* parent )
                                                item->getTitle() );
         int i_cat;
         playlist_BothAddInput( p_playlist, p_input, parentNode,
-                               PLAYLIST_APPEND, PLAYLIST_END, &i_cat, NULL );
+                               PLAYLIST_APPEND, PLAYLIST_END, &i_cat, NULL,
+                               VLC_FALSE );
         /* TODO: do this better by storing ids */
         playlist_item_t *p_node = playlist_ItemGetById( p_playlist, i_cat, VLC_FALSE );
         assert( p_node );
@@ -917,7 +917,7 @@ bool MediaServerList::addServer( MediaServer* s )
     char* name = strdup( s->getFriendlyName() );
     playlist_item_t* node = playlist_NodeCreate( pl_Get( _cookie->serviceDiscovery ),
                                                  name,
-                                          _cookie->serviceDiscovery->p_sys->p_node_cat );
+                                          _cookie->serviceDiscovery->p_sys->p_node_cat, 0, NULL );
     free( name );
     s->setPlaylistNode( node );