aboutsummaryrefslogtreecommitdiff
path: root/src/dutil/inc/apuputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dutil/inc/apuputil.h')
-rw-r--r--src/dutil/inc/apuputil.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/dutil/inc/apuputil.h b/src/dutil/inc/apuputil.h
new file mode 100644
index 00000000..6764bde8
--- /dev/null
+++ b/src/dutil/inc/apuputil.h
@@ -0,0 +1,86 @@
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
9#define ReleaseApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
10#define ReleaseNullApupChain(p) if (p) { ApupFreeChain(p); p = NULL; }
11
12
13const LPCWSTR APPLICATION_SYNDICATION_NAMESPACE = L"http://appsyndication.org/2006/appsyn";
14
15typedef enum APUP_HASH_ALGORITHM
16{
17 APUP_HASH_ALGORITHM_UNKNOWN,
18 APUP_HASH_ALGORITHM_MD5,
19 APUP_HASH_ALGORITHM_SHA1,
20 APUP_HASH_ALGORITHM_SHA256,
21} APUP_HASH_ALGORITHM;
22
23
24struct APPLICATION_UPDATE_ENCLOSURE
25{
26 LPWSTR wzUrl;
27 LPWSTR wzLocalName;
28 DWORD64 dw64Size;
29
30 BYTE* rgbDigest;
31 DWORD cbDigest;
32 APUP_HASH_ALGORITHM digestAlgorithm;
33
34 BOOL fInstaller;
35};
36
37
38struct APPLICATION_UPDATE_ENTRY
39{
40 LPWSTR wzApplicationId;
41 LPWSTR wzApplicationType;
42 LPWSTR wzTitle;
43 LPWSTR wzSummary;
44 LPWSTR wzContentType;
45 LPWSTR wzContent;
46
47 LPWSTR wzUpgradeId;
48 BOOL fUpgradeExclusive;
49 DWORD64 dw64Version;
50 DWORD64 dw64UpgradeVersion;
51
52 DWORD64 dw64TotalSize;
53
54 DWORD cEnclosures;
55 APPLICATION_UPDATE_ENCLOSURE* rgEnclosures;
56};
57
58
59struct APPLICATION_UPDATE_CHAIN
60{
61 LPWSTR wzDefaultApplicationId;
62 LPWSTR wzDefaultApplicationType;
63
64 DWORD cEntries;
65 APPLICATION_UPDATE_ENTRY* rgEntries;
66};
67
68
69HRESULT DAPI ApupAllocChainFromAtom(
70 __in ATOM_FEED* pFeed,
71 __out APPLICATION_UPDATE_CHAIN** ppChain
72 );
73
74HRESULT DAPI ApupFilterChain(
75 __in APPLICATION_UPDATE_CHAIN* pChain,
76 __in DWORD64 dw64Version,
77 __out APPLICATION_UPDATE_CHAIN** ppFilteredChain
78 );
79
80void DAPI ApupFreeChain(
81 __in APPLICATION_UPDATE_CHAIN* pChain
82 );
83
84#ifdef __cplusplus
85}
86#endif