X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fupdate.c;h=f495b74dd1a2a22dde4ecd01da7daba7a1b79466;hb=288559204f8b0ef943d5e7273b9a076f69318c26;hp=5b7f366be87630ab81211eeee3a0fba52252291f;hpb=11922961a781bb840c7e06b0ca32054ae0e65645;p=vlc diff --git a/src/misc/update.c b/src/misc/update.c index 5b7f366be8..f495b74dd1 100644 --- a/src/misc/update.c +++ b/src/misc/update.c @@ -35,23 +35,28 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif +#ifdef HAVE_SYS_STAT_H +# include +#endif -#include +#include +#include #ifdef UPDATE_CHECK #include -#include #include #include #include #include -#include +#include #include #include +#include "update.h" +#include "../libvlc.h" /***************************************************************************** * Misc defines @@ -66,7 +71,7 @@ * * e is an OPTIONAL extra letter * * AKA "0.8.6d" or "0.9.0" * Second line is an url of the binary for this last version - * Third line is a description of the update (it MAY be extended to several lines, but for now it is only one line) + * Remaining text is a required description of the update */ #if defined( UNDER_CE ) @@ -843,6 +848,16 @@ static uint8_t *hash_sha1_from_file( const char *psz_file, gcry_md_write( hd, p_sig->specific.v4.hashed_data_len, 2 ); size_t i_len = scalar_number( p_sig->specific.v4.hashed_data_len, 2 ); gcry_md_write( hd, p_sig->specific.v4.hashed_data, i_len ); + + gcry_md_putc( hd, 0x04 ); + gcry_md_putc( hd, 0xFF ); + + i_len += 6; /* hashed data + 6 bytes header */ + + gcry_md_putc( hd, (i_len >> 24) & 0xff ); + gcry_md_putc( hd, (i_len >> 16) & 0xff ); + gcry_md_putc( hd, (i_len >> 8) & 0xff ); + gcry_md_putc( hd, (i_len) & 0xff ); } else { /* RFC 4880 only tells about versions 3 and 4 */ @@ -976,9 +991,9 @@ static uint8_t *key_sign_hash( public_key_t *p_pkey ) size_t i_len = strlen((char*)p_pkey->psz_username); - gcry_md_putc( hd, (i_len << 24) & 0xff ); - gcry_md_putc( hd, (i_len << 16) & 0xff ); - gcry_md_putc( hd, (i_len << 8) & 0xff ); + gcry_md_putc( hd, (i_len >> 24) & 0xff ); + gcry_md_putc( hd, (i_len >> 16) & 0xff ); + gcry_md_putc( hd, (i_len >> 8) & 0xff ); gcry_md_putc( hd, (i_len) & 0xff ); gcry_md_write( hd, p_pkey->psz_username, i_len ); @@ -998,14 +1013,14 @@ static uint8_t *key_sign_hash( public_key_t *p_pkey ) i_hashed_data_len += 6; /* hashed data + 6 bytes header */ - gcry_md_putc( hd, (i_hashed_data_len << 24) & 0xff); - gcry_md_putc( hd, (i_hashed_data_len << 16) &0xff ); - gcry_md_putc( hd, (i_hashed_data_len << 8) & 0xff ); + gcry_md_putc( hd, (i_hashed_data_len >> 24) & 0xff ); + gcry_md_putc( hd, (i_hashed_data_len >> 16) & 0xff ); + gcry_md_putc( hd, (i_hashed_data_len >> 8) & 0xff ); gcry_md_putc( hd, (i_hashed_data_len) & 0xff ); gcry_md_final( hd ); - uint8_t *p_tmp = gcry_md_read( hd, GCRY_MD_SHA1); + uint8_t *p_tmp = gcry_md_read( hd, GCRY_MD_SHA1 ); if( !p_tmp || p_tmp[0] != p_pkey->sig.hash_verification[0] || @@ -1048,6 +1063,9 @@ update_t *__update_New( vlc_object_t *p_this ) p_update->release.psz_url = NULL; p_update->release.psz_desc = NULL; + p_update->p_download = NULL; + p_update->p_check = NULL; + p_update->p_pkey = NULL; vlc_gcrypt_init(); @@ -1064,6 +1082,20 @@ void update_Delete( update_t *p_update ) { assert( p_update ); + if( p_update->p_check ) + { + assert( !p_update->p_download ); + vlc_object_kill( p_update->p_check ); + vlc_thread_join( p_update->p_check ); + vlc_object_release( p_update->p_check ); + } + else if( p_update->p_download ) + { + vlc_object_kill( p_update->p_download ); + vlc_thread_join( p_update->p_download ); + vlc_object_release( p_update->p_download ); + } + vlc_mutex_destroy( &p_update->lock ); free( p_update->release.psz_url ); @@ -1103,7 +1135,6 @@ static bool GetUpdateFile( update_t *p_update ) int i_minor = 0; int i_revision = 0; unsigned char extra; - char *psz_line = NULL; char *psz_version_line = NULL; p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_STATUS_URL ); @@ -1114,18 +1145,18 @@ static bool GetUpdateFile( update_t *p_update ) goto error; } - /* Try to read three lines */ - if( !( psz_line = stream_ReadLine( p_stream ) ) ) + /* Start reading the status file */ + if( !( psz_version_line = stream_ReadLine( p_stream ) ) ) { msg_Err( p_update->p_libvlc, "Update file %s is corrupted : missing version", UPDATE_VLC_STATUS_URL ); goto error; } - psz_version_line = psz_line; /* first line : version number */ p_update->release.extra = 0; - switch( sscanf( psz_line, "%i.%i.%i%c", &i_major, &i_minor, &i_revision, &extra ) ) + switch( sscanf( psz_version_line, "%i.%i.%i%c", + &i_major, &i_minor, &i_revision, &extra ) ) { case 4: p_update->release.extra = extra; @@ -1139,24 +1170,35 @@ static bool GetUpdateFile( update_t *p_update ) goto error; } - /* Second line : URL */ - if( !( psz_line = stream_ReadLine( p_stream ) ) ) + /* second line : URL */ + if( !( p_update->release.psz_url = stream_ReadLine( p_stream ) ) ) { msg_Err( p_update->p_libvlc, "Update file %s is corrupted : URL missing", UPDATE_VLC_STATUS_URL ); goto error; } - p_update->release.psz_url = psz_line; + /* Remaining data : description */ + int i_read = stream_Size( p_stream ) - stream_Tell( p_stream ); + if( i_read <= 0 ) + { + msg_Err( p_update->p_libvlc, + "Update file %s is corrupted: description missing", + UPDATE_VLC_STATUS_URL ); + goto error; + } + + p_update->release.psz_desc = (char*) malloc( i_read + 1 ); + if( !p_update->release.psz_desc ) + goto error; - /* Third line : description */ - if( !( psz_line = stream_ReadLine( p_stream ) ) ) + if( stream_Read( p_stream, p_update->release.psz_desc, i_read ) != i_read ) { - msg_Err( p_update->p_libvlc, "Update file %s is corrupted : description missing", - UPDATE_VLC_STATUS_URL ); + msg_Err( p_update->p_libvlc, "Couldn't download update file %s", + UPDATE_VLC_STATUS_URL ); goto error; } - p_update->release.psz_desc = psz_line; + p_update->release.psz_desc[i_read] = '\0'; stream_Delete( p_stream ); p_stream = NULL; @@ -1243,12 +1285,23 @@ static bool GetUpdateFile( update_t *p_update ) if( sign.type == TEXT_SIGNATURE ) gcry_md_putc( hd, '\r' ); gcry_md_putc( hd, '\n' ); - gcry_md_write( hd, p_update->release.psz_desc, - strlen( p_update->release.psz_desc ) ); - if( sign.type == TEXT_SIGNATURE ) - gcry_md_putc( hd, '\r' ); - gcry_md_putc( hd, '\n' ); + char *psz_desc = p_update->release.psz_desc; + while( *psz_desc ) + { + size_t i_len = strcspn( psz_desc, "\r\n" ); + if( !i_len ) + break; + + gcry_md_write( hd, psz_desc, i_len ); + if( sign.type == TEXT_SIGNATURE ) + gcry_md_putc( hd, '\r' ); + gcry_md_putc( hd, '\n' ); + + psz_desc += i_len; + while( *psz_desc == '\r' || *psz_desc == '\n' ) + psz_desc++; + } if( sign.version == 3 ) { @@ -1269,9 +1322,9 @@ static bool GetUpdateFile( update_t *p_update ) i_len += 6; /* hashed data + 6 bytes header */ - gcry_md_putc( hd, (i_len << 24) & 0xff); - gcry_md_putc( hd, (i_len << 16) &0xff ); - gcry_md_putc( hd, (i_len << 8) & 0xff ); + gcry_md_putc( hd, (i_len >> 24) & 0xff ); + gcry_md_putc( hd, (i_len >> 16) & 0xff ); + gcry_md_putc( hd, (i_len >> 8) & 0xff ); gcry_md_putc( hd, (i_len) & 0xff ); } else @@ -1314,19 +1367,7 @@ error: return false; } - -/** - * Struct to launch the check in an other thread - */ -typedef struct -{ - VLC_COMMON_MEMBERS - update_t *p_update; - void (*pf_callback)( void *, bool ); - void *p_data; -} update_check_thread_t; - -void update_CheckReal( update_check_thread_t *p_uct ); +static void* update_CheckReal( vlc_object_t *p_this ); /** * Check for updates @@ -1340,21 +1381,35 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void { assert( p_update ); - update_check_thread_t *p_uct = vlc_object_create( p_update->p_libvlc, - sizeof( update_check_thread_t ) ); + // If the object already exist, destroy it + if( p_update->p_check ) + { + vlc_object_kill( p_update->p_check ); + vlc_thread_join( p_update->p_check ); + vlc_object_release( p_update->p_check ); + } + + update_check_thread_t *p_uct = + vlc_custom_create( p_update->p_libvlc, sizeof( *p_uct ), + VLC_OBJECT_GENERIC, "update check" ); if( !p_uct ) return; p_uct->p_update = p_update; + p_update->p_check = p_uct; p_uct->pf_callback = pf_callback; p_uct->p_data = p_data; vlc_thread_create( p_uct, "check for update", update_CheckReal, - VLC_THREAD_PRIORITY_LOW, false ); + VLC_THREAD_PRIORITY_LOW ); } -void update_CheckReal( update_check_thread_t *p_uct ) +void* update_CheckReal( vlc_object_t* p_this ) { + update_check_thread_t *p_uct = (update_check_thread_t *)p_this; bool b_ret; + int canc; + + canc = vlc_savecancel (); vlc_mutex_lock( &p_uct->p_update->lock ); EmptyRelease( p_uct->p_update ); @@ -1364,7 +1419,8 @@ void update_CheckReal( update_check_thread_t *p_uct ) if( p_uct->pf_callback ) (p_uct->pf_callback)( p_uct->p_data, b_ret ); - vlc_object_release( p_uct ); + vlc_restorecancel (canc); + return NULL; } /** @@ -1373,14 +1429,32 @@ void update_CheckReal( update_check_thread_t *p_uct ) * \param p_update structure * \return true if we have to upgrade to the given version to be up to date */ +static bool is_strictly_greater( int * a, int * b, int n) +{ + if( n <= 0 ) return false; + if(a[0] > b[0] ) return true; + if(a[0] == b[0] ) return is_strictly_greater( a+1, b+1, n-1 ); + /* a[0] < b[0] */ return false; +} + bool update_NeedUpgrade( update_t *p_update ) { assert( p_update ); - return p_update->release.i_major < *PACKAGE_VERSION_MAJOR - '0' || - p_update->release.i_minor < *PACKAGE_VERSION_MINOR - '0' || - p_update->release.i_revision < *PACKAGE_VERSION_REVISION - '0' || - p_update->release.extra < *PACKAGE_VERSION_EXTRA; + int current_version[] = { + *PACKAGE_VERSION_MAJOR - '0', + *PACKAGE_VERSION_MINOR - '0', + *PACKAGE_VERSION_REVISION - '0', + *PACKAGE_VERSION_EXTRA + }; + int latest_version[] = { + p_update->release.i_major, + p_update->release.i_minor, + p_update->release.i_revision, + p_update->release.extra + }; + + return is_strictly_greater( latest_version, current_version, 4 ); } /** @@ -1394,59 +1468,68 @@ static char *size_str( long int l_size ) char *psz_tmp = NULL; int i_retval = 0; if( l_size >> 30 ) - i_retval = asprintf( &psz_tmp, "%.1f GB", (float)l_size/(1<<30) ); + i_retval = asprintf( &psz_tmp, _("%.1f GB"), (float)l_size/(1<<30) ); else if( l_size >> 20 ) - i_retval = asprintf( &psz_tmp, "%.1f MB", (float)l_size/(1<<20) ); + i_retval = asprintf( &psz_tmp, _("%.1f MB"), (float)l_size/(1<<20) ); else if( l_size >> 10 ) - i_retval = asprintf( &psz_tmp, "%.1f kB", (float)l_size/(1<<10) ); + i_retval = asprintf( &psz_tmp, _("%.1f kB"), (float)l_size/(1<<10) ); else - i_retval = asprintf( &psz_tmp, "%ld B", l_size ); + i_retval = asprintf( &psz_tmp, _("%ld B"), l_size ); return i_retval == -1 ? NULL : psz_tmp; } - -/** - * Struct to launch the download in a thread - */ -typedef struct +void update_WaitDownload( update_t *p_update ) { - VLC_COMMON_MEMBERS - update_t *p_update; - char *psz_destdir; -} update_download_thread_t; + if( p_update->p_download ) + { + vlc_thread_join( p_update->p_download ); + vlc_object_release( p_update->p_download ); + p_update->p_download = NULL; + } +} -void update_DownloadReal( update_download_thread_t *p_udt ); +static void* update_DownloadReal( vlc_object_t *p_this ); /** * Download the file given in the update_t * * \param p_update structure - * \param dir to store the download file + * \param destination to store the download file + * This can be an existing dir, a (non)existing target fullpath filename or + * NULL for the current working dir. * \return nothing */ -void update_Download( update_t *p_update, char *psz_destdir ) +void update_Download( update_t *p_update, const char *destination ) { assert( p_update ); - update_download_thread_t *p_udt = vlc_object_create( p_update->p_libvlc, - sizeof( update_download_thread_t ) ); - if( !p_udt ) + // If the object already exist, destroy it + if( p_update->p_download ) { - msg_Err( p_update->p_libvlc, "out of memory" ); - return; + vlc_object_kill( p_update->p_download ); + vlc_thread_join( p_update->p_download ); + vlc_object_release( p_update->p_download ); } + update_download_thread_t *p_udt = + vlc_custom_create( p_update->p_libvlc, sizeof( *p_udt ), + VLC_OBJECT_GENERIC, "update download" ); + if( !p_udt ) + return; + p_udt->p_update = p_update; - p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL; + p_update->p_download = p_udt; + p_udt->psz_destination = destination ? strdup( destination ) : NULL; vlc_thread_create( p_udt, "download update", update_DownloadReal, - VLC_THREAD_PRIORITY_LOW, false ); + VLC_THREAD_PRIORITY_LOW ); } -void update_DownloadReal( update_download_thread_t *p_udt ) +static void* update_DownloadReal( vlc_object_t *p_this ) { - int i_progress = 0; + update_download_thread_t *p_udt = (update_download_thread_t *)p_this; + dialog_progress_bar_t *p_progress = NULL; long int l_size; long int l_downloaded = 0; float f_progress; @@ -1457,12 +1540,17 @@ void update_DownloadReal( update_download_thread_t *p_udt ) char *psz_tmpdestfile = NULL; FILE *p_file = NULL; + struct stat p_stat; stream_t *p_stream = NULL; void* p_buffer = NULL; int i_read; + int canc; update_t *p_update = p_udt->p_update; - char *psz_destdir = p_udt->psz_destdir; + char *psz_destination = p_udt->psz_destination; + + msg_Dbg( p_udt, "Opening Stream '%s'", p_update->release.psz_url ); + canc = vlc_savecancel (); /* Open the stream */ p_stream = stream_UrlNew( p_udt, p_update->release.psz_url ); @@ -1479,35 +1567,54 @@ void update_DownloadReal( update_download_thread_t *p_udt ) psz_tmpdestfile = strrchr( p_update->release.psz_url, '/' ); if( !psz_tmpdestfile ) { - msg_Err( p_udt, "The URL %s is false formated", p_update->release.psz_url ); + msg_Err( p_udt, "The URL %s is badly formated", + p_update->release.psz_url ); goto end; } psz_tmpdestfile++; - if( asprintf( &psz_destfile, "%s%s", psz_destdir, psz_tmpdestfile ) == -1 ) - goto end; + + if( utf8_stat( psz_destination, &p_stat) == 0 && (p_stat.st_mode & S_IFDIR) ) + { + if( asprintf( &psz_destfile, "%s%c%s", psz_destination, DIR_SEP_CHAR, psz_tmpdestfile ) == -1 ) + goto end; + } + else if( psz_destination ) + psz_destfile = strdup( psz_destination ); + else + psz_destfile = strdup( psz_tmpdestfile ); p_file = utf8_fopen( psz_destfile, "w" ); if( !p_file ) { msg_Err( p_udt, "Failed to open %s for writing", psz_destfile ); + dialog_FatalWait( p_udt, _("Saving file failed"), + _("Failed to open \"%s\" for writing"), + psz_destfile ); goto end; } /* Create a buffer and fill it with the downloaded file */ p_buffer = (void *)malloc( 1 << 10 ); if( !p_buffer ) + { + msg_Err( p_udt, "Can't malloc (1 << 10) bytes! download cancelled." ); goto end; + } + + msg_Dbg( p_udt, "Downloading Stream '%s'", p_update->release.psz_url ); psz_size = size_str( l_size ); - if( asprintf( &psz_status, "%s\nDownloading... O.O/%s %.1f%% done", - p_update->release.psz_url, psz_size, 0.0 ) != -1 ) + if( asprintf( &psz_status, _("%s\nDownloading... %s/%s %.1f%% done"), + p_update->release.psz_url, "0.0", psz_size, 0.0 ) != -1 ) { - i_progress = intf_UserProgress( p_udt, "Downloading ...", psz_status, 0.0, 0 ); + p_progress = dialog_ProgressCreate( p_udt, _( "Downloading ..."), + psz_status, _("Cancel") ); free( psz_status ); } - while( ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) && - !intf_ProgressIsCancelled( p_udt, i_progress ) ) + while( vlc_object_alive( p_udt ) && + ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) && + !dialog_ProgressCancelled( p_progress ) ) { if( fwrite( p_buffer, i_read, 1, p_file ) < 1 ) { @@ -1517,13 +1624,13 @@ void update_DownloadReal( update_download_thread_t *p_udt ) l_downloaded += i_read; psz_downloaded = size_str( l_downloaded ); - f_progress = 100.0*(float)l_downloaded/(float)l_size; + f_progress = (float)l_downloaded/(float)l_size; - if( asprintf( &psz_status, "%s\nDonwloading... %s/%s %.1f%% done", + if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ), p_update->release.psz_url, psz_downloaded, psz_size, f_progress ) != -1 ) { - intf_ProgressUpdate( p_udt, i_progress, psz_status, f_progress, 0 ); + dialog_ProgressSet( p_progress, psz_status, f_progress ); free( psz_status ); } free( psz_downloaded ); @@ -1533,12 +1640,14 @@ void update_DownloadReal( update_download_thread_t *p_udt ) fclose( p_file ); p_file = NULL; - if( !intf_ProgressIsCancelled( p_udt, i_progress ) ) + if( vlc_object_alive( p_udt ) && + !dialog_ProgressCancelled( p_progress ) ) { - if( asprintf( &psz_status, "%s\nDone %s (100.0%%)", + if( asprintf( &psz_status, _("%s\nDone %s (100.0%%)"), p_update->release.psz_url, psz_size ) != -1 ) { - intf_ProgressUpdate( p_udt, i_progress, psz_status, 100.0, 0 ); + dialog_ProgressDestroy( p_progress ); + p_progress = NULL; free( psz_status ); } } @@ -1554,9 +1663,9 @@ void update_DownloadReal( update_download_thread_t *p_udt ) { utf8_unlink( psz_destfile ); - intf_UserFatal( p_udt, true, _("File can not be verified"), + dialog_FatalWait( p_udt, _("File could not be verified"), _("It was not possible to download a cryptographic signature for " - "downloaded file \"%s\", and so VLC deleted it."), + "the downloaded file \"%s\". Thus, it was deleted."), psz_destfile ); msg_Err( p_udt, "Couldn't download signature of downloaded file" ); goto end; @@ -1566,10 +1675,10 @@ void update_DownloadReal( update_download_thread_t *p_udt ) { utf8_unlink( psz_destfile ); msg_Err( p_udt, "Invalid signature issuer" ); - intf_UserFatal( p_udt, true, _("Invalid signature"), - _("The cryptographic signature for downloaded file \"%s\" was " - "invalid and couldn't be used to securely verify it, and so " - "VLC deleted it."), + dialog_FatalWait( p_udt, _("Invalid signature"), + _("The cryptographic signature for the downloaded file \"%s\" was " + "invalid and could not be used to securely verify it. Thus, the " + "file was deleted."), psz_destfile ); goto end; } @@ -1578,10 +1687,10 @@ void update_DownloadReal( update_download_thread_t *p_udt ) { utf8_unlink( psz_destfile ); msg_Err( p_udt, "Invalid signature type" ); - intf_UserFatal( p_udt, true, _("Invalid signature"), - _("The cryptographic signature for downloaded file \"%s\" was " - "invalid and couldn't be used to securely verify it, and so " - "VLC deleted it."), + dialog_FatalWait( p_udt, _("Invalid signature"), + _("The cryptographic signature for the downloaded file \"%s\" was " + "invalid and could not be used to securely verify it. Thus, the " + "file was deleted."), psz_destfile ); goto end; } @@ -1591,9 +1700,9 @@ void update_DownloadReal( update_download_thread_t *p_udt ) { msg_Err( p_udt, "Unable to hash %s", psz_destfile ); utf8_unlink( psz_destfile ); - intf_UserFatal( p_udt, true, _("File not verifiable"), - _("It was not possible to securely verify downloaded file \"%s\", " - "and so VLC deleted it."), + dialog_FatalWait( p_udt, _("File not verifiable"), + _("It was not possible to securely verify the downloaded file" + " \"%s\". Thus, it was deleted."), psz_destfile ); goto end; @@ -1603,8 +1712,8 @@ void update_DownloadReal( update_download_thread_t *p_udt ) p_hash[1] != sign.hash_verification[1] ) { utf8_unlink( psz_destfile ); - intf_UserFatal( p_udt, true, _("File corrupted"), - _("Downloaded file \"%s\" was corrupted, and so VLC deleted it."), + dialog_FatalWait( p_udt, _("File corrupted"), + _("Downloaded file \"%s\" was corrupted. Thus, it was deleted."), psz_destfile ); msg_Err( p_udt, "Bad SHA1 hash for %s", psz_destfile ); free( p_hash ); @@ -1615,8 +1724,8 @@ void update_DownloadReal( update_download_thread_t *p_udt ) != VLC_SUCCESS ) { utf8_unlink( psz_destfile ); - intf_UserFatal( p_udt, true, _("File corrupted"), - _("Downloaded file \"%s\" was corrupted, and so VLC deleted it."), + dialog_FatalWait( p_udt, _("File corrupted"), + _("Downloaded file \"%s\" was corrupted. Thus, it was deleted."), psz_destfile ); msg_Err( p_udt, "BAD SIGNATURE for %s", psz_destfile ); free( p_hash ); @@ -1627,16 +1736,66 @@ void update_DownloadReal( update_download_thread_t *p_udt ) free( p_hash ); end: + if( p_progress ) + dialog_ProgressDestroy( p_progress ); if( p_stream ) stream_Delete( p_stream ); if( p_file ) fclose( p_file ); - free( psz_destdir ); free( psz_destfile ); free( p_buffer ); free( psz_size ); + free( p_udt->psz_destination ); + p_udt->p_update->p_download = NULL; + vlc_object_release( p_udt ); + vlc_restorecancel( canc ); + return NULL; +} + +update_release_t *update_GetRelease( update_t *p_update ) +{ + return &p_update->release; } +#else +update_t *__update_New( vlc_object_t *p_this ) +{ + (void)p_this; + return NULL; +} + +void update_Delete( update_t *p_update ) +{ + (void)p_update; +} + +void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), + void *p_data ) +{ + (void)p_update; (void)pf_callback; (void)p_data; +} + +bool update_NeedUpgrade( update_t *p_update ) +{ + (void)p_update; + return false; +} + +void update_WaitDownload( update_t *p_update ) +{ + (void)p_update; +} + +void update_Download( update_t *p_update, const char *psz_destdir ) +{ + (void)p_update; (void)psz_destdir; +} + +update_release_t *update_GetRelease( update_t *p_update ) +{ + (void)p_update; + return NULL; +} #endif