369{
377
379
383
387
390
393
395
398
399 for (;;)
400 {
404 {
406 break;
407 }
408 if (!
file->read_size)
break;
410
412 file->fileProgress.BytesTransferred +=
file->read_size;
413 job->jobProgress.BytesTransferred +=
file->read_size;
415 }
416
418
419done:
425
428}
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context, DWORD status, LPVOID buf, DWORD buflen)
static DWORD wait_for_completion(BackgroundCopyJobImpl *job)
static BOOL set_request_credentials(HINTERNET req, BackgroundCopyJobImpl *job)
HINTERNET WINAPI WinHttpOpen(LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWSTR bypass, DWORD flags)
HINTERNET WINAPI WinHttpConnect(HINTERNET hsession, LPCWSTR server, INTERNET_PORT port, DWORD reserved)
BOOL WINAPI WinHttpCloseHandle(HINTERNET handle)
HINTERNET WINAPI WinHttpOpenRequest(HINTERNET hconnect, LPCWSTR verb, LPCWSTR object, LPCWSTR version, LPCWSTR referrer, LPCWSTR *types, DWORD flags)
BOOL WINAPI WinHttpSetOption(HINTERNET handle, DWORD option, LPVOID buffer, DWORD buflen)
WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET handle, WINHTTP_STATUS_CALLBACK callback, DWORD flags, DWORD_PTR reserved)
_Check_return_ _CRTIMP FILE *__cdecl tmpfile(void)
BOOL WINAPI WinHttpReadData(HINTERNET hrequest, LPVOID buffer, DWORD to_read, LPDWORD read)
BOOL WINAPI WinHttpSendRequest(HINTERNET hrequest, LPCWSTR headers, DWORD headers_len, LPVOID optional, DWORD optional_len, DWORD total_len, DWORD_PTR context)
BOOL WINAPI WinHttpReceiveResponse(HINTERNET hrequest, LPVOID reserved)
#define WINHTTP_OPTION_CONTEXT_VALUE
#define WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS
#define WINHTTP_FLAG_ASYNC
#define WINHTTP_FLAG_SECURE
#define INTERNET_SCHEME_HTTPS