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