diff options
Diffstat (limited to '')
-rw-r--r-- | src/engine/payload.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/engine/payload.h b/src/engine/payload.h new file mode 100644 index 00000000..0c7b68e4 --- /dev/null +++ b/src/engine/payload.h | |||
@@ -0,0 +1,93 @@ | |||
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 | #if defined(__cplusplus) | ||
6 | extern "C" { | ||
7 | #endif | ||
8 | |||
9 | |||
10 | // constants | ||
11 | |||
12 | enum BURN_PAYLOAD_PACKAGING | ||
13 | { | ||
14 | BURN_PAYLOAD_PACKAGING_NONE, | ||
15 | BURN_PAYLOAD_PACKAGING_DOWNLOAD, | ||
16 | BURN_PAYLOAD_PACKAGING_EMBEDDED, | ||
17 | BURN_PAYLOAD_PACKAGING_EXTERNAL, | ||
18 | }; | ||
19 | |||
20 | enum BURN_PAYLOAD_STATE | ||
21 | { | ||
22 | BURN_PAYLOAD_STATE_NONE, | ||
23 | BURN_PAYLOAD_STATE_ACQUIRED, | ||
24 | BURN_PAYLOAD_STATE_CACHED, | ||
25 | }; | ||
26 | |||
27 | |||
28 | // structs | ||
29 | |||
30 | typedef struct _BURN_PAYLOAD | ||
31 | { | ||
32 | LPWSTR sczKey; | ||
33 | BURN_PAYLOAD_PACKAGING packaging; | ||
34 | BOOL fLayoutOnly; | ||
35 | DWORD64 qwFileSize; | ||
36 | LPWSTR sczFilePath; // file path relative to the execute location | ||
37 | |||
38 | BURN_CATALOG *pCatalog; // used to verify this payload | ||
39 | BYTE* pbCertificateRootPublicKeyIdentifier; | ||
40 | DWORD cbCertificateRootPublicKeyIdentifier; | ||
41 | BYTE* pbCertificateRootThumbprint; | ||
42 | DWORD cbCertificateRootThumbprint; | ||
43 | BYTE* pbHash; | ||
44 | DWORD cbHash; | ||
45 | |||
46 | LPWSTR sczSourcePath; | ||
47 | BURN_CONTAINER* pContainer; | ||
48 | DOWNLOAD_SOURCE downloadSource; | ||
49 | |||
50 | // mutable members | ||
51 | BURN_PAYLOAD_STATE state; | ||
52 | LPWSTR sczLocalFilePath; // location of extracted or downloaded copy | ||
53 | } BURN_PAYLOAD; | ||
54 | |||
55 | typedef struct _BURN_PAYLOADS | ||
56 | { | ||
57 | BURN_PAYLOAD* rgPayloads; | ||
58 | DWORD cPayloads; | ||
59 | } BURN_PAYLOADS; | ||
60 | |||
61 | |||
62 | // functions | ||
63 | |||
64 | HRESULT PayloadsParseFromXml( | ||
65 | __in BURN_PAYLOADS* pPayloads, | ||
66 | __in_opt BURN_CONTAINERS* pContainers, | ||
67 | __in_opt BURN_CATALOGS* pCatalogs, | ||
68 | __in IXMLDOMNode* pixnBundle | ||
69 | ); | ||
70 | void PayloadsUninitialize( | ||
71 | __in BURN_PAYLOADS* pPayloads | ||
72 | ); | ||
73 | HRESULT PayloadExtractFromContainer( | ||
74 | __in BURN_PAYLOADS* pPayloads, | ||
75 | __in_opt BURN_CONTAINER* pContainer, | ||
76 | __in BURN_CONTAINER_CONTEXT* pContainerContext, | ||
77 | __in_z LPCWSTR wzTargetDir | ||
78 | ); | ||
79 | HRESULT PayloadFindById( | ||
80 | __in BURN_PAYLOADS* pPayloads, | ||
81 | __in_z LPCWSTR wzId, | ||
82 | __out BURN_PAYLOAD** ppPayload | ||
83 | ); | ||
84 | HRESULT PayloadFindEmbeddedBySourcePath( | ||
85 | __in BURN_PAYLOADS* pPayloads, | ||
86 | __in_z LPCWSTR wzStreamName, | ||
87 | __out BURN_PAYLOAD** ppPayload | ||
88 | ); | ||
89 | |||
90 | |||
91 | #if defined(__cplusplus) | ||
92 | } | ||
93 | #endif | ||