Beispiel #1
0
bool idpDownloadFilesComp()
{
    downloader.ownMsgLoop = false;
    downloader.setUi(NULL);
    downloader.setInternetOptions(internetOptions);
    return downloader.downloadFiles(true);
}
Beispiel #2
0
bool idpDownloadFiles()
{
	downloader.setUI(NULL);
	downloader.setUserAgent(userAgent);
	downloader.setInternetOptions(internetOptions);
	return downloader.downloadFiles();
}
Beispiel #3
0
bool idpDownloadFile(_TCHAR *url, _TCHAR *filename)
{
    Downloader d;
    d.setInternetOptions(internetOptions);
    d.setOptions(&downloader);
    d.setMirrorList(&downloader);
    d.addFile(STR(url), STR(filename));
    return d.downloadFiles();
}
Beispiel #4
0
void idpStartDownload()
{
    ui.lockButtons();
    downloader.ownMsgLoop = false;
    downloader.setUi(&ui);
    downloader.setInternetOptions(internetOptions);
    downloader.setFinishedCallback(&downloadFinished);
    downloader.startDownload();
}
Beispiel #5
0
void idpStartDownload()
{
	ui.lockButtons();
	downloader.setUI(&ui);
	downloader.setUserAgent(userAgent);
	downloader.setInternetOptions(internetOptions);
	downloader.setFinishedCallback(&downloadFinished);
	downloader.startDownload();
}
Beispiel #6
0
bool idpDownloadFile(_TCHAR *url, _TCHAR *filename)
{
	Downloader d;
	d.setUserAgent(userAgent);
	d.setInternetOptions(internetOptions);
	d.setMirrorList(&downloader);
	d.addFile(url, filename);
	return d.downloadFiles();
}
Beispiel #7
0
bool idpGetFileSize(_TCHAR *url, DWORDLONG *size)
{
    Downloader d;
    d.setInternetOptions(internetOptions);
    d.setOptions(&downloader);
    d.setMirrorList(&downloader);
    d.addFile(STR(url), _T(""));
    *size = d.getFileSizes();

    return *size != FILE_SIZE_UNKNOWN;
}
Beispiel #8
0
bool idpDownloadFilesCompUi()
{
    ui.lockButtons();
    downloader.ownMsgLoop = true;
    downloader.processMessages();
    downloader.setUi(&ui);
    downloader.setInternetOptions(internetOptions);
    
    bool res;

    while(true)
    {
        res = downloader.downloadFiles(true);

        TRACE(_T("idpDownloadFilesCompUi: ui.errorDlgMode == %d"), ui.errorDlgMode);

        if(res || (ui.errorDlgMode == DLG_NONE) || downloader.downloadCancelled)
            break; // go to next page
        else if(ui.errorDlgMode == DLG_SIMPLE)
        {
            int dlgRes = ui.messageBox(ui.msg("Download failed") + _T(": ") + downloader.getLastErrorStr() + _T("\r\n") + (ui.allowContinue ?
                                       ui.msg("Check your connection and click 'Retry' to try downloading the files again, or click 'Next' to continue installing anyway.") :
                                       ui.msg("Check your connection and click 'Retry' to try downloading the files again, or click 'Cancel' to terminate setup.")),
                                       ui.msg("Download failed"), MB_ICONWARNING | (ui.hasRetryButton ? MB_OK : MB_RETRYCANCEL));

            if     (dlgRes == IDRETRY)  continue;
            else if(dlgRes == IDCANCEL) break;
        }
        else
        {
            ui.dllHandle = idpDllHandle;

            int dlgRes = ui.errorDialog(&downloader);
            
            if     (dlgRes == IDRETRY)  continue;
            else if(dlgRes == IDABORT)  break;
            else if(dlgRes == IDIGNORE) break;
        }
    }

    ui.unlockButtons();
    return res;
}