aboutsummaryrefslogtreecommitdiff
path: root/src/engine/registration.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/registration.h')
-rw-r--r--src/engine/registration.h214
1 files changed, 214 insertions, 0 deletions
diff --git a/src/engine/registration.h b/src/engine/registration.h
new file mode 100644
index 00000000..c830a06d
--- /dev/null
+++ b/src/engine/registration.h
@@ -0,0 +1,214 @@
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)
6extern "C" {
7#endif
8
9
10enum BURN_MODE;
11enum BURN_DEPENDENCY_REGISTRATION_ACTION;
12struct _BURN_LOGGING;
13typedef _BURN_LOGGING BURN_LOGGING;
14
15// constants
16
17const LPCWSTR BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
18const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = L"BundleCachePath";
19const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = L"BundleAddonCode";
20const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = L"BundleDetectCode";
21const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE = L"BundlePatchCode";
22const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_UPGRADE_CODE = L"BundleUpgradeCode";
23const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME = L"DisplayName";
24const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION = L"BundleVersion";
25const LPCWSTR BURN_REGISTRATION_REGISTRY_ENGINE_VERSION = L"EngineVersion";
26const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY = L"BundleProviderKey";
27const LPCWSTR BURN_REGISTRATION_REGISTRY_BUNDLE_TAG = L"BundleTag";
28
29enum BURN_RESUME_MODE
30{
31 BURN_RESUME_MODE_NONE,
32 BURN_RESUME_MODE_ACTIVE,
33 BURN_RESUME_MODE_SUSPEND,
34 BURN_RESUME_MODE_ARP,
35 BURN_RESUME_MODE_REBOOT_PENDING,
36};
37
38enum BURN_REGISTRATION_MODIFY_TYPE
39{
40 BURN_REGISTRATION_MODIFY_ENABLED,
41 BURN_REGISTRATION_MODIFY_DISABLE,
42 BURN_REGISTRATION_MODIFY_DISABLE_BUTTON,
43};
44
45
46// structs
47
48typedef struct _BURN_UPDATE_REGISTRATION
49{
50 BOOL fRegisterUpdate;
51 LPWSTR sczManufacturer;
52 LPWSTR sczDepartment;
53 LPWSTR sczProductFamily;
54 LPWSTR sczName;
55 LPWSTR sczClassification;
56} BURN_UPDATE_REGISTRATION;
57
58typedef struct _BURN_RELATED_BUNDLE
59{
60 BOOTSTRAPPER_RELATION_TYPE relationType;
61
62 DWORD64 qwVersion;
63 LPWSTR sczTag;
64
65 BURN_PACKAGE package;
66} BURN_RELATED_BUNDLE;
67
68typedef struct _BURN_RELATED_BUNDLES
69{
70 BURN_RELATED_BUNDLE* rgRelatedBundles;
71 DWORD cRelatedBundles;
72} BURN_RELATED_BUNDLES;
73
74typedef struct _BURN_SOFTWARE_TAG
75{
76 LPWSTR sczFilename;
77 LPWSTR sczRegid;
78 LPSTR sczTag;
79} BURN_SOFTWARE_TAG;
80
81typedef struct _BURN_SOFTWARE_TAGS
82{
83 BURN_SOFTWARE_TAG* rgSoftwareTags;
84 DWORD cSoftwareTags;
85} BURN_SOFTWARE_TAGS;
86
87typedef struct _BURN_REGISTRATION
88{
89 BOOL fPerMachine;
90 BOOL fRegisterArp;
91 BOOL fDisableResume;
92 BOOL fInstalled;
93 LPWSTR sczId;
94 LPWSTR sczTag;
95
96 LPWSTR *rgsczDetectCodes;
97 DWORD cDetectCodes;
98
99 LPWSTR *rgsczUpgradeCodes;
100 DWORD cUpgradeCodes;
101
102 LPWSTR *rgsczAddonCodes;
103 DWORD cAddonCodes;
104
105 LPWSTR *rgsczPatchCodes;
106 DWORD cPatchCodes;
107
108 DWORD64 qwVersion;
109 LPWSTR sczActiveParent;
110 LPWSTR sczProviderKey;
111 LPWSTR sczExecutableName;
112
113 // paths
114 HKEY hkRoot;
115 LPWSTR sczRegistrationKey;
116 LPWSTR sczCacheExecutablePath;
117 LPWSTR sczResumeCommandLine;
118 LPWSTR sczStateFile;
119
120 // ARP registration
121 LPWSTR sczDisplayName;
122 LPWSTR sczDisplayVersion;
123 LPWSTR sczPublisher;
124 LPWSTR sczHelpLink;
125 LPWSTR sczHelpTelephone;
126 LPWSTR sczAboutUrl;
127 LPWSTR sczUpdateUrl;
128 LPWSTR sczParentDisplayName;
129 LPWSTR sczComments;
130 //LPWSTR sczReadme; // TODO: this would be a file path
131 LPWSTR sczContact;
132 //DWORD64 qwEstimatedSize; // TODO: size should come from disk cost calculation
133 BURN_REGISTRATION_MODIFY_TYPE modify;
134 BOOL fNoRemoveDefined;
135 BOOL fNoRemove;
136
137 BURN_SOFTWARE_TAGS softwareTags;
138
139 // Update registration
140 BURN_UPDATE_REGISTRATION update;
141
142 // Only valid after detect.
143 BURN_RELATED_BUNDLES relatedBundles;
144
145 LPWSTR sczDetectedProviderKeyBundleId;
146 LPWSTR sczAncestors;
147
148 BOOL fEnabledForwardCompatibleBundle;
149 BURN_PACKAGE forwardCompatibleBundle;
150} BURN_REGISTRATION;
151
152
153// functions
154
155HRESULT RegistrationParseFromXml(
156 __in BURN_REGISTRATION* pRegistration,
157 __in IXMLDOMNode* pixnBundle
158 );
159void RegistrationUninitialize(
160 __in BURN_REGISTRATION* pRegistration
161 );
162HRESULT RegistrationSetVariables(
163 __in BURN_REGISTRATION* pRegistration,
164 __in BURN_VARIABLES* pVariables
165 );
166HRESULT RegistrationDetectInstalled(
167 __in BURN_REGISTRATION* pRegistration,
168 __out BOOL* pfInstalled
169 );
170HRESULT RegistrationDetectResumeType(
171 __in BURN_REGISTRATION* pRegistration,
172 __out BOOTSTRAPPER_RESUME_TYPE* pResumeType
173 );
174HRESULT RegistrationDetectRelatedBundles(
175 __in BURN_REGISTRATION* pRegistration
176 );
177HRESULT RegistrationSessionBegin(
178 __in_z LPCWSTR wzEngineWorkingPath,
179 __in BURN_REGISTRATION* pRegistration,
180 __in BURN_VARIABLES* pVariables,
181 __in BURN_USER_EXPERIENCE* pUserExperience,
182 __in DWORD dwRegistrationOptions,
183 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction,
184 __in DWORD64 qwEstimatedSize
185 );
186HRESULT RegistrationSessionResume(
187 __in BURN_REGISTRATION* pRegistration,
188 __in BURN_VARIABLES* pVariables
189 );
190HRESULT RegistrationSessionEnd(
191 __in BURN_REGISTRATION* pRegistration,
192 __in BURN_RESUME_MODE resumeMode,
193 __in BOOTSTRAPPER_APPLY_RESTART restart,
194 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction
195 );
196HRESULT RegistrationSaveState(
197 __in BURN_REGISTRATION* pRegistration,
198 __in_bcount_opt(cbBuffer) BYTE* pbBuffer,
199 __in_opt DWORD cbBuffer
200 );
201HRESULT RegistrationLoadState(
202 __in BURN_REGISTRATION* pRegistration,
203 __out_bcount(*pcbBuffer) BYTE** ppbBuffer,
204 __out DWORD* pcbBuffer
205 );
206HRESULT RegistrationGetResumeCommandLine(
207 __in const BURN_REGISTRATION* pRegistration,
208 __deref_out_z LPWSTR* psczResumeCommandLine
209 );
210
211
212#if defined(__cplusplus)
213}
214#endif