bool idpDownloadFiles() { downloader.ownMsgLoop = false; downloader.setUi(NULL); downloader.setInternetOptions(internetOptions); return downloader.downloadFiles(false); }
bool idpGetFilesSize(DWORDLONG *size) { downloader.setUi(NULL); downloader.setInternetOptions(internetOptions); *size = downloader.getFileSizes(false); return *size != FILE_SIZE_UNKNOWN; }
void idpStartDownload() { ui.lockButtons(); downloader.ownMsgLoop = false; downloader.setUi(&ui); downloader.setInternetOptions(internetOptions); downloader.setFinishedCallback(&downloadFinished); downloader.startDownload(); }
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; }