vlc_mutex_init( p_this, &p_update->lock );
- p_update->p_vlc = p_this->p_vlc;
+ p_update->p_libvlc = p_this->p_libvlc;
p_update->p_releases = NULL;
p_update->i_releases = 0;
return;
}
- p_xml = xml_Create( p_update->p_vlc );
+ p_xml = xml_Create( p_update->p_libvlc );
if( !p_xml )
{
- msg_Err( p_update->p_vlc, "Failed to open XML parser" );
+ msg_Err( p_update->p_libvlc, "Failed to open XML parser" );
goto error;
}
- p_stream = stream_UrlNew( p_update->p_vlc, UPDATE_VLC_MIRRORS_URL );
+ p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_MIRRORS_URL );
if( !p_stream )
{
- msg_Err( p_update->p_vlc, "Failed to open %s for reading",
+ msg_Err( p_update->p_libvlc, "Failed to open %s for reading",
UPDATE_VLC_MIRRORS_URL );
goto error;
}
if( !p_xml_reader )
{
- msg_Err( p_update->p_vlc, "Failed to open %s for parsing",
+ msg_Err( p_update->p_libvlc, "Failed to open %s for parsing",
UPDATE_VLC_MIRRORS_URL );
goto error;
}
switch( xml_ReaderNodeType( p_xml_reader ) )
{
case -1:
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_MIRRORS_URL );
goto error;
psz_eltname = xml_ReaderName( p_xml_reader );
if( !psz_eltname )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_MIRRORS_URL );
goto error;
}
if( !psz_name || !psz_value )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_MIRRORS_URL );
goto error;
}
psz_eltname = xml_ReaderName( p_xml_reader );
if( !psz_eltname )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_MIRRORS_URL );
goto error;
}
return;
}
- p_xml = xml_Create( p_update->p_vlc );
+ p_xml = xml_Create( p_update->p_libvlc );
if( !p_xml )
{
- msg_Err( p_update->p_vlc, "Failed to open XML parser" );
+ msg_Err( p_update->p_libvlc, "Failed to open XML parser" );
goto error;
}
- p_stream = stream_UrlNew( p_update->p_vlc, UPDATE_VLC_STATUS_URL );
+ p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_STATUS_URL );
if( !p_stream )
{
- msg_Err( p_update->p_vlc, "Failed to open %s for reading",
+ msg_Err( p_update->p_libvlc, "Failed to open %s for reading",
UPDATE_VLC_STATUS_URL );
goto error;
}
if( !p_xml_reader )
{
- msg_Err( p_update->p_vlc, "Failed to open %s for parsing",
+ msg_Err( p_update->p_libvlc, "Failed to open %s for parsing",
UPDATE_VLC_STATUS_URL );
goto error;
}
switch( xml_ReaderNodeType( p_xml_reader ) )
{
case -1:
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_STATUS_URL );
goto error;
psz_eltname = xml_ReaderName( p_xml_reader );
if( !psz_eltname )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_STATUS_URL );
goto error;
}
if( !psz_name || !psz_value )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_STATUS_URL );
goto error;
}
psz_eltname = xml_ReaderName( p_xml_reader );
if( !psz_eltname )
{
- msg_Err( p_update->p_vlc, "Error while parsing %s",
+ msg_Err( p_update->p_libvlc, "Error while parsing %s",
UPDATE_VLC_STATUS_URL );
goto error;
}
void update_download( update_iterator_t *p_uit, char *psz_dest )
{
download_thread_t *p_dt =
- vlc_object_create( p_uit->p_u->p_vlc, sizeof( download_thread_t ) );
+ vlc_object_create( p_uit->p_u->p_libvlc, sizeof( download_thread_t ) );
p_dt->psz_dest = strdup( psz_dest );
p_dt->psz_src = strdup( p_uit->file.psz_url );
char *psz_dest = p_this->psz_dest;
char *psz_src = p_this->psz_src;
stream_t *p_stream;
- vlc_t *p_vlc = p_this->p_vlc;
+ libvlc_int_t *p_libvlc = p_this->p_libvlc;
FILE *p_file = NULL;
void *p_buffer;
asprintf( &psz_status, "%s\nDownloading... 0.0/? %.1f%% done",
p_this->psz_status, 0.0 );
- i_progress = intf_UserProgress( p_vlc, "Downloading...",
+ i_progress = intf_UserProgress( p_libvlc, "Downloading...",
psz_status, 0.0, 0 );
- p_stream = stream_UrlNew( p_vlc, psz_src );
+ p_stream = stream_UrlNew( p_libvlc, psz_src );
if( !p_stream )
{
- msg_Err( p_vlc, "Failed to open %s for reading", psz_src );
- intf_UserFatal( p_vlc, VLC_TRUE, "Error while Downloading...",
+ msg_Err( p_libvlc, "Failed to open %s for reading", psz_src );
+ intf_UserFatal( p_libvlc, VLC_TRUE, "Error while Downloading...",
"VLC failed to open %s for reading.", psz_src );
- intf_UserHide( p_vlc, i_progress );
+ intf_UserHide( p_libvlc, i_progress );
}
else
{
p_file = utf8_fopen( psz_dest, "w" );
if( !p_file )
{
- msg_Err( p_vlc, "Failed to open %s for writing", psz_dest );
- intf_UserFatal( p_vlc, VLC_TRUE, "Error while Downloading...",
+ msg_Err( p_libvlc, "Failed to open %s for writing", psz_dest );
+ intf_UserFatal( p_libvlc, VLC_TRUE, "Error while Downloading...",
"VLC failed to open %s for writing.", psz_dest );
- intf_UserHide( p_vlc, i_progress );
+ intf_UserHide( p_libvlc, i_progress );
}
else
{
p_this->psz_status, psz_s1, psz_s2, f_progress );
free( psz_s1 ); free( psz_s2 );
- intf_ProgressUpdate( p_vlc, i_progress,
+ intf_ProgressUpdate( p_libvlc, i_progress,
psz_status, f_progress, 0 );
}
asprintf( &psz_status, "%s\nDone %s (100.00%%)",
p_this->psz_status, psz_s2 );
free( psz_s2 );
- intf_ProgressUpdate( p_vlc, i_progress, psz_status, 100.0, 0 );
+ intf_ProgressUpdate( p_libvlc, i_progress, psz_status, 100.0, 0 );
free( psz_status );
}
}