aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/inc/dlutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/dlutil.h')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/dlutil.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/dlutil.h b/src/libs/dutil/WixToolset.DUtil/inc/dlutil.h
new file mode 100644
index 00000000..3e95103a
--- /dev/null
+++ b/src/libs/dutil/WixToolset.DUtil/inc/dlutil.h
@@ -0,0 +1,59 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef HRESULT (WINAPI *LPAUTHENTICATION_ROUTINE)(
10 __in LPVOID pVoid,
11 __in HINTERNET hUrl,
12 __in long lHttpCode,
13 __out BOOL* pfRetrySend,
14 __out BOOL* pfRetry
15 );
16
17typedef int (WINAPI *LPCANCEL_ROUTINE)(
18 __in HRESULT hrError,
19 __in_z_opt LPCWSTR wzError,
20 __in BOOL fAllowRetry,
21 __in_opt LPVOID pvContext
22 );
23
24// structs
25typedef struct _DOWNLOAD_SOURCE
26{
27 LPWSTR sczUrl;
28 LPWSTR sczUser;
29 LPWSTR sczPassword;
30} DOWNLOAD_SOURCE;
31
32typedef struct _DOWNLOAD_CACHE_CALLBACK
33{
34 LPPROGRESS_ROUTINE pfnProgress;
35 LPCANCEL_ROUTINE pfnCancel;
36 LPVOID pv;
37} DOWNLOAD_CACHE_CALLBACK;
38
39typedef struct _DOWNLOAD_AUTHENTICATION_CALLBACK
40{
41 LPAUTHENTICATION_ROUTINE pfnAuthenticate;
42 LPVOID pv;
43} DOWNLOAD_AUTHENTICATION_CALLBACK;
44
45
46// functions
47
48HRESULT DAPI DownloadUrl(
49 __in DOWNLOAD_SOURCE* pDownloadSource,
50 __in DWORD64 dw64AuthoredDownloadSize,
51 __in LPCWSTR wzDestinationPath,
52 __in_opt DOWNLOAD_CACHE_CALLBACK* pCache,
53 __in_opt DOWNLOAD_AUTHENTICATION_CALLBACK* pAuthenticate
54 );
55
56
57#ifdef __cplusplus
58}
59#endif