/*****************************************************************************
* daap.c : Apple DAAP discovery module
*****************************************************************************
- * Copyright (C) 2004 VideoLAN
- * $Id: sap.c 9569 2004-12-15 22:17:52Z zorglub $
+ * Copyright (C) 2004 the VideoLAN team
+ * $Id$
*
- * Authors: Clément Stenac <zorglub@videolan.org>
+ * Authors: Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include "network.h"
+#include "vlc_url.h"
#include <vlc/input.h>
msg_Warn( p_sd, "unable to find playlist, cancelling DAAP" );
return VLC_EGENERIC;
}
+ msg_Err( p_sd, "DAAP IS BROKEN !! Fix it if you want it !" );
+ return VLC_EGENERIC;
- p_view = playlist_ViewFind( p_playlist, VIEW_CATEGORY );
+#if 0
p_sys->p_node = playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
_("DAAP shares"), p_view->p_root );
p_sys->p_node->i_flags |= PLAYLIST_RO_FLAG;
vlc_object_release( p_playlist );
return VLC_SUCCESS;
+#endif
}
static int OpenAccess( vlc_object_t *p_this )
{
+#if 0
access_t *p_access = (access_t*)p_this;
access_sys_t *p_sys;
vlc_value_t val;
if( p_sys->p_db == NULL || i_ret )
{
- msg_Err( p_access, "The DAAP services_discovery module must be enabled" );
+ msg_Err( p_access, "the DAAP services_discovery module must be enabled" );
return VLC_EGENERIC;
}
}
- msg_Dbg( p_access, "Downloading %s song %i (db %i)",
+ msg_Dbg( p_access, "downloading %s song %i (db %i)",
p_sys->songdata.songformat,
p_sys->i_song, p_sys->p_host->i_database_id );
p_sys->songdata.songformat,
&(p_sys->song) );
- msg_Dbg( p_access, "Finished downloading, read %i bytes (ret %i)",
+ msg_Dbg( p_access, "finished downloading, read %i bytes (ret %i)",
p_sys->song.size, i_ret );
p_access->info.i_size = p_sys->song.size;
if( i_ret != 0 )
return VLC_EGENERIC;
-
+#endif
return VLC_SUCCESS;
}
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
+#if 0
services_discovery_t *p_sd = ( services_discovery_t* )p_this;
services_discovery_sys_t *p_sys = p_sd->p_sys;
}
free( p_sys );
+#endif
}
static void CloseAccess( vlc_object_t *p_this )
if( !b_found )
{
dhost_t *p_vlchost = (dhost_t *)malloc( sizeof( dhost_t ) );
+ p_vlchost->p_node = NULL;
p_vlchost->p_host = p_host;
p_vlchost->psz_name = psz_buffer;
p_vlchost->b_new = VLC_TRUE;
static void ProcessHost( services_discovery_t *p_sd, dhost_t *p_host )
{
+#if 0
int i_dbsize, i_db, i, i_songsize, i_ret;
int i_size = DAAP_ClientHost_GetSharename( p_host->p_host, NULL, 0 );
p_host->p_songs[i].id );
p_item = playlist_ItemNew( p_sd, psz_buff,
p_host->p_songs[i].itemname );
- vlc_input_item_AddInfo( &p_item->input, _("Meta-information"),
- _("Artist"), p_host->p_songs[i].songartist );
- vlc_input_item_AddInfo( &p_item->input, _("Meta-information"),
- _("Album"), p_host->p_songs[i].songalbum );
+ vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
+ _(VLC_META_ARTIST), p_host->p_songs[i].songartist );
+ vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
+ _(VLC_META_COLLECTION), p_host->p_songs[i].songalbum );
playlist_NodeAddItem( p_playlist, p_item, VIEW_CATEGORY,
p_host->p_node, PLAYLIST_APPEND, PLAYLIST_END );
DAAP_ClientHost_AsyncWaitUpdate( p_host->p_host );
vlc_object_release( p_playlist );
+#endif
}
static void FreeHost( services_discovery_t *p_sd, dhost_t *p_host )
FIND_ANYWHERE );
if( p_playlist )
{
- playlist_NodeDelete( p_playlist, p_host->p_node, VLC_TRUE , VLC_TRUE);
+ if( p_host->p_node )
+ playlist_NodeDelete( p_playlist, p_host->p_node, VLC_TRUE ,
+ VLC_TRUE);
vlc_object_release( p_playlist );
}